I am able to generate the choropleth map using go.Choroplethmapbox
in jupyter notebook. But when I try this in dash app, I am getting nothin. I am updating graph through call back. Please help me to get the choropleth map. Call back code is given below:
@app.callback(
Output('example-graph', 'figure'),
[Input('zoom','value')])
def update_fig(z_value):
fig = go.Figure([go.Choroplethmapbox(geojson=j_file, locations=df.area_code, z=df.total_count,
colorscale="Viridis", zmin=0, zmax=150,
marker_opacity=0.5, marker_line_width=0)])
fig.update_layout(mapbox_style="basic",
mapbox_accesstoken=mapbox_access_token,
mapbox_zoom=z_value, mapbox_center = {"lat":52.480271148513935, "lon":-1.90887451171875})
#fig.update_layout(margin={"r":0,"t":0,"l":0,"b":0})
return fig