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

fix

parent 6482e4ec
......@@ -23,7 +23,7 @@ from .app_components import SharedComponent
sc = SharedComponent()
STATION_DEMO = ["Chamonix",]
STATION_DEMO = ["Le Havre", "Dieppe-Ailly", "Arrest", "Calais"]
# =============================================================================
conn = sqlite3.connect(settings.BDDPM) # BDDPM must be defined in local_settings.py
......@@ -79,7 +79,7 @@ external_css = [
"/static/css/apps.css",
]
app = DjangoDash("app_atmo",
app = DjangoDash("app_Littoral",
external_stylesheets=external_css,
)
......
......@@ -134,7 +134,7 @@ class SharedComponent():
"""
con = sqlite3.connect(settings.BDDPM)
dfmap = pd.read_sql(
"SELECT * FROM metadata_station WHERE abbrv in ('{stations}');".format(
"SELECT * FROM metadata_station WHERE abbrv in ('{stations}') OR name IN ('{stations}');".format(
stations="', '".join(stations)
),
con=con
......@@ -161,7 +161,7 @@ class SharedComponent():
type='scattergeo',
lon=dfmap.loc[:, 'longitude'],
lat=dfmap.loc[:, 'latitude'],
text=dfmap.loc[:, 'abbrv'],
text=dfmap.loc[:, 'name'],
mode='markers',
name='',
marker=dict(
......@@ -262,12 +262,13 @@ class SharedComponent():
def get_map_figure(self, stations, selected=None):
con = sqlite3.connect(settings.BDDPM)
dfmap = pd.read_sql(
"SELECT * FROM metadata_station WHERE abbrv in ('{stations}');".format(
"SELECT * FROM metadata_station WHERE abbrv in ('{stations}') OR name in ('{stations}');".format(
stations="', '".join(stations)
),
con=con
)
con.close()
print(dfmap)
markers_typo = {
"urban": "square",
......
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