Skip to content

Commit

Permalink
new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
benoitfrisque committed Oct 24, 2024
1 parent a4026eb commit 9aa0217
Show file tree
Hide file tree
Showing 58 changed files with 9 additions and 81 deletions.
48 changes: 0 additions & 48 deletions Dashboards/utils/colors.py

This file was deleted.

24 changes: 0 additions & 24 deletions Dashboards/utils/css_reader.py

This file was deleted.

File renamed without changes.
8 changes: 4 additions & 4 deletions Dashboards/dashboard.py → dashboard/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
from dash_iconify import DashIconify
from datetime import datetime

from Dashboards.my_data.datasets import get_useful_data
from Dashboards.my_data.computed_datasets import merge_tables, calc_degrees_pollution, calc_vdl, count_lichen, count_lichen_per_species, count_species_per_observation, count_lichen_per_lichen_id, group_lichen_by_observation_and_thallus
from Dashboards.charts import blank_figure, create_map, create_hist1_nb_species, create_hist2_vdl, create_hist3, create_pie_thallus, create_hist4, create_gauge_chart
from Dashboards.constants import MAP_SETTINGS, BASE_COLOR_PALETTE, BODY_FONT_FAMILY, POSITIVE_GAUGE_COLOR_PALETTE, NEGATIVE_GAUGE_COLOR_PALETTE, TRANSLATIONS_EN_FR, GRID_STYLE, CARD_STYLE, MAP_STYLE, FLEX_COLUMNS_CONTAINER_STYLE
from my_data.datasets import get_useful_data
from my_data.computed_datasets import merge_tables, calc_degrees_pollution, calc_vdl, count_lichen, count_lichen_per_species, count_species_per_observation, count_lichen_per_lichen_id, group_lichen_by_observation_and_thallus
from dashboard.charts import blank_figure, create_map, create_hist1_nb_species, create_hist2_vdl, create_hist3, create_pie_thallus, create_hist4, create_gauge_chart
from dashboard.constants import MAP_SETTINGS, BASE_COLOR_PALETTE, BODY_FONT_FAMILY, POSITIVE_GAUGE_COLOR_PALETTE, NEGATIVE_GAUGE_COLOR_PALETTE, TRANSLATIONS_EN_FR, GRID_STYLE, CARD_STYLE, MAP_STYLE, FLEX_COLUMNS_CONTAINER_STYLE

_dash_renderer._set_react_version("18.2.0")

Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
2 changes: 1 addition & 1 deletion Dashboards/charts.py → dashboard/charts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import plotly.express as px
import plotly.graph_objects as go
from Dashboards.constants import BASE_COLOR_PALETTE, PASTEL_COLOR_PALETTE, PLOTLY_LAYOUT, MAP_SETTINGS
from dashboard.constants import BASE_COLOR_PALETTE, PASTEL_COLOR_PALETTE, PLOTLY_LAYOUT, MAP_SETTINGS


"""
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pandas as pd
import numpy as np

from Dashboards.constants import SQUARE_COLUMNS, ORIENTATIONS
from dashboard.constants import SQUARE_COLUMNS, ORIENTATIONS

# Merge table_df with lichen_df, lichen_species_df and observation_df
def merge_tables(table_df, lichen_df, observation_df):
Expand Down
2 changes: 1 addition & 1 deletion Dashboards/my_data/datasets.py → my_data/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def get_lichen_ecology():
def get_lichen_ecology_csv():
parent_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

lichen_ecology_csv_path = os.path.join(parent_dir, 'assets', 'lichen_species_ecology.csv')
lichen_ecology_csv_path = os.path.join(parent_dir, 'dashboard', 'assets', 'lichen_species_ecology.csv')
lichen_ecology_df = pd.read_csv(lichen_ecology_csv_path, delimiter=';')

return lichen_ecology_df
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion Dashboards/my_data/model.py → 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 Dashboards.my_data.db_connect import engine
from my_data.db_connect import engine

Base = declarative_base()

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from dash import Dash, html, dcc, Output, Input
from my_data.datasets import get_lichen_data, get_lichen_species_data, get_observation_data, get_table_data, get_tree_species, get_lichen_ecology
from my_data.computed_datasets import df_frequency
from Dashboards.charts import create_gauge_chart
from dashboard.charts import create_gauge_chart

chemin_dossier_parent = Path(__file__).parent.parent
sys.path.append(str(chemin_dossier_parent))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes

0 comments on commit 9aa0217

Please sign in to comment.