The ggplot2 framework is a very efficient and powerful framework for creating visualizations. This comes in part from the fact that it sticks to a specific data format for its input. It requires you to start with data in a what’s called a “tidy” format.
In the previous section, I used an example dataset that was already in this format, to make it easier for you to get started with plotting. However, to leverage the power of ggplot2 for real datasets, you have to know how to get them into this tidy format. This section will explain introduce you to how you can clean real datasets to convert them into this format using tidyverse tools, as well as provide some resources for you to use to develop your skills in “tidying” data.