Announcing Dash Bio 1.0.0 🎉 : a one-stop-shop for bioinformatics and drug development visualizations.

Plotting a geopandas dataframe using plotly

I have a geopandas dataframe and I am trying to plot a choropleth map using the method mentioned below

Here’s a snippet of my dataframe
snip

And here is the code I used

fig = px.choropleth(merged,

                   geojson=merged.geometry,

                   locations=merged.index,

                   color="Amount")

fig.update_geos(fitbounds="locations", visible=False)

fig.show()

It produced the below figure

which is obviously not the right figure.

The Plotly version I am using is 4.7.0. I have tried upgrading to a most recent version but it still didn’t work.

Any help is greatly appreciated. For the full code, please see here.