Boxplots and counts
Boxplots display the relationship between a continuous variable and a categorical variable. Count plots display the relationship between two categorical variables. In this tutorial, you will learn how to use both. You will learn how to:
- Make and interpret boxplots
- Rotate boxplots by flipping the coordinate system of your plot
- Use violin plots and dotplots, two geoms that are similar to boxplots
- Make and interpret count plots
The tutorial is adapted from R for Data Science by Hadley Wickham and Garrett Grolemund, published by O’Reilly Media, Inc., 2016, ISBN: 9781491910399. You can purchase the book at shop.oreilly.com.
The tutorial uses the {ggplot2} and {dplyr} packages, which have been pre-loaded for your convenience.