Data Transformation II
Week 10, Fall 2025
- Start: Monday, October 27
- End: Friday, October 31
Summary
This week we will continue our discussion of the tidyverse. In particular, we’ll discussion data import and export, tidying data, and joining data.
Learning Objectives
After completing this week, you are expected to be able to:
- Identify “tidy” data.
- Transform untidy data to tidy data using
tidyr, in particular:pivot_widerto transform long data to wide datapivot_longerto transform wide data to long data, which is most often tidy
- Import and export data using
readr. - Combine multiple datasets using joins from
dplyr.
Reading
Cheatsheets
| Link | Source |
|---|---|
ggplot2 |
Posit Cheatsheets |
dplyr |
Posit Cheatsheets |
readr |
Posit Cheatsheets |
tidyr |
Posit Cheatsheets |
Data
- Package:
Lahman - Package:
nycflights13 - Package:
bbd
Video
| Title | Link | Mirror |
|---|---|---|
| 10.1 - Welcome to Week 10 | 10.1 - YouTube | 10.1 - ClassTranscribe |
| 10.2 - Data Transformation: Import, Pivots, and Joins | 10.2 - YouTube | 10.2 - ClassTranscribe |
| 10.3 - Moneyball in R | 10.3 - YouTube | 10.3 - ClassTranscribe |
| 10.4 - Lab 07 | 10.4 - YouTube | 10.4 - ClassTranscribe |
Assignments
| Assignment | Deadline | Credit |
|---|---|---|
| Lab 06 | Thursday, October 30 | 100% |
| Quiz 06 | Thursday, October 30 | 105% |
| Lab 07 | Thursday, November 6 | 100% |
| Quiz 07 | Thursday, November 6 | 105% |
Office Hours
Professor Eck’s Office Hours are cancelled this week.