1
#ChoroplethMap

bins = list(state_avg_value["price"].quantile([0, 0.25, 0.5, 0.75, 1]))
#state_avg_value_max= state_avg_value['price'].max()

m = folium.Map(location=[48, -102], zoom_start=3)

folium.Choropleth(
    geo_data=state_geo,
data=state_avg_value,
    columns=["state", "price"],
    key_on="feature.properties.name",
    fill_color="BuPu",
    fill_opacity=0.7,
    line_opacity=0.5,
    legend_name="Price (in dollars)",
    bins=bins,
    reset=True,
).add_to(m)

m

#Q. How to remove the overlapping in threshold_scale?

#[ChoroplethMap][1]

#[1]: https://i.stack.imgur.com/Xi4A6.jpg

0 Answers0