Using a slider with a Choropleth Map and the data is not appearing sequentially

hi @dustinmwest,

I wonder if this is a good use case for the new plotly_express library. See https://www.plotly.express/. This is a high-level API on top of plotly.py that greatly simplifies many plot types, including those with sliders/animations.

Hereโ€™s an example from the docs

import plotly_express as px
gapminder = px.data.gapminder()
px.choropleth(gapminder, locations="iso_alpha", color="lifeExp", hover_name="country", animation_frame="year",
             color_continuous_scale=px.colors.sequential.Plasma)

You would want to set scope = 'usa' as an argument to px.choropleth, but otherwise I think has a pretty similar structure to what youโ€™re looking for.

-Jon

1 Like