Module 03: The Whole Game

Hello ggplot2 & Reproducibility

Chris Chizinski

Slide Accessibility Note

  • Title Background Image Alt-Text: A scenic photograph of three different penguin species (Adelie, Chinstrap, Gentoo) standing on ice in the Palmer Archipelago, Antarctica.
  • Speaker Notes: These slides are designed to be read alongside the live-coding script.

The Whole Game Map

Ask a field question
Sketch the graph
Write reproducible code
Run and inspect
Commit the evidence

Use this map to track where each live-coding step fits in the larger workflow.

Today: Turn Your Graph into an Assignment

  1. Accept the NRES800 organization invitation in GitHub.
  2. In Classroom 50, sign in with that GitHub account, select NRES800, and create your private Assignment 01 repository.
  3. Clone it and open assignment.R.
  4. Rebuild the graph you explored: body mass vs. flipper length, colored by species.
  5. Make it readable, explain one pattern in script comments, run it, commit, and push.

Due: Tuesday, September 15, 2026, 11:59 PM Central Time.

Choose One Git Path

  • GitHub Desktop: use it if it opens; no terminal required.
  • Positron’s built-in Source Control: use its Git panel if Git is installed; no terminal or separate GitHub extension is needed.
  • Both paths end the same way: clone → fetch/pull → edit → commit → push → verify on GitHub.
  • If an app will not open, your repository is safe on GitHub: take a screenshot and use the other path or ask for help.

Brand-New Positron User? Use Built-In Source Control to Clone First.

  1. On GitHub: Code → HTTPS → Copy.
  2. In Positron’s built-in Source Control: choose New Folder from Git.
  3. Paste the address, choose your class-work folder, and select Create Folder.
  4. When Positron finishes, open the new folder; then open assignment.R.

Do not start with File → Open Folder. That comes after the clone creates your local repository.

Why Keep GitHub in the Loop?

Two-panel illustration comparing a researcher using GitHub to follow a clear route through a climbing landscape, with labeled checkpoints for an initial commit, a cleaned dataset, and completed analysis, to a researcher without GitHub tangled in multiple poorly named analysis files in a snowstorm.

Illustration by Allison Horst, CC BY 4.0.

How To Use Today

  • Type along in the follow-along script.
  • Ask questions during the checkpoints.
  • Keep the goal small: one plot, one interpretation, one push.

Download the Assignment 01 follow-along script (.R)

Why the “Whole Game”?

  • We start by doing, not just installing.
  • You will load data, make a plot, and interpret it TODAY.
  • We will spend the rest of the semester unpacking HOW it works.

Learning Objectives

  1. Create a private weekly repository through Classroom 50 and clone it.
  2. Move a familiar ggplot2 graph into a reproducible R script.
  3. Run the complete script and inspect the resulting plot.
  4. Commit and push a reproducible result to GitHub.

Today’s Dataset: Palmer Penguins

  • Data on three penguin species in Antarctica.
  • Variables: bill length, flipper length, body mass, sex.
  • A classic dataset for learning visualization.

Live Coding: Section 1

  • Open your project in RStudio.
  • Open scripts/week_01_follow_along.R.
  • Type along as we build the plot.

The Challenge [45 mins]

Problem: The 30-Minute Analyst

  • Load the palmerpenguins data.
  • Create a scatterplot of body mass vs flipper length.
  • Color the points by species.
  • Extension: Add professional labels and a theme.
  • Base goal: Make the plot work and make the mapping correct.
  • Extension goal: Make the plot readable without explanation.

Verification

  • Does the R script run and display the plot without an error?
  • Can you explain why species belongs inside aes()?
  • Did you commit and push the script?