Hands-On Data Visualization with ggplot2: Concepts
Published by Pearson
Create Data Visualizations in R Using the “Grammar of Graphics”
- Learn how to combine just a few simple principles of ggplot2 with predefined elements and default settings to quickly create effective visualizations of your data
- Easily iterate over numerous variables with just a few lines of code to create publication-worthy visualizations in seconds
- Add and customize ggplot2 components to create powerful, yet reproducible visualizations with informative callouts, clear messaging, and cohesive aesthetic themes
Creating visualizations that communicate data and important findings effectively in a preferably reproducible way is critical for data scientists, researchers, and business managers. This live training provides everything one needs to know to create graphics in a fully automated, script-based way with ggplot2, the most famous package for data visualization with R.
The course covers the principles of ggplot2 to create informative, publication-ready graphs with a few lines of code. You will learn how to use the “Grammar of Graphics” to quickly create numerous chart types, change the visual appearance, and split your graphics into powerful small multiples.
The course is designed for participants with zero to minimal prior experience in R. As part of the training, attendees can download the course examples and exercises as Quarto or Rmarkdown notebooks from the course webpage.
What you’ll learn and how you can apply it
- “Grammar of Graphics” concepts
- ggplot2 layered approach
- Aesthetics and scales interplay
And you’ll be able to:
- Build a basic ggplot from scratch (data, aesthetics, and geometries)
- Customize labels, axes, colors, and shapes (aesthetics and scales)
- Create and modify powerful small multiples (facets)
- Adjust the overall visual appearance of your chart (themes)
This live event is for you because...
- Anyone interested in visualizing data with R—no matter if you have no or minimal experience with R
- Data scientists aiming to use the powerful ggplot2 library in their workflow for exploration and basic communication
- Business managers aiming to quickly gain data insights using a reproducible and transparent charting approach
Prerequisites
Familiarity with Rstudio (required)
- Watch: Chapter 2 of “R Programming for Statistics and Data Science” by 365 Careers
- Read: The “Prerequisites” chapter of R for Data Science by Hadley Wickham & Garrett Grolemund
Basic idea of data formats and data visualization (helpful)
Course Set-up
- Install R and Rstudio (optional if you would like to follow along): Download the most recent version of R and Rstudio and follow the installation steps (for more detailed instructions see Chapter 2 of “R Programming for Statistics and Data Science” by 365 Careers
- Install the following R libraries: ggplot2, readr, tibble, dplyr, forcats, stringr, ragg To install the libraries, run the following code in the R console of Rstudio: install.packages(“ggplot2”, “readr”, “tibble”, “dplyr”, “forcats”, “stringr”, “ragg”)
- Download the course material via the course GitHub page
Recommended Preparation
Basic Knowledge of R (helpful but not required)
- Read: Chapter 4–6 of R for Data Science by Hadley Wickham & Garrett Grolemund
- Read: Chapter 1–3 of R for Everyone: Advanced Analytics and Graphics, 2nd Edition by Jared Lander
- Read: Section 1 and 3 of Programming Skills for Data Science: Start Writing Code to Wrangle, Analyze, and Visualize Data with R by Joel Ross & Michael Freeman
- Watch: Chapters 3, 4, and 7 of “R Programming for Statistics and Data Science” by 365 Careers
- Watch: Lesson 1 and 2 of “R Programming” by Jared P. Lander
Basic Knowledge of Data Wrangling with the tidyverse (helpful but not required)
- Read: R for Data Science by Hadley Wickham & Garrett Grolemund (or https://r4ds.had.co.nz/)
Recommended Follow-up
R Programming
- Read: R for Data Science by Hadley Wickham and Garrett Grolemund
- Read: Programming Skills for Data Science: Start Writing Code to Wrangle, Analyze, and Visualize Data with R by Joel Ross & Michael Freeman
- Watch: “R Programming” by Jared P. Lander
ggplot2
- Attend: Hands-On Guide to Advanced Data Visualization with ggplot2: Custom Design by Dr. Cédric Scherer
- Read: R Graphics Cookbook by Winston Chang
- Watch: “Data Visualization with ggplot2” by Kara Woo
Data Visualization
- Read: Fundamentals of Data Visualization by Claus O. Wilke
- Read: Hands-On Data Visualization by Jack Dougherty and Ilya Ilyankou
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Segment 1: The “Grammar of Graphics” (30 minutes)
- The underlying idea of the {ggplot2} package
- A motivational example
- The {ggplot2} showcase
- The structure of a ggplot
- Q&A
- Break (10 minutes)
Segment 2: A Basic ggplot (45 minutes)
- Data
- Aesthetics
- Geometrical layers
- Labels
- Q&A
- Exercise (15 minutes)
- Basic exercise on (1) data import and (2) mapping variables to aesthetics
- Break (10 minutes)
Segment 3: A Polished ggplot(45 minutes)
- Theming
- Facets
- Scales
- Coordinate systems
- Q&A
- Exercise (15 minutes)
- Advanced exercise on (1) creating small multiples, (2) changing axis and legend styling, (3) using meaningful color palettes, and (4) theme adjustments (to be continued at home if interested)
Course wrap-up (10 minutes)
Your Instructor
Cedric Scherer
Dr. Cedric Scherer is a graduated computational ecologist with a passion for design. In 2020, he combined his expertise in analyzing and visualizing large data sets in R with his passion to become a freelance data visualization specialist. Cédric has created visualizations across all disciplines, purposes, and styles and regularly teaches data visualization principles, R, and ggplot2. Due to regular participation to social data challenges, he is now well known for complex and visually appealing figures, entirely made with ggplot2, that look as they have been created with a vector design tool.