Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,6 +32,14 @@ m = folium.Map(location=(filtered_data['latitude'].mean(), filtered_data['longit
|
|
| 32 |
for index, row in filtered_data.iterrows():
|
| 33 |
folium.Marker([row['latitude'], row['longitude']], popup=row['Name']).add_to(m)
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
# Render the map
|
| 37 |
folium_static(m)
|
|
|
|
| 32 |
for index, row in filtered_data.iterrows():
|
| 33 |
folium.Marker([row['latitude'], row['longitude']], popup=row['Name']).add_to(m)
|
| 34 |
|
| 35 |
+
polygon_coords = [ [np.random.uniform(40.7, 40.8, size=5)[i], np.random.uniform(-74.0, -73.9, size=5)[i]] for i in range(5)]
|
| 36 |
+
|
| 37 |
+
# Create a polygon object
|
| 38 |
+
polygon = folium.Polygon(locations=polygon_coords, color='blue', fill=True, fill_color='blue', fill_opacity=0.3)
|
| 39 |
+
|
| 40 |
+
# Add the polygon to the map
|
| 41 |
+
m.add_child(polygon)
|
| 42 |
+
|
| 43 |
|
| 44 |
# Render the map
|
| 45 |
folium_static(m)
|