Data wrangling (II)

Lecture 8

Dr. Benjamin Soltoff

Cornell University
INFO 3312/5312 - Spring 2024

February 15, 2024

Announcements

Announcements

  • Draft proposal rendered + committed + pushed to GitHub by 11:59pm tonight
  • Peer evaluations in lab tomorrow
  • Homework 3 distributed tomorrow

Agenda for today

  • Transforming and reshaping a single data frame
  • Transforming and reshaping multiple data frames

From last time

Improve a sad plot

Let’s recreate this visualization and make it better!

Finish ae-05

  • Open the ae-05 repo in RStudio Workbench, open the Quarto document, and complete your improved plot.
  • Render, commit, and push your edits by the AE deadline – end of tonight.

Bringing together multiple data frames

Scenario 2

We…

have multiple data frames

want to want to bring them together so we can plot them

Application exercise

Ivy League representation on the judiciary

ae-06

  • Go to the course GitHub org and find your ae-06 (repo name will be suffixed with your NetID).
  • Clone the repo in RStudio Workbench, open the Quarto document in the repo, and follow along and complete the exercises.
  • Render, commit, and push your edits by the AE deadline – end of tomorrow.

Wrap up

Wrap up

  • Data is often split across multiple tables and we need to bring them together to analyze and visualize
  • Use *_join() functions to combine two tables
  • Continue to practice data wrangling and transformation operations

Fondue for two