Prework

As this workshop focuses on (more) advanced topics, a solid understanding of the fundamentals of ggplot2 and also data preparation in R is helpful. The concepts of how to initialize a ggplot, map variables to aesthetics, and how aesthetics relate to scales should be familiar to you. If you want to refresh your knowledge, I suggest going through the first two chapters of the ggplot2 book by Hadley Wickham et al. (introduction and getting started). The “R for Data Science” book also offers a good overview of ggplot2 as well as on data wrangling with the tidyverse.

You will need to bring your own laptop to the workshop with a recent version of R (4.3.1 or newer) and RStudio (2023.06.1 or newer) as well as a bunch of R packages and a few typefaces installed.

Technical Requirements

Install R and Rstudio

Download the most recent version of R (at least version 4.2) and Rstudio (at least version 2023.06.1) and follow the installation steps.

Install R Libraries

You can install all required R packages at once by running the following code in the R command line:

pkgs <- c("ggplot2", "dplyr", "tibble", "tidyr", "readr", "forcats", 
          "stringr", "lubridate", "purrr", "here", "scales", "ragg", 
          "systemfonts", "rcartocolor", "scico", "prismatic", "patchwork", 
          "ggtext", "ggforce", "ggrepel", "colorspace", "gapminder", "remotes")
install.packages(setdiff(pkgs, rownames(installed.packages())))

remotes::install_github("clauswilke/colorblindr")

To run the code, open up Rstudio. Copy–paste the code in the console pane (by default in the lower left) and hit enter. Several messages should pop up. Scan these messages that are returned for errors and troubleshoot them if necessary. Warnings and other informational messages can be ignored.

A few packages are not strictly needed but are used in some of the course material. If you wish to install all packages, run the following code as well:

pkgs_opt <- c("camcorder", "viridis", "RColorBrewer", "MetBrewer", 
              "ggthemes", "ggsci", "hrbrthemes", "tvthemes", 
              "ggannotate", "concavemen")
install.packages(setdiff(pkgs_opt, rownames(installed.packages())))

remotes::install_github("AllanCameron/geomtextpath")

If, for some reason, you cannot install these packages or the latest versions of R and RStudio, we will have a Posit Cloud workspace set up that can be used instead. But you will still need to bring your laptop.

Install Typefaces

We will make use of custom fonts during the course. If you want to follow all contents locally, make sure the following typefaces are installed:

You can download all typefaces as a single zip file here.

For Mac OS Users

If you want to save your visualization to PDF, please make sure that XQuartz is installed which is needed to use the cairo pdf device.

Course Communication

We will be using Discord as our main communication method during the workshop. To make the process go smoothly:

  • Please sign up for an account at discord.com if you don’t already have one.
  • Make sure your display name is the one you used to register for the conference.
  • In your “About Me”, put the name of your workshop(s).

Closer to the start of the conference, you will be invited to join the posit::conf Discord server. Once you’ve accepted the invite, we will add you to the channel for the workshop.