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

replace abbreviation by abbrv

parent acf4994d
......@@ -41,7 +41,7 @@ df = pd.read_sql(
connOP
)
df["Date"] = pd.to_datetime(df["Date"])
dfmap = pd.read_sql('SELECT * FROM metadata_station WHERE abbreviation IN ("{}");'.format(
dfmap = pd.read_sql('SELECT * FROM metadata_station WHERE abbrv IN ("{}");'.format(
'", "'.join(STATION_OP),
), conn)
connOP.close()
......@@ -204,13 +204,13 @@ def update_map_station_selected(stations, figure):
# unchanged.
data = sc.get_map_data(list_station, SELECTEDSTATION)
# idx = dfmap.abbreviation.isin(SELECTEDSTATION)
# idx = dfmap.abbrv.isin(SELECTEDSTATION)
# data.append(
# dict(
# type = 'scattergeo',
# lon = dfmap.loc[idx,"longitude"],
# lat = dfmap.loc[idx,"latitude"],
# text = dfmap.loc[idx,"abbreviation"],
# text = dfmap.loc[idx,"abbrv"],
# name = ""
# )
# )
......
......@@ -318,13 +318,13 @@ def update_map_station_selected(stations, figure):
# unchanged.
data = sc.get_map_data(list_station, SELECTEDSTATION)
# idx = dfmap.abbreviation.isin(SELECTEDSTATION)
# idx = dfmap.abbrv.isin(SELECTEDSTATION)
# data.append(
# dict(
# type = 'scattergeo',
# lon = dfmap.loc[idx,"longitude"],
# lat = dfmap.loc[idx,"latitude"],
# text = dfmap.loc[idx,"abbreviation"],
# text = dfmap.loc[idx,"abbrv"],
# name = ""
# )
# )
......
......@@ -25,7 +25,7 @@ def get_map_data(dfmap):
type= 'scattergeo',
lon=dfmap['longitude'],
lat=dfmap['latitude'],
text=dfmap['abbreviation'],
text=dfmap['abbrv'],
mode = 'markers',
name = ''
)
......
......@@ -28,7 +28,7 @@ STATION_DEMO = ["Chamonix", "Marnaz", "Passy"]
# =============================================================================
conn = sqlite3.connect(settings.BDDPM) # BDDPM must be defined in local_settings.py
df = pd.read_sql('SELECT Date FROM `values_all`;', conn, parse_dates=["Date"])
dfmap = pd.read_sql('SELECT * FROM metadata_station WHERE abbreviation IN ("{}");'.format(
dfmap = pd.read_sql('SELECT * FROM metadata_station WHERE abbrv IN ("{}");'.format(
'", "'.join(STATION_DEMO),
), conn)
conn.close()
......@@ -321,13 +321,13 @@ def update_map_station_selected(stations, figure):
# unchanged.
data = sc.get_map_data(list_station, SELECTEDSTATION)
# idx = dfmap.abbreviation.isin(SELECTEDSTATION)
# idx = dfmap.abbrv.isin(SELECTEDSTATION)
# data.append(
# dict(
# type = 'scattergeo',
# lon = dfmap.loc[idx,"longitude"],
# lat = dfmap.loc[idx,"latitude"],
# text = dfmap.loc[idx,"abbreviation"],
# text = dfmap.loc[idx,"abbrv"],
# name = ""
# )
# )
......@@ -951,13 +951,13 @@ if __name__ == '__main__':
# # unchanged.
#
# data = sc.get_map_data(list_station, SELECTEDSTATION)
# # idx = dfmap.abbreviation.isin(SELECTEDSTATION)
# # idx = dfmap.abbrv.isin(SELECTEDSTATION)
# # data.append(
# # dict(
# # type = 'scattergeo',
# # lon = dfmap.loc[idx,"longitude"],
# # lat = dfmap.loc[idx,"latitude"],
# # text = dfmap.loc[idx,"abbreviation"],
# # text = dfmap.loc[idx,"abbrv"],
# # name = ""
# # )
# # )
......
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