Data Transformation I

Week 10, Spring 2022

Summary

This week we will dive into data visualization and transformation. In doing so, we will move from using strictly Base R, to supplementing Base R with the tidyverse.

Learning Objectives

After completing this week, you are expected to be able to:

  • Understand the difference between a tibble and a data.frame.
  • Visualize data using ggplot2.
  • Transform data using dplyr, specifically using the single table verbs:
    • select to pick columns (variables) based on their names
    • filter to pick rows (observations) based on their values
    • mutate to add new columns using functions of existing variables
    • summarize to create single number statistical summaries of columns
    • arrange to change the ordering of rows

Reading

Link Source
Introduction R4DS
Data Visualization R4DS
Workflow: Basics R4DS
Data Transformation R4DS
Workflow: Code Style R4DS
Data Tidying R4DS
Workflow: Scripts and Projects R4DS
Data Import R4DS
Workflow: Getting Help R4DS

Additional Reading

Link Source
tibble Vignette tibble Documentation
Tidy Data Vignette tidyr Documentation

Cheatsheets

Link Source
ggplot2 Posit Cheatsheets
dplyr Posit Cheatsheets
readr Posit Cheatsheets
tidyr Posit Cheatsheets

Data

Video

Title Link Mirror
10.1 - Welcome to Week 10 10.1 - YouTube 10.1 - ClassTranscribe
10.2 - Data and Tibbles 10.2 - YouTube 10.2 - ClassTranscribe
10.3 - Data Visualization with ggplot2 10.3 - YouTube 10.3 - ClassTranscribe
10.4 - Data Transformation with dplyr 10.4 - YouTube 10.4 - ClassTranscribe
10.5 - Lab 06 10.5 - YouTube 10.5 - ClassTranscribe

Assignments

Assignment Deadline Credit
Lab 05 Thursday, March 23 100%
Quiz 05 Thursday, March 23 105%
Lab 06 Thursday, March 30 100%
Quiz 06 Thursday, March 30 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 Abdi Thursday 11:00 AM - 12:00 PM
Zoom with Mallory Thursday 1:15 PM - 2:15 PM
Zoom with Zhiyuan Thursday 4:00 PM - 5:00 PM
Discussion Forum Any! Any!