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 Session: Think. Explore. Practice.

Think

Explore

  • Live Demo (Group 1): Survey Data Recoding & Variable Creation. Group 1 prepares a 10–15 min demonstration and shares the handout on WhatsApp before class (groups can book a meeting with the instructor to get direction).
  • The class should review the Pandas Working with Missing Data Guide to follow along and lead the peer discussion.

Practice

  • Practice recoding your project's DV and IV using Notebooks #05 & #06.
  • Looking Ahead: Milestone 4 - Analysis will be due in Session 9 (Feb 05 at 08:00).