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 e4bfe2b8 authored by Samuël Weber's avatar Samuël Weber
Browse files

do not skip missing particle size

parent ef86c346
......@@ -51,6 +51,7 @@ sqlquery = "SELECT DISTINCT Station FROM\
sqlquery_hasOP = "SELECT DISTINCT Station FROM values_all WHERE OP_AA_m3 IS NOT NULL";
list_station = pd.read_sql(sqlquery, con=conn)["Station"].tolist()
list_station_OP = pd.read_sql(sqlquery_hasOP, con=conn)["Station"].tolist()
print(list_station)
conn.close()
# ==== END STATION LIST =======================================================
......@@ -205,6 +206,8 @@ def set_station_option(nbsample, options):
df = pd.read_sql(sql_query, con=conn)
conn.close()
df = df.loc[df["nsamples"] > nbsample]
if None in df["Particle_size"].unique():
df["Particle_size"] = df["Particle_size"].fillna("?")
df = df.loc[df["Particle_size"].isin(PMfraction)]
station_dropdown = [
......@@ -380,6 +383,8 @@ def update_datatable(stations, species, sources, options, years_range):
if len(species) >= 1:
sp = utilities.get_values(table="values_all", cols=species, where="Station", isin=stations,
base_var=BASE_VAR_SP)
if None in sp["Particle_size"].unique():
sp["Particle_size"] = sp["Particle_size"].fillna("?")
sp = sp.loc[sp["Particle_size"].isin(PMfraction)]
else:
sp = pd.DataFrame(columns=BASE_VAR_SP)
......
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