Actually, Iām plotting a map like this:
fig1 = px.choropleth_mapbox(
df, geojson=counties, locations='col1', color='col2',
color_continuous_scale="blues",
range_color=(df.col1.min(), df.col2.max() ), mapbox_style="carto-positron",
zoom=2, center={"lat": 37.0902, "lon": -95.7129},
opacity=0.5)
And it works! But i want to to add another scatter data on the same map, i had tried this:
fig2 = px.choropleth_mapbox(
df2, geojson=counties, locations='col1', color='col2',
color_continuous_scale="reds",
range_color=(df2.col1.min(), df2.col2.max() ), mapbox_style="carto-positron",
zoom=2, center={"lat": 37.0902, "lon": -95.7129},
opacity=0.5)
final_fig = fig1.add_trace(fig2.data[0])
But it only plot fig1 data on the map.