1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Data Visualization with Plotly in Python

Connected

Exercise

Rainfall by season slider

The Australian Bureau of Meteorology has contracted you for some follow-up work on the visualization they loved on rainfall per month in Sydney.

They would love the ability to cycle through seasons. Not as a change-between as in buttons and dropdowns, but more of a slide-between.

Sounds like the perfect job for a slider!

In this exercise, you are tasked with creating a bar chart of the rainfall data with a slider through the seasons.

You have a rain_pm DataFrame available.

Instructions

100 XP
  • Label each slider step using the correct season, in the order they were looped.
  • Set trace visibility for each slider step to show only the correct season.
  • Add the slider to the figure layout.