Skip to content

Instantly share code, notes, and snippets.

@amitrani6
Created June 15, 2022 03:27
Show Gist options
  • Save amitrani6/3d3dd4058fcf9f9033622627e14bdb72 to your computer and use it in GitHub Desktop.
Save amitrani6/3d3dd4058fcf9f9033622627e14bdb72 to your computer and use it in GitHub Desktop.
m = folium.Map(location=[48, -102], zoom_start=3)
folium.Choropleth(
geo_data=us_data_gdf,
name="choropleth",
data=us_data_gdf,
columns= ["GEOID","Total_Pop_2021"],
key_on="feature.properties.GEOID",
fill_color="YlGn",
fill_opacity=0.7,
line_opacity=0.2,
legend_name="Total Population By State, 2021").add_to(m)
folium.LayerControl().add_to(m)
# Display the Choropleth
m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment