IV. Data Visualisation
Introduction to ggplot2
ggplot2
is aR
package dedicated to data visualization. It can greatly improve the quality and aesthetics of your graphics, and will make you much more efficient in creating them.ggplot2
allows to build almost any type of chart. The R graph gallery focuses on it so almost every section there starts withggplot2
examples.
Basic syntax and structure of ggplot2
In this section, we’ll explore a series of videos that highlight key concepts related to data visualization using ggplot2
and the Grammar of Graphics. These videos will help you appreciate the principles behind effective data visualization and how ggplot2
can be leveraged to create powerful visual representations of data.
Appreciating Grammar of Graphics - This video introduces the foundational concept of the Grammar of Graphics, which is the theoretical framework behind
ggplot2
.
New York Times example - The New York Times is renowned for its exemplary data visualizations. In this video, we analyze an example of how
ggplot2
can be used to replicate the style and clarity of a New York Times chart.
- ggplot2 nuanced example - This video dives deeper into the nuances of
ggplot2
.
ggplot2
cheatsheet
Understanding this grammar will enable you to build complex and meaningful visualizations by combining different components in a structured way.
- Newer version (maintained by Posit)
- Older version of cheatsheet
- We have added a caption and locked the aspect ratio. Aligned to left.