A Practical Introduction to Data Visualization with ggplot2 Workshop - rstudio::conf 2020

A Practical Introduction to Data Visualization with ggplot2 Workshop

1/27/20—1/28/20
9:00 AM-5:00 PM
2 Day Workshop

Kieran Healy
Professor
Duke University


This course will teach you how to think about good data visualization, and how to do it. We begin with some core principles about how we see graphs, what makes some of them better than others, and how to begin cultivating good judgment about visualization. Then, through a series of worked examples, you will learn how to use ggplot2 to make graphs piece by piece. The emphasis throughout is on acquiring a practical feel for and good judgment about the way ggplot2 can be used, from the simplest cases to sophisticated, customized data visualizations.

The effective use of graphs and charts is an important way to explore data for yourself and to communicate your ideas and results to others. Being able to produce effective plots from data is also the best way to develop an eye for reading and critically understanding visualizations made by others, whether presented in academia, business, policy, or the media. Learning how to visualize data effectively is more than just knowing how to write code that produces figures from data. This course will teach you how to do that. But it will also teach you how to think about the information you want to show, and how best to present it to your audience — including when the audience is yourself.

You should take this workshop if:

  1. You want to understand the basic principles behind effective data visualizations, and how they are implemented in R and ggplot2.
  2. You want to better develop your practical sense for why some graphs and figures work well while others do not.
  3. You want to feel more confident and fluent in ggplot2, in order to make, refine, and effectively present good data visualizations.

Professor Healy, I am enrolled for your seminar at the RStudio Conference later this month, a Practical Introduction to Data Visualization with ggplot2. Can you tell if the course materials for the session have been made available yet? I still have the RStudio cloud account that I signed up for at the conference in Austin last year and was hoping to use that again.

Thanks in advance, looking forward to this year's conference.

Tony Plakidas

I should note that all instructors were invited to update these community threads, but they weren't required to. Perhaps overstepping my bounds, I made Professor Healy the owner of this thread before he actually said he'd like to use this. That is, it's not clear to me yet that he intends to make use of this thread, and so might not reply here.

Before the workshop starts, he or his TAs will contact all students via email about all the course materials you'll need.

Hi Tony,

The course materials aren't available yet, but they should be soon. I plan to have an RStudio cloud project or workspace available with the necessary libraries and code ready to use at the seminar, so I believe you should be able to use the cloud account you already have.

This post describes the software we'll use during the workshop. The most convenient option is to install R and RStudio on your laptop, along with the packages described below. You should also be able to use an RStudio Cloud workspace in your browser, however.

Running R and RStudio on your Laptop

  • If you are running the software locally on your laptop, begin by installing R (http://cloud.r-project.org) and RStudio (http://rstudio.com).
  • Once the applications are installed, launch RStudio. Either type or copy and paste the following lines of code at R’s command prompt, located in the RStudio window named “Console”, and then hit return. In the code below, the <- arrow is made up of two keystrokes, first < and then the short dash or minus symbol, -.
my_packages <- c("tidyverse", "broom", "coefplot", "cowplot", 
                "drat", "gapminder", "GGally", "ggrepel", 
                "ggridges", "graphlayouts", "gridExtra", 
                "here", "interplot", "margins", "maps", "mapproj", 
                 "mapdata", "MASS", "naniar", "prismatic", 
                 "quantreg", "socviz", "survey", "srvyr", 
                 "viridis", "viridisLite", "devtools", 
                 "ggforce", "ggraph", "sf")

install.packages(my_packages, repos = "http://cran.rstudio.com")

If you do not have one already, it will be useful to create a GitHub account and obtain a GitHub Personal Access Token. Read and carefully follow the instructions in Parts I and II of Happy Git With R, and then also the instructions in Appendix B of the same document.