36-315: Statistical Graphics & Visualization

A companion website for the summer 2021 version of Carnegie Mellon University course 36-315: Statistical Graphics & Visualization, offered through the Department of Statistics & Data Science and taught by Meghan Hall.

Course Objectives

This course introduces the most common forms of graphical displays along with their uses and misuses. Students will learn how to create these displays, how to understand them, and how to distinguish when and where particular graphics are appropriate. This course uses R, RStudio, ggplot2 and its extensions, and R Markdown.

Specific objectives:

  1. Create statistical graphics.
  2. Understand the fundamentals of data and reproducible data analysis.
  3. Write about statistical graphics.
  4. Speak about statistical graphics and data analyses.
  5. Assess and critique statistical graphics.

Lectures

Lecture slides are available below in html format, and the .Rmd files are linked from GitHub.

Lecture Topic html Rmd
1 intro and why data viz
2 the grammar of graphics
3 bar graphs
4 visualizing distributions
5 line graphs & working with time
6 scatter plots & relational data
7 grab bag (pie charts, heat maps, maps)
8 taking plots to the next level
9 colors, fonts, annotations, themes
10 extensions to ggplot2
11 midterm review
12 model output visualizations from tidymodels & user-defined functions
13 text analysis with tidytext and tables with kableExtra
13 tables with gt and gtsummary
14 presentations with xaringan
15 animation with gganimate, interactivity with plotly, and iteration with purrr

Labs

Lab slides are available below in html format, and the .Rmd files are available at the GitHub repo linked in the nav bar above.

Resources

Data Visualization

The tidyverse

ggplot2

R Markdown

Acknowledgments

This website is made with the distill package. Many thanks to Alison Hill and Desirée De Leon and their Teaching in Production website, which provided the inspiration for this site. Also thanks to Tom Mock for his enormously helpful introduction to distill.