Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit aad5c656 authored by Samuël Weber's avatar Samuël Weber
Browse files

fix OP

parent 500d9028
......@@ -12,6 +12,7 @@ from django.conf import settings
from django_plotly_dash import DjangoDash
from .utilities import *
import dashApp.utilities as utilities
from .app_components import SharedComponent, OxidativePotentialComponent
sc = SharedComponent()
......@@ -345,6 +346,12 @@ def update_box_grah(species, stations, temporality, plots_options, groupby_var):
print("BOX: no data to plot, sp:", species)
return returnError
dfdt = utilities.add_month(dfdt, season=True)
dfdt["year"] = dfdt["Date"].apply(lambda x: x.year)
dfdt["all"] = "All date"
dfdt["hot-cold"] = "MJJASO (Hot)"
dfdt.loc[dfdt["month"].isin(["Nov", "Dec", "Jan", "Feb", "Mar", "Apr"]), "hot-cold"] = "NDJFMA (Cold)"
# ==== Plot option ========================================================
plot_type = "box" if "boxplot" in plots_options else "bar"
# X variable
......@@ -375,8 +382,6 @@ def update_box_grah(species, stations, temporality, plots_options, groupby_var):
hue_var_list = date_var_list
xticklabels = x_var_list
dfdt = add_month(dfdt, season=True)
# ==== Plot part ==========================================================
for hue in hue_var_list:
dftmp = dfdt[dfdt[hue_var_col]==hue]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment