Hi
I’m new to Plotly and am looking for a way to superimpose a Scattermapbox onto a US Choropleth.
By themselves, both of these chart types are on the plotly site.
Is there an example (or method) to superimpose one on the other?
In my case, the Choropleth shows revenue per county by color. The scattermapbox shows lat/lon/info of each sale.
For the next revision, Id like to show income by by US county based (somewhat) from: https://plot.ly/python/county-level-choropleth/. I’d be using a US counties shape file for this… maybe a little manipulation in Geopandas which I’m also learning
I’m pretty new at this. Any nudge in the right direction is appreciated. Building the groupby in python pandas is no problem I’m just trying to figure out how to plot it.
Is the solution format like this? Where the first is a Choropleth and the second is a Scattermapbox?
data = Data([
Scattermapbox(
lat=site_lat,
lon=site_lon,
mode=‘markers’,
marker=Marker(
size=17,
color=colors,
opacity=0.7
),
text=locations_name,
hoverinfo=‘text’,
showlegend=False
),
Scattermapbox(
lat=site_lat,
lon=site_lon,
mode=‘markers’,
marker=Marker(
size=8,
color=‘rgb(242, 177, 172)’,
opacity=0.7
),
hoverinfo=‘skip’,
showlegend=False
)
])