M4 - Data Wrangling

ENV 872 - EDA   |   Spring 2024   |   Instructors: Luana LimaJohn Fay  |  

Learning Goals

  • Describe the usefulness of data wrangling and its place in the data pipeline;
  • Wrangle “real world” datasets with dplyr functions:
    • Filter, Arrange, Select, Mutate
  • Using “pipes” to tidy code

  • Gathering & spreading data
    • pivot_longer and pivot_wider
  • Combining multiple datasets into one
    • Merging data sets with rbind & cbind
    • Joining data & join types
  • Split-apply-combine techniques with group_by and summarize
  • Saving wrangled datasets

Lesson Documents

Download these and import into the Lessons folder of your workspace:

Lab Documents

Assignment

Recordings

Additional Resources