Skip to content

Commit

Permalink
updated data module path
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitfrisque committed Oct 24, 2024
1 parent 64d5638 commit a4026eb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
10 changes: 3 additions & 7 deletions Dashboards/dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,10 +226,6 @@ def update_dashboard2(species_id_selected, relayoutData):
species_poleo = TRANSLATIONS_EN_FR.get(species_poleo, species_poleo)
species_thallus = TRANSLATIONS_EN_FR.get(species_thallus, species_thallus)

# Pluralize the thallus
if not species_thallus.endswith("x") or species_thallus.endswith("s"):
species_thallus += "s"

return fig_map, hist4_species, species_name, species_img_path, species_acid, species_eutro, species_poleo, species_thallus, species_rarity


Expand Down Expand Up @@ -472,19 +468,19 @@ def histogram_card(title, tooltip_text, graph_id, height="330px"):
),
dmc.Text(
children=[
"Ce lichen fait partie de la famille des ",
"Ce lichen ",
dmc.Text(
id="species-thallus",
c="blue",
style={"display": "inline"},
),
" et est classé comme ",
" est ",
dmc.Text(
id="species-rarity",
c="blue",
style={"display": "inline"},
),
".",
" en milieu urbain.",
],
mt="sm",
c="dimmed",
Expand Down
2 changes: 1 addition & 1 deletion Dashboards/my_data/computed_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def count_species_per_observation(lichen_df, observation_df):
return observation_with_species_count_df


# Group by species' type and count them (but only count there presence in the table, not the frequency in each observation)
# Group by species' type and count them (but only count their presence in the table, not the frequency in each observation)
def count_lichen_per_species(lichen_df, lichen_species_df):

# Group by species' type and count them
Expand Down
6 changes: 2 additions & 4 deletions Dashboards/my_data/model.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from sqlalchemy import Column, BigInteger, Integer, String, ForeignKey, ARRAY, Boolean, Date, Text, Float
from sqlalchemy.orm import declarative_base, relationship
from my_data.db_connect import engine
from Dashboards.my_data.db_connect import engine

Base = declarative_base()

Expand Down Expand Up @@ -103,7 +103,7 @@ class LichenEcology(Base):
# Vue pour les fréquences
class LichenFrequency(Base):
__tablename__ = 'lichen_frequency'
__table_args__ = {'autoload_with': engine}
__table_args__ = {'autoload_with': engine}

id = Column(BigInteger, primary_key=True, autoincrement=True)
id_site = Column(BigInteger)
Expand All @@ -112,5 +112,3 @@ class LichenFrequency(Base):
freq = Column(Integer)
eutrophication = Column(String(255))
poleotolerance = Column(String(255))


0 comments on commit a4026eb

Please sign in to comment.