Artwork by Allison Horst
Pre-class Prep
A. Install required packages
install.packages("paletteer") # a comprehensive collection of color palettes in R using a common interface
install.packages("viridis") # Colorblind-Friendly Color Maps for R
install.packages("RColorBrewer") # ColorBrewer Palettes
install.packages("tigris") # for downloading and using Census TIGER/Line shapefiles in R
install.packages("sf") # provides simple features access in R
B. Download data
- Download County-level precipitation data (Jan 2020 - Dec 2024) for the contiguous U.S, made available by NOAA National Centers for Environmental Information (NCEI) (you do not need to adjust any of the drop down selections; find the download buttons just beneath the rendered map – choose the CSV option)
- rename the data file as
NCEI-county-jan20-dec24-precip.csv
and save it to your class repo at the file path:EDS-240-class-examples/week5/data/NCEI-county-jan20-dec24-precip.csv
- rename the data file as
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/week5/
folder.Review the data wrangling code under the
## Setup
section of template 5.3 and make note of any questions you might have (no data wrangling necessary in template 5.2). 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 .
D. (OPTIONAL, but highly recommended) Install Google Chrome extensions
I’ll be using both of these (really wonderful and easy-to-use) tools during lecture and encourage you to install them!
- Let’s get color blind: simulates different color deficiencies in the browser
- Monochrome Mode: Grayscale browsing: turns websites grayscale
- ColorZilla: an Eyedropper, Color Picker, Gradient Generator (also available for Firefox)
Lecture Materials
Lecture slides | Code-along template | Code-along key |
---|---|---|
Lecture 5.1: good data viz | NA | NA |
Lecture 5.2: colors | 5.2 template | 5.2 key |
Lecture 5.3: choropleth | 5.3 template | 5.3 key |
Pre-discussion Prep
A. (OPTIONAL) Bring a cool data viz!
This week’s discussion section will be a time to explore, share, and discuss “non-standard” chart types, as well as those that present data using the fundamental chart types we’ve already discussed in different and exciting ways. You’ll have time to browse some data viz during section, but it would be great to bring any inspiring examples you might have come across already.
B. (OPTIONAL) Get yourself a Bluesky account
Bluesky is quickly becoming the Twitter replacement for data science community members to connect, share, and learn together. You can stay up to date on #TidyTuesday submissions and follow many of the great data viz folks in the field. Check out the resources page for more information on how to get started.
Discussion Materials
Discussion Slides | Exercise instructions | Exercise solutions |
---|---|---|
D5 slides: “non-standard” chart types | NA | NA |
Assignment Reminders
Assignment Type | Assignment Title | Date Assigned | Date Due |
---|---|---|---|
EOC | EOC (week 5) | Mon 02/03/2025 | Mon 02/03/2025, 11:55pm PT |
SR | Mid-course reflection (SR #2) | Mon 02/03/2025 | Sat 02/08/2025, 11:59pm PT |