Hello,
I followed the example to render a map and datas using choropleth_mapbox. I am using geojson and a dataframe but the datas aren’t shown…
Here is my code:
`with open(state_geo,‘r’) as f:
geo = json.load(f)
print(df.head(2))
fig = px.choropleth_mapbox(df, geojson=geo, color=“suicides_total”,
locations=“lad_name”, featureidkey=“properties.LAD name”,
center={“lat”: 53.5517, “lon”: -0.14073},
mapbox_style=“carto-positron”, zoom=6)
fig.update_layout(margin={“r”:0,“t”:0,“l”:0,“b”:0})
fig.show() `
and here is the results:
with json file :
and dataframe:
Any help would be appreciate,
thanks!