Exercise

Your first shinydashboard with interactive elements

You have seen how interactive elements can be added in a shinydashboard, and also how interactive data tables can be added.

In this exercise, Airbnb listings have been stored as a data frame called listings, and the geospatial map has been stored as a leaflet object called m_london. The header and side bar have been stored as header and sidebar.

Custom helper functions:

  • make_plots: Plots box plots or violin plots
  • num_listings: Computes the number of listings, based on the range selected
  • num_private_rooms: Computes the number of private rooms as a percentage of all listings, based on the range selected
  • median_price: Computes the median price, based on the range selected To find out more about a helper function, you can run it (like make_plots) in the console.

Instructions

100 XP
  • Add a plotly box plots/violin plots called "plots".
  • Add a data table called "table".
  • Add a leaflet map called "map".
  • Set the correct arguments in dashboardPage().