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

Connected

Exercise

Housing prices dropdown

You are working as a data analyst for a real estate investing firm. The firm has asked you to help them understand property price returns for several key Sydney suburbs over the last five years. Your work will supplement the qualitative analysis of these suburbs. They want to be able to visualize each suburb by itself but easily switch between them.

They have provided you with some data on the prices of these suburbs in 2015 and 2020.

In this exercise, you are tasked with creating a line chart of this data with a dropdown to select each suburb. Additionally, they have identified that one of the suburbs is experiencing great growth, so you want to annotate only that trace. You accept the challenge!

You have a house_prices 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 that will update the trace visibility to Greenacre, or Lakemba.
  • Add the ga_annotation to the Greenacre dropdown.