
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 | 
|---|---|---|---|
| EOC | EOC (week 4) | Mon 01/27/2025 | Mon 01/27/2025, 11:55pm PT | 
| HW | Homework Assignment #2 | Tue 01/21/2025 | Tue 02/04/2025, 11:59pm PT |