Josephina commited on
Commit
4fea262
·
1 Parent(s): e1736b0

map update check

Browse files
Files changed (1) hide show
  1. app.py +8 -11
app.py CHANGED
@@ -151,25 +151,22 @@ fig = go.Figure(
151
  fig.update_layout(margin=dict(t=50, l=25, r=25, b=25))
152
  fig.update_layout(height=1000, width=1000, template="plotly")
153
 
154
- # # load data ready to plot for local testing
155
- # germany = pd.read_csv(MAP_PATH)
156
  # germany.drop(columns=["lat", "lon"], inplace=True)
 
157
  # # or generate it directly in this script
158
- map_data = load_data()
159
- map_data = merge_geoemtry(map_data, pd.read_csv(filepath_or_buffer=CITIES_ENRICHED))
160
- # print(
161
- # map_data["Geometry"].iloc[0].strip("[]").split(),
162
- # type(map_data["Geometry"].iloc[0].strip("[]").split()),
163
- # )
164
- germany = add_coor(map_data)
165
- germany.to_csv(MAP_PATH_WITH_COORD, index=False)
166
 
167
  # # germany need columns with lat and lon as well as hover data
168
  fig_map = px.scatter_mapbox(
169
  germany,
170
  lat="lat",
171
  lon="lon",
172
- hover_name="ORG",
173
  custom_data=["Count"],
174
  # color_discrete_map=["magenta"],
175
  zoom=5,
 
151
  fig.update_layout(margin=dict(t=50, l=25, r=25, b=25))
152
  fig.update_layout(height=1000, width=1000, template="plotly")
153
 
154
+ # load data ready to plot for local testing
155
+ germany = pd.read_csv(MAP_PATH)
156
  # germany.drop(columns=["lat", "lon"], inplace=True)
157
+
158
  # # or generate it directly in this script
159
+ # map_data = load_data()
160
+ # map_data = merge_geoemtry(map_data, pd.read_csv(filepath_or_buffer=CITIES_ENRICHED))
161
+ # germany = add_coor(map_data)
162
+ # germany.to_csv(MAP_PATH_WITH_COORD, index=False)
 
 
 
 
163
 
164
  # # germany need columns with lat and lon as well as hover data
165
  fig_map = px.scatter_mapbox(
166
  germany,
167
  lat="lat",
168
  lon="lon",
169
+ hover_name="Kommune",
170
  custom_data=["Count"],
171
  # color_discrete_map=["magenta"],
172
  zoom=5,