Engaging and Beautiful Data Visualizations with ggplot2

Welcome!

Cédric Scherer // posit::conf // September 2023

Welcome





Overview of some exemplary plots included in my ggplot2 tutorial.

cedricscherer.com/2019/08/05/a-ggplot2-tutorial-for-beautiful-plotting-in-r

Animated evolution of a jitter-pop plot showing student-teacher ratios per continent. The animation shows iteration through different geometries, theme adjustments, combinations of layers, and additional annotations such as text labels with arrows and an inset tile grid map with colors by region mathing those of the main graphic.

cedricscherer.com/2019/05/17/the-evolution-of-a-ggplot

Artwork by Thomas Linn Pedersen

Graphic by Jasmin Sarah König

Photo by Jonathan Keane

Conversation Starters

  • What’s your name?
  • Where do you feel home?
  • When did you use R for the first time?
  • What’s your favorite animal / plant / color / typeface?
  • Where did you spend your summer?
  • Whom would you like to meet during the posit::conf?
  • Which R package are you looking forward to try?
  • What are things you want to learn about ggplot2?

Announcements


WiFi

  • Username: Posit Conf 2023
  • Password: conf2023

Course Materials

posit-conf-2023.github.io/
dataviz-ggplot2

posit.cloud/spaces/397253

Announcements

  • Gender-neutral bathrooms are located among the Grand Suite Bathrooms.
  • The two meditation/prayer rooms (Grand Suite 2A and Grand Suite 2B) are open Sunday-Tuesday 7:30 am-7:00 pm and Wednesday 8:00 am-6:00 pm
  • The lactation room is located in Grand Suite 1 and open Sunday-Tuesday 7:30 am-7:00 pm and Wednesday 8:00 am-6:00 pm.
  • Participants who do not wish to be photographed have red lanyards; please note everyone’s lanyard colors before taking a photo and respect their choices.
  • The Code of Conduct and COVID policies can be found at posit.co/code-of-conduct. Please review them carefully. You can report Code of Conduct violations in person, by email, or by phone. Please see the policy linked above for contact information.

Communication Strategy


  • Green sticky note — I am done with the exercise

  • Pink sticky note — I need help or support

  • You can ask questions / comment at any time during the course.
  • Please avoid questions during the breaks to give us a chance to recover.
  • We will be using Discord as our main digital communication method.
  • Team up with your neighbors for exercises — and lunch!
  • We will collect feedback twice during the day (more later).

Preparation

Required Packages

install.packages("ggplot2")
install.packages("dplyr")
install.packages("readr")
install.packages("forcats")
install.packages("stringr")
install.packages("lubridate")
install.packages("purrr")
install.packages("here")
install.packages("scales")
install.packages("ragg")
install.packages("systemfonts")
install.packages("rcartocolor")
install.packages("scico")
install.packages("prismatic")
install.packages("patchwork")
install.packages("ggtext")
install.packages("ggforce")
install.packages("ggrepel")
install.packages("colorspace")
install.packages("gapminder")
remotes::install_github("clauswilke/colorblindr")

Optional Packages

install.packages("camcorder")
install.packages("viridis")
install.packages("RColorBrewer")
install.packages("MetBrewer")
install.packages("ggthemes")
install.packages("ggsci")
install.packages("hrbrthemes")
install.packages("tvthemes")
install.packages("ggannotate")
remotes::install_github("AllanCameron/geomtextpath")

Required Typefaces

Download and install the following typefaces:

→ Install the font files.

→ Restart Rstudio.

Let’s get started!