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

Connected

Exercise

Time buttons on our rainfall graph

The local news station wants to update the graphics in the weather section of its website. They have contacted you to assist in jazzing up the old images and tables they have.

They have requested a line chart, but with the ability to filter the data for the last 4 weeks (4WTD), the previous 48 hours (48HR), and the year to date (YTD).

In this exercise, you will help the news station build its line chart with the requested buttons.

You have a rain DataFrame available that contains the necessary data.

Instructions

100 XP
  • Create the list of buttons specified with the names noted above.
  • Update the figure using update_layout() to construct buttons using the list you just created.