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 over the last five years for several key Sydney suburbs. Your work will supplement the qualitative analysis on 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 having great growth so want to annotate only that trace. You accept the challenge!

You have a house_prices DataFrame available.

Instructions 1/3

undefined XP
    1
    2
    3
  • Create a basic figure object using plotly.graph_objects (imported as go).
  • Loop through the DataFrame to subset by state and add a line chart for each suburb of Year (x-axis) vs Median House Price (y-axis).