3 Wrangling and tidying data

Most data you come across is messy. Your task is to process messy into tidy data — we will introduce you to the tidyverse tools from the packages dplyr and tidyr that make this process a breeze.

3.1 Slides, application exercises, and references

Unit 2 - Deck 5: Tidy data

Wickham, Hadley (2014) “Tidy data.” Journal of statistical software 59(10), 1-23, https://www.jstatsoft.org/article/view/v059i10.

Unit 2 - Deck 6: Grammar of data wrangling

Unit 2 - Deck 7: Working with a single data frame

Unit 2 - Deck 8: Working with multiple data frames

Hotels + Data wrangling

Please open your Posit Cloud for this exercise.

3.1.1 Additional material not covered in class

We will not cover this unit due to time constraints. If you’re interested in the important task of pivoting data from wide to long formats and vice versa, feel free to study the slides on your own.

Unit 2 - Deck 9: Tidying data