Visualizing various types of data

Lecture 4

Dr. Benjamin Soltoff

Cornell University
INFO 2951 - Spring 2025

January 30, 2025

Announcements

Announcements

  • Use the discussion board for course-related questions
  • Lab 01 and Homework 01 tomorrow

Coding style + workflow

  • Avoid long lines of code

    • We should be able to see all of your code in the PDF document you submit.
    • Do not rely on automatic line wrapping. It is not consistent.
  • Label code chunks

    • Do not put spaces in the code-chunk labels.
  • Use the {tidyverse} style guide and styler

  • Render, commit, and push regularly

    • Think about it like clicking to save regularly as you type a report

Warm up

Revisiting average heights

The way data is displayed matters

What do these plots show?

Application exercise

The prognosticator of all prognosticators

ae-02

Instructions

  • Go to the course GitHub org and find your ae-02 (repo name will be suffixed with your GitHub name).
  • Clone the repo in RStudio, run renv::restore() to install the required packages, 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 the day

Wrap up

Recap

  • Pick geoms based on data types.
  • Set appropriate binwidths for histograms.
  • Turn off legends when they provide redundant information with show.legend = FALSE.
  • Create plots with multiple geoms, and pay attention to order.

Happy Birthday