• home
  • about
  • people
  • quant-shop
  • research
  • events
  • lab manual

On this page

  • Lessons
  • Computational On‑boarding (3 days)
    • Lesson 5 — Day 1: RStudio, Projects, and first data workflow
    • Lesson 6 — Day 2: RMarkdown/Quarto + visualization basics
    • Lesson 7 — Day 3: Git & GitHub essentials for R users
    • Next steps

lab manual

This area is for lab members only.

Welcome members!

We are excited to have you join the Quantitative Histories Workshop! This section contains links to the required on-boarding documents that you will need to complete for our lab. When completing documents with sensitive information, please do not upload or email personal details (such as your SSN). Instead, you should stop by a Faculty Director’s office hours to finalize any forms.

For your first task, please complete the following steps below:

Step 1: Contact information
  • To complete the Quantitative Histories Workshop Information Form, please click here.
Step 2: Paperwork
  • Please email with the lab manager and your PI.
Step 3: Project on-boarding
  • Members must complete on-boarding for their project group; please see your TA.

  • Generally, members new to coding for our lab should start with the onboarding lessons below.

Lessons

Lesson Title Resources
0 Getting started
1 Intro to the Quantitative Histories Workshop Model
4 Computational On‑boarding: 3‑Day Foundations Slides
5 Day 1: RStudio, Projects, and First Data Workflow Slides
6 Day 2: RMarkdown/Quarto + Visualization Basics Slides
7 Day 3: Git & GitHub Essentials for R Users Slides
2 Case Study 1: Fatal Police Interactions
3 Case Study 2: The Red Record

Computational On‑boarding (3 days)

All new lab members complete a 3‑day foundational sequence (90 minutes per day) in R, RStudio, and Git. These sessions prepare you to join weekly lab work with open-source data and reproducible workflows.

Day Focus Key outcomes
1 RStudio, Projects, and first data workflow Create an RStudio Project; import a CSV; use tidyverse (select, filter, mutate, summarise, group_by) to produce a cleaned dataset.
2 RMarkdown/Quarto + visualization basics Create a reproducible report; build two ggplot2 figures and a summary table; render to HTML/PDF.
3 Git & GitHub essentials for R users Initialize Git in RStudio; commit code and reports; push to a GitHub repo; write a clear README.

After completing Days 1–3, you will: - Be able to create and manage RStudio Projects. - Import, clean, and summarize an open dataset using tidyverse. - Produce a short, reproducible report with figures and tables. - Use Git in RStudio and push a project to GitHub with a clear README.

Details and checklists for each day are in Lessons 5–7.


Lesson 5 — Day 1: RStudio, Projects, and first data workflow

Goal: Get comfortable in RStudio; create a project; load data; perform basic wrangling with tidyverse.

Before you start - Install R, RStudio, and Git on your machine. - Have a small CSV ready (lab-provided or an approved open dataset).

Agenda (90 minutes) 1. Orientation (10 min) - RStudio panes: Console, Script, Environment, Files, Plots, Packages, Help. 2. Live demo (25 min) - Create an RStudio Project (File → New Project → New Directory). - Write a script: r library(tidyverse) dat <- read_csv("data-raw/your_data.csv") glimpse(dat) summary(dat) - Install/update packages; use ?function and help(). 3. Guided practice (40 min) - In your Project: - Import a CSV. - Use select(), filter(), mutate(), and summarise() with group_by(). - Save a cleaned dataset to data/. 4. Debrief + deliverable (15 min) - Deliverable: A Project folder with one .R script that: - Loads a CSV. - Performs 2–3 tidyverse operations. - Saves a cleaned CSV.

Optional +30 min - Extra practice with dplyr verbs and handling missing values.


Lesson 6 — Day 2: RMarkdown/Quarto + visualization basics

Goal: Produce a short, reproducible report with figures and tables.

Before you start - Bring your Day 1 Project and cleaned dataset.

Agenda (90 minutes) 1. Recap (10 min) - Quick review of Day 1 workflow. 2. Live demo (25 min) - Create an RMarkdown (or Quarto) document. - Explain YAML, code chunks, and inline code. - Build two ggplot2 plots (distribution + relationship) with labels/theme. - Insert a simple summary table (knitr::kable() or gt). 3. Guided practice (40 min) - Convert Day 1 work into a 1–2 page report: - Brief research question. - Data source and sample. - 2–3 key descriptives. - 2 figures and 1 table. - Render to HTML or PDF; export one figure. 4. Debrief + deliverable (15 min) - Deliverable: Rendered report (HTML/PDF) committed to your project folder.

Optional +30 min - Tweak themes, practice caching, or try a parameterized report.


Lesson 7 — Day 3: Git & GitHub essentials for R users

Goal: Use Git in RStudio for version control and push a project to GitHub.

Before you start - Ensure Git is installed and configured. - Create a GitHub account (if you don’t have one).

Agenda (90 minutes) 1. Concepts (10 min) - Why Git? Repositories, commits, branches, and reproducible research. 2. Live demo (25 min) - In RStudio: - Initialize Git (git init). - Make first commit with a meaningful message. - Connect to a new GitHub repo and push. - View commit history in RStudio and on GitHub. 3. Guided practice (40 min) - In your Day 1–2 Project: - Initialize Git and commit your scripts and reports. - Create a new repository on GitHub. - Push your local repo to GitHub. - Add a README.md with: - 2–3 sentence project overview. - How to run the analysis (which script to source). 4. Debrief + deliverable (15 min) - Deliverable: A GitHub repo containing: - Your Project (scripts + RMarkdown + data). - At least 2 commits with clear messages. - A README describing the project.

Optional +30 min - Practice a simple branch/PR workflow: - Create a feature branch, make a small change, push, open a PR, and merge.


Next steps

  • Your TA will assign you to a project group; you will apply these foundations to a real analysis.

© 2026 Quantitative Histories Workshop

 

Built with love in Quarto