
Artwork by Allison Horst
Pre-class Prep
A. Install required packages
install.packages("ggExtra") # {ggplot2} extension which can be used to add marginal histograms/boxplots/density plots to ggplot2 scatterplots
install.packages("ggdensity") # {ggplot2} extension providing more interpretable visualizations of density estimates based on highest density regions (HDRs)B. Download .qmd templates & review data wrangling code
Download all necessary templates (links in the table below) and save them to a
EDS-240-data-viz-examples/week4/folder.Review the data wrangling code under the
## Setupsection of each template file and make note of any questions you might have. Due to time constraints, we won’t be live-coding our way through the data wrangling code in class. However, we’ll reserve some time to answer any questions before we jump into data viz .
Lecture Materials
| Lecture slides | Code-along template | Code-along key |
|---|---|---|
| Lecture 4.1: visualizing amounts / rankings | 4.1 template | 4.1 key |
| Lecture 4.2: visualizing numeric relationships | 4.2 template | 4.2 key |
Pre-discussion Prep
A. Prepare a week4-discussion.qmd file
Add a new blank file to your class repo at the following location: EDS-240-class-examples/week4/week4-discussion.qmd. Fill out the necessary YAML information (title, author, date + any other information you find helpful).
Discussion Materials
| Discussion Slides | Exercise instructions | Exercise solutions |
|---|---|---|
| D4 slides: ggplot themes | D4 exercise: USDM plot theme | D4 solution |
Assignment Reminders
| Assignment Type | Assignment Title | Date Assigned | Date Due |
|---|---|---|---|
| HW | Homework #2 | Wed 01/21/2026 | Wed 01/28/2026, 11:59pm PT |
| FPM | Final Project Milestone #2 | Wed 01/28/2026 | Wed 02/04/2026, 11:59pm PT |