Skip to Content
View all events

Hands-On Guide to Advanced Data Visualization with ggplot2: Custom Design

Published by Pearson

Intermediate content levelIntermediate

Create Data Visualizations in R Using the “Grammar of Graphics”

  • Leverage existing ggplot2 themes and color palettes to create aesthetically appealing data visualizations
  • Design your own ggplot2 theme to apply a cohesive and easily reproducible style to all of your graphics
  • Use labels, annotations, and the wide array of textual and geometric callouts available with ggplot2 to provide a clear narrative and guide viewers
  • Combine multiple charts to build data stories, complex figures, or dashboards

Communicating data through engaging visualizations is a critical skill for data scientists, researchers, and business managers. This live training provides everything one needs to know to use the ggplot2 library to turn a basic chart into a meaningful and aesthetically appealing visualization.

The advanced course covers the most important steps and helpful tricks to create visually appealing and informative graphs both in theory and in practice using ggplot2. You will learn how to create a corporate visual theme, apply custom color palettes, and use non-default typefaces to ensure a pleasing and cohesive style of your graphics. Furthermore, the course will empower you to apply the best practices of graphical storytelling by combining multiple graphs and providing annotations, direct labels, and other highlights to guide the viewer.

The advanced course is designed for participants with prior experience in ggplot2 as a follow-up course on Hands-On Data Visualization with ggplot2: Concepts. Participants should be familiar with the principles of ggplot and be able to import data and create visualizations with the ggplot2 package by using geometric layers, aesthetics, scales, facets, and complete themes. As part of the training, attendees can download the course examples and exercises as Quarto and Rmarkdown notebooks from the course webpage.

What you’ll learn and how you can apply it

  • Theme functionality
  • Custom aesthetics and creation of color palettes
  • The different approaches of direct annotation to guide the viewer (layout + annotations)

And you’ll be able to:

  • Adjust the visual appearance and develop your own corporate visual theme
  • Create a custom multi-panel layout by composing charts
  • Add various types of annotations and direct labels to your graphic

This live event is for you because...

  • For anyone who already knows the basic concepts of visualizing data with ggplot2 and wants to explore the full potential of this graphics library.
  • Data scientists aiming to use the powerful ggplot2 library in their workflow for data communication of any type.
  • Business managers who aim to gain and transfer data insights using a reproducible and transparent charting approach.

Prerequisites

Familiarity with Rstudio (required)

Basics of ggplot2

Course Set-up

Install R and Rstudio: 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, dplyr, forcats, stringr, scales, systemfonts, gapminder, rcartocolor, prismatic, ggrepel, ggforce, ggtext, patchwork, magick, ggdist, ggridges, plotly, ggiraph, echarts4r, gganimate

To install the libraries, run the following code in the R console of Rstudio:

install.packages(“ggplot2”, “readr”, “tibble”, “dplyr”, “forcats”, “stringr”,"scales", "systemfonts", "gapminder", "rcartocolor", "prismatic", "ggrepel", "ggforce", "ggtext", "patchwork", "magick", "ggdist", "ggridges", "plotly", "ggiraph", "echarts4r", "gganimate")

Download the course material via the course GitHub page.

Recommended Preparation

Basic Knowledge of R (helpful but not required)

Data Wrangling with the tidyverse (helpful but not required)

Basic concepts of ggplot2

Recommended Follow-up

R Programming

Data Visualization

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Segment 1: Working with Themes and Colors (45 minutes)

  • Personalize the visual appearance (incl. custom fonts)
  • Create a corporate theme for ggplot2
  • Apply custom and effective color palettes
  • Build a corporate color scale for ggplot2
  • Q&A
  • Break (10 minutes)

Segment 2: Working with Annotations and Composition (45 minutes)

  • Add labels to guide the viewer
  • Include image files
  • Combine charts within R
  • Create complex multi panel figures
  • Q&A
  • Exercise (15 minutes)
  • Exercise on (1) creating multi-panel plots, (2) adding annotations and (3) custom theming
  • Break (10 minutes)

Segment 3: Exciting Extension Packages (30 minutes)

  • … to add more chart types
  • … to style your ggplot
  • … to create animated and interactive graphics
  • Q&A
  • Exercise (15 minutes)
  • Advanced exercises on creating complex charts with ggplot2 (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.

    linkedinXlinksearch

Skill covered

ggplot