Data Transformation II
Week 11, Spring 2022
- Start: Monday, March 27
- End: Friday, March 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.
- Note: Due to Engineering Open House, our usual classroom will not be available, so there will be no in-person class on Friday, March 31.
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_wider
to transform long data to wide datapivot_longer
to 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 |
---|---|---|
11.1 - Data Transformation: Import, Pivots, and Joins | 11.1 - YouTube | 11.1 - ClassTranscribe |
11.2 - Moneyball in R | 11.2 - YouTube | 11.2 - ClassTranscribe |
11.3 - Lab 07 | 11.3 - YouTube | 11.3 - ClassTranscribe |
Assignments
Assignment | Deadline | Credit |
---|---|---|
Lab 06 | Thursday, March 30 | 100% |
Quiz 06 | Thursday, March 30 | 105% |
Lab 07 | Thursday, April 6 | 100% |
Quiz 07 | Thursday, April 6 | 105% |
Office Hours
Staff and Link | Day | Time |
---|---|---|
Zoom with Abdi | Tuesday | 11:00 AM - 12:00 PM |
Zoom with Mallory | Wednesday | 9:00 AM - 10:00 AM |
Zoom with Zhiyuan | Wednesday | 4:00 PM - 5:00 PM |
Zoom with Dave | Wednesday | 5:00 PM - 7:00 PM |
Zoom with Zhiyuan | Thursday | 9:00 AM - 10:00 AM |
Zoom with Abdi | Thursday | 11:00 AM - 12:00 PM |
Zoom with Mallory | Thursday | 1:15 PM - 2:15 PM |
Discussion Forum | Any! | Any! |