diff --git a/GCYC_chlorophylle_fapar/README_data.md b/GCYC_chlorophylle_fapar/README_data.md new file mode 100644 index 00000000..7b510beb --- /dev/null +++ b/GCYC_chlorophylle_fapar/README_data.md @@ -0,0 +1,53 @@ +# Récupération des données brutes + +Les données brutes sont récupéréer à l'aide de deux services de COPERNICUS : +COPERNICUS Marine Service pour la chlorophylle et COPERNICUS Land Service pour +le FAPAR. + +Malheureusement pour accèder aux données disponibles sur les sites dédiés à ces +services il est nécessaire de créer un compte gratuit pour chacun d'entre eux. +Cela empêche de pouvoir récupérer les données dans un script python, il faut +les récupérer à la main. + +Ce document décrit les étapes nécessaires à la récupération des données brutes (~2 Go au total). + +### COPERNICUS Marine Service + +Afin de récupérer les données sur la chlorophylle : + +* Créer un compte sur COPERNICUS Marine Service (gratuit, 5 mn) : https://resources.marine.copernicus.eu/registration-form + +* BIEN PENSER à activer le compte par mail avant de poursuivre le processus + +* Exécuter les commandes suivantes en remplacant \ et \ par le login et password du compte que vous venez de créer : + +```bash +motuclient --motu https://my.cmems-du.eu/motu-web/Motu --service-id GLOBAL_MULTIYEAR_BGC_001_029-TDS --product-id cmems_mod_glo_bgc_my_0.25_P1D-m --longitude-min -180 --longitude-max 179.75 --latitude-min -80 --latitude-max 90 --date-min "2019-06-11 12:00:00" --date-max "2019-06-20 12:00:00" --depth-min 0 --depth-max 15 --variable chl --out-dir "." --out-name "CHL_summer.nc" --user "" --pwd "" +``` + +```bash +motuclient --motu https://my.cmems-du.eu/motu-web/Motu --service-id GLOBAL_MULTIYEAR_BGC_001_029-TDS --product-id cmems_mod_glo_bgc_my_0.25_P1D-m --longitude-min -180 --longitude-max 179.75 --latitude-min -80 --latitude-max 90 --date-min "2019-12-11 12:00:00" --date-max "2019-12-20 12:00:00" --depth-min 0 --depth-max 15 --variable chl --out-dir "." --out-name "CHL_winter.nc" --user "" --pwd "" +``` + +* Déplacer les données téléchargées (fichiers en .nc) dans le dossier chloro/data + +### COPERNICUS Land Service + +Afin de récupérer les données sur le FAPAR : + +* Créer un compte sur COPERNICUS Land Service (gratuit, 5 mn) : https://land.copernicus.vgt.vito.be/PDF/portal/Application.html#Home + +* BIEN PENSER à activer le compte par mail avant de poursuivre le processus + +* Accéder au lien de téléchargement suivant, entrer ses identifiants, et télécharger le fichier de données en .nc (en dessous de Data files) : https://land.copernicus.vgt.vito.be/PDF/free?productID=50080173&collectionID=1000084 + +* Renommer le fichier téléchargé en "FAPAR\_summer.nc" puis le déplacer dans chloro/data + +* Répéter la procédure de téléchargement pour les données hivernales à l'aide de ce lien : https://land.copernicus.vgt.vito.be/PDF/free?productID=56836343&collectionID=1000084 + +* Renommer le fichier téléchargé en "FAPAR\_winter.nc" puis le déplacer dans chloro/data + + + + + diff --git a/GCYC_chlorophylle_fapar/chloro.py b/GCYC_chlorophylle_fapar/chloro.py new file mode 100644 index 00000000..c5fcb9af --- /dev/null +++ b/GCYC_chlorophylle_fapar/chloro.py @@ -0,0 +1,259 @@ +import dash +from dash import dcc +from dash import html +import pandas as pd +import plotly.graph_objs as go +class Chloro(): + def create_fig(self, chldf, fapardf, chl_colormap, fapar_colormap): + + data = [] + + data.append( + go.Scattermapbox( + lon=fapardf['lonbin'].values, + lat=fapardf['latbin'].values, + mode='markers', + name="FAPAR", + text=[str(fapardf['FAPAR'].iloc[i]) for i in range(fapardf.shape[0])], + marker=go.Marker( + showscale=True, + cmax=1, + cmin=0, + color=fapardf['FAPAR'].values, + colorscale=fapar_colormap, + colorbar=dict(title='FAPAR', x=1) + ), + ) + ) + data.append( + go.Scattermapbox( + lon=chldf['lonbin'].values, + lat=chldf['latbin'].values, + mode='markers', + name="CHL (mg/m³)", + text=[str(chldf['chl'].iloc[i]) for i in range(chldf.shape[0])], + marker=go.Marker( + showscale=True, + cmax=4, + cmin=0, + color=chldf['chl'].values, + colorscale=chl_colormap, + colorbar=dict(title='CHL (mg/m³)', x=1.05) + ), + ) + ) + + layout = go.Layout( + margin=dict(t=0,b=0,r=0,l=0), + autosize=True, + hovermode='closest', + showlegend=False, + mapbox=dict( + accesstoken=self.mapbox_access_token, + bearing=0, + center=dict( + lat=44, + lon=2 + ), + pitch=0, + zoom=2, + style='dark' + ), + ) + + fig = dict(data=data, layout=layout) + return fig + + + + def __init__(self, application = None): + + + self.LESSER = -1 + self.NONE = 0 + self.GREATER = 1 + + self.SUMMER = 1 + self.WINTER = 0 + + self.COASTLINE = 1 + self.NO_COASTLINE = 0 + + self.mapbox_access_token = 'pk.eyJ1IjoiZ2NhcnJpZXJlIiwiYSI6ImNsMmI1c3p3ejAxNmEzaW51MXBta2N6bTcifQ.f_MlUBEyToUp92xcCOwF0g' + + self.chldf = pd.read_pickle("data/chldf_2019-06-20.pkl") + self.fapardf = pd.read_pickle("data/fapardf_2019-06-20.pkl") + + self.chldf_coastline = pd.read_pickle("data/chldf_coastline_2019-06-20.pkl") + self.fapardf_coastline = pd.read_pickle("data/fapardf_coastline_2019-06-20.pkl") + + self.chldf_hiver = pd.read_pickle("data/chldf_2019-12-20.pkl") + self.fapardf_hiver = pd.read_pickle("data/fapardf_2019-12-20.pkl") + + self.chldf_coastline_hiver = pd.read_pickle("data/chldf_coastline_2019-12-20.pkl") + self.fapardf_coastline_hiver = pd.read_pickle("data/fapardf_coastline_2019-12-20.pkl") + + colormaps = ["viridis", "plasma", "bluered_r", "algae_r", "gray"] + + self.main_layout = html.Div(children=[ + html.H3(children='FAPAR x Chlorophylle'), + html.Br(), + html.Div([ dcc.Graph(id='chl_map'), ], style={'width':'100%',}), + html.Br(), + html.Div([ + html.Div([ html.Div('Filtrage des points'), + dcc.RadioItems(id='chl_map_mode', + options=[{'label':'Carte complète', 'value':self.NO_COASTLINE}, + {'label':'Côtes uniquement', 'value':self.COASTLINE}], + value=self.COASTLINE, + labelStyle={'display':'block'}) + ], style={'width': '12em'} ), + + html.Div([ html.Div('Période des données'), + dcc.RadioItems(id='chl_map_period', + options=[{'label':'Eté', 'value':self.SUMMER}, + {'label':'Hiver', 'value':self.WINTER}], + value=self.SUMMER, + labelStyle={'display':'block'}) + ], style={'width': '12em'} ), + + html.Div([ html.Div('Seuillage FAPAR'), + dcc.RadioItems(id='chl_map_fapar_treshold_type', + options=[{'label':'Aucun', 'value':self.NONE}, + {'label':'Supérieur à', 'value':self.GREATER}, + {'label':'Inférieur à', 'value':self.LESSER}], + value=self.NONE, + labelStyle={'display':'block'}), + dcc.Input( + id="chl_map_fapar_treshold", + type="number", + debounce=True, + placeholder="Seuil", + min = 0, max = 4 + ) + ], style={'width': '17em'} ), + + html.Div([ html.Div('Seuillage chlorophylle'), + dcc.RadioItems(id='chl_map_chl_treshold_type', + options=[{'label':'Aucun', 'value':self.NONE}, + {'label':'Supérieur à', 'value':self.GREATER}, + {'label':'Inférieur à', 'value':self.LESSER}], + value=self.NONE, + labelStyle={'display':'block'}), + dcc.Input( + id="chl_map_chl_treshold", + type="number", + debounce=True, + placeholder="Seuil", + min = 0, max = 4 + ) + ], style={'width': '17em'} ), + + + html.Div([ html.Div('Colormap FAPAR'), + dcc.Dropdown( + id='chl_map_fapar_colormap', + options=[{'label': item, 'value': item} for item in colormaps], + value="bluered_r", + clearable=False, + style={'margin' : '0px 0px 14px 0px'} + ), + + html.Div('Colormap Chlorophylle'), + dcc.Dropdown( + id='chl_map_chl_colormap', + options=[{'label': item, 'value': item} for item in colormaps], + value="viridis", + clearable=False + ), + ], style={'width': '12em'}), + + ], style={ + 'padding': '10px 50px', + 'display':'flex', + 'flexDirection':'row', + 'justifyContent':'flex-start', + }), + + html.Br(), + dcc.Markdown(""" + Le FAPAR, dérivé de l'anglais (Fraction of Absorbed Photosynthetically Active Radiation) est une variable biophysique qui est directement reliée à la productivité primaire de la végétation + + La quantité de chlorophylle présente dans l'eau (en mg/m³) est aussi une variable biophysique qui est directement reliée à la productivité primaire de la végétation marine puisqu'elle montre la quantité de phytoplancton présente dans l'eau. Ce dernier forme l'ensemble des algues microscopiques présentes dans les eaux de surface et qui se déplacent au gré des courants. + + Cette carte interactive a pour but de montrer si une corrélation existe entre la productivité primaire de la végétation terrestre par rapport à la productivité primaire de la végétation marine dans une même zone. + + En passant la souris sur les cercles colorés, on peut observer la position géographique en degrés ainsi que la productivité primaire de la végétation. + + Dans un premier temps il est possible de choisir d'observer la Carte complète ou les Côtes uniquement. + + Chaque dataset est divisé en deux saisons, été et hiver (selon l'hémisphère nord). Les données de l'été proviennent d'informations récoltées sur une tranche de 10 jours, entre le 11 juin et le 20 juin 2019. Il en est de même pour l'hiver avec une tranche située entre le 11 et le 20 décembre 2019. On peut donc choisir une période entre été et hiver pour observer les variations. + + Pour mieux observer les corrélations ou les corrélations négatives, il est possible de sélectionner un seuil pour chaque dataset. Pour cela, sélectionnez "supérieur à" ou "inférieur à" puis tapez une valeur dans le champ prévu à cet effet puis appuyez sur entrée. + + Enfin, pour chaque dataset, vous pouvez modifier la colormap parmi 5 choix pour choisir celui qui vous convient le mieux. + + ###### Notes : + * La quantité de chlorophylle dans l'eau est évaluée en moyennant les valeurs obtenues entre 0 et 15 m de profondeur, zone de vie principale du phytoplancton. + * Le choix de mettre à disposition deux tranches de 10 jours provient de la méthode de construction des données FAPAR, qui s'obtiennent toujours par tranche de 10 jours. Les données sur la chlorophylle sont quant à elles obtenues au jour le jour, une moyenne a donc été réalisée sur 10 jours pour correspondre aux données sur le FAPAR. + * On peut voir en comparant les côtes des corrélations négatives intéressantes, notamment en Namibie ou au large des pays sud-américains. + * Autour des grandes métropoles portuaires, des écosystèmes chargés en chlorophylle font leur apparition. Ce phénomène est particulièrement visible autout des villes de Honk Kong et Shanghai, mais peut aussi être observé dans une moindre mesure au large des villes portuaires francaises (Marseille par exemple). + * On voit bien l'impact de l'hiver sur l'activité végétale terrestre, notamment en observant la Sibérie ou même l'Europe de l'ouest. + * Il est intéréssant de noter la forte présence de chlorophylle dans la zone arctique et la faible présence dans la zone antarctique durant l'été, et son inversion en l'hiver. Cela est certainement dû aux quantités de lumière par jour diamétralement opposées que recoivent ces zones en fonction des saisons. + ###### Sources : + * [Copernicus Land Service](https://land.copernicus.eu/global/products/fapar) pour récupérer les données sur le FAPAR + * [Copernicus Marine Service](https://resources.marine.copernicus.eu/product-detail/GLOBAL_MULTIYEAR_BGC_001_029/INFORMATION) pour récupérer les données sur la chlorophylle + """) + ], style={ + 'backgroundColor': 'white', + 'padding': '10px 50px 10px 50px', + } + ) + + if application: + self.app = application + else: + self.app = dash.Dash(__name__) + self.app.layout = self.main_layout + + self.app.callback( + dash.dependencies.Output('chl_map', 'figure'), + [dash.dependencies.Input('chl_map_mode', 'value'), + dash.dependencies.Input('chl_map_period', 'value'), + dash.dependencies.Input('chl_map_chl_treshold_type', 'value'), + dash.dependencies.Input('chl_map_fapar_treshold_type', 'value'), + dash.dependencies.Input('chl_map_chl_treshold', 'value'), + dash.dependencies.Input('chl_map_fapar_treshold', 'value'), + dash.dependencies.Input('chl_map_chl_colormap', 'value'), + dash.dependencies.Input('chl_map_fapar_colormap', 'value')])(self.update_graph) + + + + def update_graph(self, mode, period, chl_treshold_type, fapar_treshold_type, chl_treshold, fapar_treshold, chl_colormap, fapar_colormap) : + + if (mode == self.COASTLINE): + chldf = self.chldf_coastline if period == self.SUMMER else self.chldf_coastline_hiver + fapardf = self.fapardf_coastline if period == self.SUMMER else self.fapardf_coastline_hiver + else : + chldf = self.chldf if period == self.SUMMER else self.chldf_hiver + fapardf = self.fapardf if period == self.SUMMER else self.fapardf_hiver + + + if (chl_treshold != None): + if (chl_treshold_type == self.LESSER) : + chldf = chldf.loc[chldf["chl"] < chl_treshold] + elif (chl_treshold_type == self.GREATER) : + chldf = chldf.loc[chldf["chl"] > chl_treshold] + + if (fapar_treshold != None): + if (fapar_treshold_type == self.LESSER) : + fapardf = fapardf.loc[fapardf["FAPAR"] < fapar_treshold] + elif (fapar_treshold_type == self.GREATER) : + fapardf = fapardf.loc[fapardf["FAPAR"] > fapar_treshold] + + return self.create_fig(chldf, fapardf, chl_colormap, fapar_colormap) + + +if __name__ == '__main__': + chl = Chloro() + chl.app.run_server(debug=True, port=8051) diff --git a/GCYC_chlorophylle_fapar/data/chldf_2019-06-20.pkl b/GCYC_chlorophylle_fapar/data/chldf_2019-06-20.pkl new file mode 100644 index 00000000..42088028 Binary files /dev/null and b/GCYC_chlorophylle_fapar/data/chldf_2019-06-20.pkl differ diff --git a/GCYC_chlorophylle_fapar/data/chldf_2019-12-20.pkl b/GCYC_chlorophylle_fapar/data/chldf_2019-12-20.pkl new file mode 100644 index 00000000..e76d95a7 Binary files /dev/null and b/GCYC_chlorophylle_fapar/data/chldf_2019-12-20.pkl differ diff --git a/GCYC_chlorophylle_fapar/data/chldf_coastline_2019-06-20.pkl b/GCYC_chlorophylle_fapar/data/chldf_coastline_2019-06-20.pkl new file mode 100644 index 00000000..685537a9 Binary files /dev/null and b/GCYC_chlorophylle_fapar/data/chldf_coastline_2019-06-20.pkl differ diff --git a/GCYC_chlorophylle_fapar/data/chldf_coastline_2019-12-20.pkl b/GCYC_chlorophylle_fapar/data/chldf_coastline_2019-12-20.pkl new file mode 100644 index 00000000..07bb6b97 Binary files /dev/null and b/GCYC_chlorophylle_fapar/data/chldf_coastline_2019-12-20.pkl differ diff --git a/GCYC_chlorophylle_fapar/data/fapardf_2019-06-20.pkl b/GCYC_chlorophylle_fapar/data/fapardf_2019-06-20.pkl new file mode 100644 index 00000000..ad67a237 Binary files /dev/null and b/GCYC_chlorophylle_fapar/data/fapardf_2019-06-20.pkl differ diff --git a/GCYC_chlorophylle_fapar/data/fapardf_2019-12-20.pkl b/GCYC_chlorophylle_fapar/data/fapardf_2019-12-20.pkl new file mode 100644 index 00000000..5936393f Binary files /dev/null and b/GCYC_chlorophylle_fapar/data/fapardf_2019-12-20.pkl differ diff --git a/GCYC_chlorophylle_fapar/data/fapardf_coastline_2019-06-20.pkl b/GCYC_chlorophylle_fapar/data/fapardf_coastline_2019-06-20.pkl new file mode 100644 index 00000000..399a895b Binary files /dev/null and b/GCYC_chlorophylle_fapar/data/fapardf_coastline_2019-06-20.pkl differ diff --git a/GCYC_chlorophylle_fapar/data/fapardf_coastline_2019-12-20.pkl b/GCYC_chlorophylle_fapar/data/fapardf_coastline_2019-12-20.pkl new file mode 100644 index 00000000..6be841b7 Binary files /dev/null and b/GCYC_chlorophylle_fapar/data/fapardf_coastline_2019-12-20.pkl differ diff --git a/GCYC_chlorophylle_fapar/data/get_data_chloro.ipy b/GCYC_chlorophylle_fapar/data/get_data_chloro.ipy new file mode 100755 index 00000000..3ca60bbe --- /dev/null +++ b/GCYC_chlorophylle_fapar/data/get_data_chloro.ipy @@ -0,0 +1,94 @@ +#!/usr/bin/env ipython + +import xarray as xr +import numpy as np + + + +# This function returns True if at least one point in the selected dataframe is close enough to selected coordinates +def is_neighboring(df, lat, lon, max_dist): + close = df.loc[np.sqrt((df["latbin"]- lat)**2 + (df["lonbin"] - lon)**2) <= max_dist] + return close.shape[0] > 0 + + + +#dist will define minimum distance for a point to be consired coastline +dist = 3 + +#step will define latitude & longitude step at which we regroup data points +step = 0.5 + +to_bin = lambda x: np.floor(x / step) * step + +def build_dataframes(chlnc, faparnc, startdate, enddate): + + print("- building whole map dataframes ...") + dset = xr.open_dataset(chlnc) + chl = dset['chl'] + chl= chl.sel(time=slice(startdate, enddate)) + + dset2 = xr.open_dataset(faparnc) + fapar = dset2[["FAPAR"]] + #fapar datasets are overly huge, we begin by selecting one in ten data point by coordinate before any other operation + fapar = fapar.isel(time = [0], lat = [i for i in range (0, 15680, 5)], lon = [i for i in range (0, 40320, 5)]) + + + chldf = chl.to_dataframe() + chldf = chldf[np.isfinite(chldf['chl'])] + chldf["latbin"] = chldf.index.get_level_values('latitude').map(to_bin) + chldf["lonbin"] = chldf.index.get_level_values('longitude').map(to_bin) + chldf = chldf.groupby(['latbin', 'lonbin'], as_index=False).mean() + + fapardf = fapar.to_dataframe() + fapardf = fapardf[np.isfinite(fapardf['FAPAR'])] + fapardf["latbin"] = fapardf.index.get_level_values('lat').map(to_bin) + fapardf["lonbin"] = fapardf.index.get_level_values('lon').map(to_bin) + fapardf = fapardf.groupby(['latbin', 'lonbin'], as_index=False).mean() + + #We group data points by their latbin and lonbin coordinates, + #which are latitude ang longitude rounded to "step" + + chldf['coordinates'] = list(zip(chldf.latbin, chldf.lonbin)) + fapardf['coordinates'] = list(zip(fapardf.latbin, fapardf.lonbin)) + fapardf = fapardf[~fapardf['coordinates'].isin(chldf['coordinates'])] + fapardf = fapardf.reset_index(drop=True) + + #on coordinates where we have both info, we only keep chlorophyll information + #this is beacause while chlorophyll data points are only available on oceanic points, + #fapar data points are available everywhere, even though it is not relevant on oceanic points + + print("- building coastline dataframes ...") + + chldf_c=chldf + + chldf_c["neighbor"] = [is_neighboring(fapardf, chldf_c["latbin"][i], chldf_c["lonbin"][i], dist) for i in range(chldf_c.shape[0])] + + chldf_c = chldf_c[chldf_c["neighbor"]] + + fapardf_c=fapardf + + fapardf_c["neighbor"] = [is_neighboring(chldf_c, fapardf_c["latbin"][i], fapardf_c["lonbin"][i], dist) for i in range(fapardf_c.shape[0])] + fapardf_c = fapardf_c[fapardf_c["neighbor"]] + + #we create a new dataframe containing only chlorophyll data points less than "dist" degrees away from FAPAR data points + #and we do the same for fapar + #this is to create dataframes containing only points close to coastlines + + print("- exporting pickles...") + + + chldf.to_pickle("chldf_" + enddate + ".pkl") + fapardf.to_pickle("fapardf_" + enddate + ".pkl") + + chldf_c.to_pickle("chldf_coastline_" + enddate + ".pkl") + fapardf_c.to_pickle("fapardf_coastline_" + enddate + ".pkl") + #Finally we export the data + + +print("Building summer dataframes :") +build_dataframes("CHL_summer.nc", "FAPAR_summer.nc", "2019-06-11", "2019-06-20") +print("Building winter dataframes :") +build_dataframes("CHL_winter.nc", "FAPAR_winter.nc", "2019-12-11", "2019-12-20") +print("Creating symbolic links") +!ln -f -sr ./*.pkl ../../data +print("Done !") \ No newline at end of file diff --git a/data/chldf_2019-06-20.pkl b/data/chldf_2019-06-20.pkl new file mode 120000 index 00000000..f1673b1e --- /dev/null +++ b/data/chldf_2019-06-20.pkl @@ -0,0 +1 @@ +../GCYC_chlorophylle_fapar/data/chldf_2019-06-20.pkl \ No newline at end of file diff --git a/data/chldf_2019-12-20.pkl b/data/chldf_2019-12-20.pkl new file mode 120000 index 00000000..6becda35 --- /dev/null +++ b/data/chldf_2019-12-20.pkl @@ -0,0 +1 @@ +../GCYC_chlorophylle_fapar/data/chldf_2019-12-20.pkl \ No newline at end of file diff --git a/data/chldf_coastline_2019-06-20.pkl b/data/chldf_coastline_2019-06-20.pkl new file mode 120000 index 00000000..92ad1121 --- /dev/null +++ b/data/chldf_coastline_2019-06-20.pkl @@ -0,0 +1 @@ +../GCYC_chlorophylle_fapar/data/chldf_coastline_2019-06-20.pkl \ No newline at end of file diff --git a/data/chldf_coastline_2019-12-20.pkl b/data/chldf_coastline_2019-12-20.pkl new file mode 120000 index 00000000..f5634584 --- /dev/null +++ b/data/chldf_coastline_2019-12-20.pkl @@ -0,0 +1 @@ +../GCYC_chlorophylle_fapar/data/chldf_coastline_2019-12-20.pkl \ No newline at end of file diff --git a/data/fapardf_2019-06-20.pkl b/data/fapardf_2019-06-20.pkl new file mode 120000 index 00000000..5c202e09 --- /dev/null +++ b/data/fapardf_2019-06-20.pkl @@ -0,0 +1 @@ +../GCYC_chlorophylle_fapar/data/fapardf_2019-06-20.pkl \ No newline at end of file diff --git a/data/fapardf_2019-12-20.pkl b/data/fapardf_2019-12-20.pkl new file mode 120000 index 00000000..aa9f42d5 --- /dev/null +++ b/data/fapardf_2019-12-20.pkl @@ -0,0 +1 @@ +../GCYC_chlorophylle_fapar/data/fapardf_2019-12-20.pkl \ No newline at end of file diff --git a/data/fapardf_coastline_2019-06-20.pkl b/data/fapardf_coastline_2019-06-20.pkl new file mode 120000 index 00000000..7f44b60c --- /dev/null +++ b/data/fapardf_coastline_2019-06-20.pkl @@ -0,0 +1 @@ +../GCYC_chlorophylle_fapar/data/fapardf_coastline_2019-06-20.pkl \ No newline at end of file diff --git a/data/fapardf_coastline_2019-12-20.pkl b/data/fapardf_coastline_2019-12-20.pkl new file mode 120000 index 00000000..46dd27a7 --- /dev/null +++ b/data/fapardf_coastline_2019-12-20.pkl @@ -0,0 +1 @@ +../GCYC_chlorophylle_fapar/data/fapardf_coastline_2019-12-20.pkl \ No newline at end of file diff --git a/delta.py b/delta.py index 5fe72539..b9d43974 100644 --- a/delta.py +++ b/delta.py @@ -7,6 +7,8 @@ from energies import energies from population import population from deces import deces + +from GCYC_chlorophylle_fapar import chloro from MC_AB_consommationEtProductionEnergétique import petrole from SG_AH_pollution_des_transports import pollution from pbmc_accidents_routiers import pbmc_accidents_routiers as pbmc @@ -62,6 +64,7 @@ from ADHD_Movies import movies from ab_wg_apb_parcoursup import apb_parcoursup + #@profile def init(): app = dash.Dash(__name__, title="Delta", suppress_callback_exceptions=True) # , external_stylesheets=external_stylesheets) @@ -121,6 +124,7 @@ def init(): crim_edu = criminalite_education.Criminalite_Education(app) mvs = movies.MoviesStats(app) apb = apb_parcoursup.APB_PARCOURSUP(app) + chl = chloro.Chloro(app) # external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] @@ -187,7 +191,8 @@ def init(): dcc.Link(html.Button('Formations supérieur', style={'width': "100%"}), href='/formations'), dcc.Link(html.Button("Criminalité et Education", style={"width": "100%"}), href="/criminalite-education"), dcc.Link(html.Button('Rentabilité des films', style={'width':"100%"}), href='/ADHD_Movies'), - dcc.Link( html.Button("APB / Parcoursup", style={"width": "100%"}), href="/ab-wg_apb-parcoursup",), + dcc.Link( html.Button("APB / Parcoursup", style={"width": "100%"}), href="/ab-wg_apb-parcoursup"), + dcc.Link(html.Button('FAPAR x Chlorophylle', style={'width':"100%"}), href='/chloro'), html.Br(), html.Br(), html.Br(), @@ -335,6 +340,8 @@ def display_page(pathname): return mvs.main_layout elif pathname == "/ab-wg_apb-parcoursup": return apb.main_layout + elif pathname == '/chloro': + return chl.main_layout else: return home_page return app