Skip to content

From Comparisons to Transformations

This module marks a shift from describing data to actively transforming it. You will learn how to reshape raw survey data into analytically meaningful variables using Python.

Reminder

Good quantitative analysis is not just about running models, it starts with careful decisions about how concepts become variables.

Theory

Where We Are in the Course

  • Milestone 3 & Upcoming milestones
    • Moving beyond exploration toward transformations and modeling
  • Playground Notebooks

Application

Retrospective

In agile project management, a retrospective is a brief meeting held, at the end of an iteration (e.g. sprint), to look for ways to improve the process for the next iteration (Beck, K., et al. 2001).

Code

Data Wrangling & Cleaning

Tip

To load and use a notebook in VS Code follow the steps 3-5 in 📘 Notebooks in VS Code

What You’ll Practice

Using ANES 2020 data, you will learn how to:

  • Recode categorical survey variables
  • Create new variables from existing ones
  • Handle missing values explicitly
  • Prepare data for statistical modeling and visualization

Notebooks

  • Download and open Notebooks 5 & 6 in VS Code:

Get Ready for Next Week: Think. Read. Practice.

Thinking Ahead

  • Start defining a formal model that summarizes your paper's core idea. Ask yourself:
    • What is my dependent variable?
    • What are my key independent and control variables?
    • Do these variables already exist in ANES, or must I construct them?

Practice