1. Learn
  2. /
  3. Courses
  4. /
  5. Building Dashboards with shinydashboard

Exercise

Understanding plotly limitations

You have seen that some ggplot plots cannot be directly converted into a Plotly object. For instance, horizontally oriented boxplots plotted using ggplot2 cannot be converted directly to horizontally oriented plotly boxplots. Vertically oriented ggplot boxplots must be plotted before carrying out a coordinate flip.

In the following exercises, you will fix some Plotly plots, so that they render correctly. You will also see some limitations of Plotly.

The London Airbnb dataset has been stored as a data frame called listings, and the tidyverse and plotly libraries have been loaded for you.

Instructions 1/2

undefined XP
  • 1
    • Modify boxplots so that it renders vertical boxplots.
    • Following the previous instruction, obtain horizontal plotly boxplots.
  • 2
    • Modify the code to obtain horizontal violin plotly plots.