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

Connected

Exercise

Growth locations dropdown

The Australian Government wants to understand which Local Government Areas (LGAs) have had recent strong population growth to assist in planning infrastructure projects.

They have provided you with some data on the top 5 LGAs by the percentage of population increase (from 2018 to 2019) and have asked if you can visualize it. However, they want to be able to select a certain state or see everything at once.

In this exercise, you are tasked with creating a bar chart of this data with a drop-down menu to switch between different states and see all states at once.

You have a pop_growth DataFrame available, and a go.Figure() object will be set up for you.

Instructions 1/2

undefined XP
    1
    2
  • Create a list of the buttons for your dropdown menu that will update the trace visibility to be either ALL, NSW, QLD, or VIC.