2026-4-20

Groups!

##           group 1           group 2           group 3         group 4
## 1 Kang, Christine     Moore, Allana   Randall, Javion                
## 2     Ong, Alyssa Mahoney, Brigette       Qin, Celine Batson, Anthony
## 3   Leahy, Olivia      Myoung, Sein       Smith, Reid    Mendoza, Ava
## 4  Devir, Lindsey       Pham, Canon Wolfenstein, Luci   Pacheco, Alex
##           group 5
## 1    Barga, Jolie
## 2 Bell, Mary Rose
## 3  Knowles, Genny
## 4 Kang, Christine

Warm-up

  • How would you gather data on neighborhood social change?
  • You don’t need to use all the information or produce a finished product
##           group 1           group 2           group 3         group 4
## 1 Kang, Christine     Moore, Allana   Randall, Javion                
## 2     Ong, Alyssa Mahoney, Brigette       Qin, Celine Batson, Anthony
## 3   Leahy, Olivia      Myoung, Sein       Smith, Reid    Mendoza, Ava
## 4  Devir, Lindsey       Pham, Canon Wolfenstein, Luci   Pacheco, Alex
##           group 5
## 1    Barga, Jolie
## 2 Bell, Mary Rose
## 3  Knowles, Genny
## 4 Kang, Christine

Today’s Class

  • Warm-up: neighborhood change
  • Gathering data in the 21st century
  • Activity: data modelling
  • Data models

Wednesday’s Class

  • Using APIs
  • Web Scraping
  • Data Models
  • Prediction

Office Hours

  • Office Hours: Fridays, 1:30pm-3:00pm (Tyler)
  • Tuesdays, 10:30am-12:00pm (Yao)

Miscellaneous

  • Problem set and file naming
  • GitHub/PSet Submissions
  • PSet 3 and week 3 course site materials released shortly

Gathering Data in the Twenty-first Century

Traditional Methods for Studying Neighborhood Change

  • Probabilistic surveys!
  • Census
  • Qualitative interviews/ethnographic observations
  • Does computation change the way we do these methods?

Traditional Methods for Studying Neighborhood Change

  • Probabilistic surveys! (recruit respondents on social media)
  • Census (use API to pull data)
  • Qualitative interviews/ethnographic observations (observe online behavior)
  • Does computation change the way we do these methods?

New Methods for Studying Neighborhood Change

New Methods for Studying Neighborhood Change

New Methods for Studying Neighborhood Change

  • Use Application Program Interfaces (APIs) to gather census data tidycensus
  • Open-access measures Urban Displacement Project
  • Wiki Surveys (flexible surveys with user input) allourideas.org
  • Ecological Momentary Assessments (survey people in real time)
  • Gamification (fun surveys)
  • Gathering text from online sources (scraping)
  • Gathering images or data from online sources
  • Link surveys to gathered data
  • Let’s look at some examples!

Gentrification

  • Much debate about occurrence and extent of gentrification
  • However: empirical evidence of neighborhood change is limited (surveys, census data)

Hwang’s Study

  • Hwang’s solution: use Google Street View to look at neighborhood change
  • Combined these data with Census data
  • Compared these estimates to earlier Chicago gentrification estimates

Hwang’s Study

  • In pairs: discuss whether Hwang’s approach would be effective for studying gentrification in the Bay Area

Incarceration in the US

  • The US incarceration system is large (more on this soon)
  • Little is known about how people re-enter society after incarceration

Sugie’s Study

  • Sugie’s solution: administer cell phones to study participants leaving prison
  • Conduct “Ecological Momentary Assessments” (daily surveys) to assess well-being, job search, and more

Sugie’s Study

  • In pairs: discuss how Sugie’s approach helps us learn more about human behaviors, and any potential challenges to gathering data this way

Data Modelling activity

Data Modelling

  • Plot some (or all) of the incarceration data
  • How would you predict what rates will be in 2030?
##           group 1           group 2           group 3         group 4
## 1 Kang, Christine     Moore, Allana   Randall, Javion                
## 2     Ong, Alyssa Mahoney, Brigette       Qin, Celine Batson, Anthony
## 3   Leahy, Olivia      Myoung, Sein       Smith, Reid    Mendoza, Ava
## 4  Devir, Lindsey       Pham, Canon Wolfenstein, Luci   Pacheco, Alex
##           group 5
## 1    Barga, Jolie
## 2 Bell, Mary Rose
## 3  Knowles, Genny
## 4 Kang, Christine

Data Modelling

Why Model Data?

  • We may want to make generalizations or predictions
  • For example: Will incarceration trends continue through 2030? What leads to rises in incarceration?

Linear Models

  • How would we calculate line of best fit from our incarceration data?

Non-Linear Models

  • Polynomials: quadratic, cubic, etc.
  • Tree-based models! Random forests
  • Neural networks
  • And more

Splitting Our Data

  • Data scientists often split their data into training and test sets
  • Goal: choose model that is likely to predict well out of sample

Final Project Proposal!

Final Project Proposal

  • Share one idea for potential final project