'Adding points to pyplot choropeth map
I have created a choropleth map in python with pyplot on US census data. Now I want to add points to this map denoting the location of towns using longitude and latitude. My code below successfully renders the choropleth but not the points on top
fig1 = px.choropleth(population, locations=population['StateAbbr'], locationmode='USA-states',
color='per1910',color_continuous_scale='inferno',
range_color=(0, .15),scope='usa',labels={'StateAbbr':'per1910'},hover_name='StateAbbr',)
go.Figure(data=go.Scattergeo(
lon = champs['Lon'],
lat = champs['Lat'],
text = champs['School'],
mode = 'markers',
marker_color = 'blue',
))
fig1.update_layout(title_text = 'Census: 1910 Championships: 1872-1915')
fig1.show()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

