Data Visualization
Methodology Center Workshop Series · Purdue University · November 2026
The notes for the workshop, with the Stata and R code and output for every example. This site contains all the material and code for the workshop. If you prefer the slides in PDF format and/or the replication files, these can be downloaded at: slides · Stata do-file · R script.

Principles of good data visualization
- Introduction
- 1. Look at your data
- 2. Use graph types people read accurately
- 3. Maximize the data-ink ratio, within reason (maybe)
- 4. Show uncertainty
- Break 1: Group task
- 5. Make groups easy to tell apart
- 6. Choose axes that fit the data
- 7. Design for your audience
- 8. Use graphs, not tables, for model results
- Break 2: Group task
- 9. Show what the model predicts
- 10. Don’t assume linearity
- Principles of good data visualization (summary)
- Conclusion
- References & Recommendations
- Appendix
Setup
Install the packages the examples use (once), and set the graphics scheme:
net install cleanplots, from("https://tdmize.github.io/data") replace
ssc install coefplot, replace
ssc install combomarginsplot, replace
ssc install binscatter, replace
ssc install estout, replace
// cleanplots: https://www.trentonmize.com/software/cleanplots
set scheme cleanplotsinstall.packages(c("foreign", "ggplot2", "dplyr", "marginaleffects",
"modelsummary", "Hmisc", "remotes"))
library(remotes) # installs packages from GitHub
install_github("tdmize/cleanplots") # Mize's graphics schemeEach page starts by loading the packages it uses and setting the cleanplots theme:
library(cleanplots) # Mize's graphics scheme
## Use cleanplots colors, markers, lines, and theme for all graphs ##
cleanplots_defaults()
theme_update(plot.title.position = "plot") # titles start at left edge of graph