Exercise

Adding a slider

A slider filter allows you to easily update the data values plotted by restricting a numeric variable to a specific range. In this exercise, your task is to include two slider filters for the scatterplot of the housing price index against homeownership in 2017: one for each axis.

plotly and crosstalk have already been loaded for you, and the data are stored in us2017.

Note: You may need to scroll down on or pop out the HTML Viewer to see the sliders.

Instructions

100 XP
  • Place two slider filters below the scatterplot stored in p17. The first slider should correspond to the housing price index (house_price), and the second slider should correspond to the percentage of home ownership (home_owners).
  • Add slider labels that match the axis titles in p17, "HPI" and "Home ownership (%)".