Many time series
How did the housing price index change from 2000 to 2017 in the United States? To begin answering this question, your task is to create a line chart representing the housing price index for each state over this time period.
Once you have created this plot, be sure to consider how easy or hard it is to interact with. Specifically, how easy is it to select a single state's trajectory?
plotly, dplyr, and the us_economy data set have already been loaded.
Deze oefening maakt deel uit van de cursus
Intermediate Interactive Data Visualization with plotly in R
Oefeninstructies
- Filter out the data from
2000onward. - Next, group the data by
state. - Finally, create a time series plot displaying how the housing price index (
house_price) has changed over time (year).
Praktische interactieve oefening
Probeer deze oefening eens door deze voorbeeldcode in te vullen.
# Create a line chart of house_price over time by state
us_economy %>%
___(___ >= ___) %>%
___(___) %>%
___(x = ___, y = ___) %>%
___()