import pandas as pd
= 'states.json'
us_states_geojson = pd.read_csv('df_grouped.csv') df_grouped
US Dashboard
import folium
from folium.plugins import MarkerCluster
= folium.Map(location=[40, -95], zoom_start=4, tiles='CartoDB Dark_Matter')
m
folium.GeoJson(
us_states_geojson,='geojson'
name
).add_to(m)
= MarkerCluster().add_to(m)
marker_cluster
for index, row in df_grouped.iterrows():
folium.Marker(=[row['LATITUDE'], row['LONGITUDE']],
location=f"State: {row['STATE']}\nFire Size: {row['FIRE_SIZE']:.2f}",
popup=None,
icon
).add_to(marker_cluster)
'wildfires_map.html')
m.save(
m
Make this Notebook Trusted to load map: File -> Trust Notebook