
Artwork by Allison Horst
Pre-class Prep
A. Install required packages
install.packages("metajam") # for downloading and reading data and metadata from repositories in the DataONE network
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 data
Save data to your class repo at EDS-240-class-examples/week4/:
| Lecture | Dataset title | Download link | Notes |
|---|---|---|---|
| 4.1 | Continuous precipitation and stream chemistry data, Hubbard Brook Ecosystem Study, 1963 – ongoing | we’ll use the {metajam} package to download the data programmatically from DataONE (see step C, below, for setup instructions), however, in the event that the API is down, you can access a backup copy on Google Drive |
Find the full data package on DataONE; DataONE is a community driven project providing access to data across multiple member repositories, supporting enhanced search and discovery of Earth and environmental data. |
C. 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 numeric relationships | 4.1 template | 4.1 key |
| Lecture 4.2: good data viz | NA | NA |
Pre-lab Prep
A. Prepare a week4-lab.qmd file
Add a new blank file to your class repo at the following location: EDS-240-class-examples/week4/week4-lab.qmd. Fill out the necessary YAML information (title, author, date + any other information you find helpful).
Lab Materials
TODO
- create new lab exercise/content for practicing fundamental chart types – hackathon style? provide a few different data sets, split into groups that get randomly assigned a dataset; must consider the chart types covered in lecture over the past 3 weeks and build an appropriate viz?
| Lab Slides | Exercise instructions | Exercise solutions |
|---|---|---|
| Lab 4 slides: ggplot themes | Lab 4 exercise: USDM plot theme | Lab 4 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 |