I am trying to create a choropleth map to visualize each continent's total pageviews from dataframe but plotly library function'S locationmode parameter does not have it.Is there any way to solve this problem ? When I use the 'country names' for the locationmode it does not work.
st.subheader("Continent's Total Pageviews Choropleth Map")
fig2 = go.Figure(data= go.Choropleth(
locations= df1['continent'],
z = df1['total_pageviews'].astype(float),
locationmode = 'country names',
colorscale = 'Reds',
colorbar_title = "Total Pageviews",
))
fig2.update_layout( width = 1100 , height = 500 )
st.write(fig2)