Exercise

Arranging views with bscols()

The bscols() function provides a flexible framework to combine HTML widgets, like plotly charts, using the Bootstrap column layout. Recall that in this system, there are 12 columns to distribute content over. Before adding different selectors, it's important to understand how to arrange content created using bscols().

plotly and crosstalk have been loaded for you, and the object p97, p07, and p17 are scatterplots of HPI against the percentage of homeowners in each state for the years 1997, 2007, and 2017, respectively.

Instructions 1/4

undefined XP
  • 1
    • Use bscols() to arrange p97, p07, and p17 in a single row.
  • 2
    • Specify that p97, p07, and p17 should have column widths 6, 3, and 3, respectively.
  • 3
    • Use bscols() to arrange the plots in a single row.
    • Specify that p07 should span 5 columns. Use NA for the other widths.
  • 4
    • Arrange p97 in the left column, and p07 and p17 in the right column.