fschwartzer commited on
Commit
8c758a4
1 Parent(s): f7da8b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -14,7 +14,7 @@ def add_heatmap_layer(map_obj, filtered_data, column_name, colormap_name, radius
14
  heat_data = filtered_data[['latitude', 'longitude', column_name]].dropna()
15
  heat_layer = folium.FeatureGroup(name=f'Heatmap - {column_name}')
16
 
17
- cmap = LinearColormap(colors=['blue', 'white', 'red'], vmin=heat_data[column_name].min(), vmax=heat_data[column_name].max())
18
 
19
  for index, row in heat_data.iterrows():
20
  folium.CircleMarker(
@@ -97,7 +97,7 @@ radius_in_meters = 150000
97
  filtered_data = data # Initialize with the entire dataset
98
 
99
  # Calculate a zoom level based on the maximum distance
100
- zoom_level = 14
101
 
102
  # Set font to 'Quicksand' for title_html
103
  title_html = """
@@ -267,7 +267,7 @@ with st.container():
267
  folium.LayerControl().add_to(folium_layermap)
268
 
269
  # Display the map using st_folium
270
- st_folium(folium_layermap, width=600, height=300)
271
 
272
  k_threshold = 5
273
 
 
14
  heat_data = filtered_data[['latitude', 'longitude', column_name]].dropna()
15
  heat_layer = folium.FeatureGroup(name=f'Heatmap - {column_name}')
16
 
17
+ cmap = LinearColormap(colors=['#9e0142','#d53e4f','#f46d43','#fdae61','#fee08b','#ffffbf','#e6f598','#abdda4','#66c2a5','#3288bd','#5e4fa2'], vmin=heat_data[column_name].min(), vmax=heat_data[column_name].max())
18
 
19
  for index, row in heat_data.iterrows():
20
  folium.CircleMarker(
 
97
  filtered_data = data # Initialize with the entire dataset
98
 
99
  # Calculate a zoom level based on the maximum distance
100
+ zoom_level = 13
101
 
102
  # Set font to 'Quicksand' for title_html
103
  title_html = """
 
267
  folium.LayerControl().add_to(folium_layermap)
268
 
269
  # Display the map using st_folium
270
+ st_folium(folium_layermap, width=900, height=350)
271
 
272
  k_threshold = 5
273