LAB 1 — ASSIGNMENT

Measurement, Indexing & Multi-Scale Mapping

Download the assignment file, complete the three questions, and submit your .qmd and rendered .html to Canvas.

Assignment Workflow

This file is identical to the tutorial
The pre-filled code (Steps 1–8) produces the same output as the tutorial. If this file is in the same folder as your tutorial QMD, you can knit immediately and see the same results. If you placed it in a different location, run the packages chunk first, then knit.
Need a Census API key?
Setup instructions are in the Lab 1 Tutorial under “Before You Begin.” Register free at api.census.gov/data/key_signup.html — key arrives by email within minutes.
1

Download and rename

Use the download link below. Save to your PAF516/Lab1/ folder. Rename to Lab1_Assignment_YourLastName.qmd before editing.

2

Knit the file first

Press Cmd+Shift+K (Mac) or Ctrl+Shift+K (PC). Steps 1–8 render automatically. Review the output — these are the results you will interpret for Q1.

3

Answer the three questions

Q1: Interpret the pre-filled results (text). Q2: Add a 6th variable by filling in the scaffold chunks at the end of the file (code). Q3: Evaluate your modification (text). Re-knit after completing Q2.

4

Submit to Canvas

Submit both Lab1_Assignment_YourLastName.qmd and Lab1_Assignment_YourLastName.html.

The Three Questions

Q1 Interpret the Baseline Results Text answer — no code required

After running Steps 1–8, answer the following in your own words:

  • What is the Cronbach's alpha for the 5-variable index? Is it acceptable (> 0.7)?
  • Looking at the national county map, where is hardship most concentrated?
  • How does the spatial pattern change as you zoom from counties → tracts → block groups?

Replace the placeholder text in the Q1 section of the assignment file. A few sentences per bullet is sufficient.

Q2 Add a 6th Variable to the Index Code + output required

Add percent of households receiving SNAP benefits as a 6th indicator variable:

  • Numerator: B19058_002 (households receiving SNAP)
  • Denominator: B19058_001 (total households)

Three scaffold chunks are provided — q2-pull, q2-index, and q2-map. Add code to each to:

  • Re-pull tract data with the 6th variable included
  • Recompute Cronbach's alpha with all 6 variables
  • Rebuild the index and re-map at the tract level
Q3 Evaluate the Addition Text answer — no code required

After completing Q2, compare your results and answer:

  • Did adding SNAP improve or weaken Cronbach's alpha? By how much?
  • Visually compare the 5-variable and 6-variable tract maps. Do the patterns differ?
  • Based on alpha and the maps, should you keep the 6th variable? Why or why not?

Quick Reference

ActionMacPC
Run current chunkCmd+ReturnCtrl+Enter
Knit / RenderCmd+Shift+KCtrl+Shift+K

Download & Submit

Lab 1 Assignment File

⬇ Download Lab1_Assignment.qmd

Right-click → Save Link As. Save to your PAF516/Lab1/ folder.

✓ Submit to Canvas

  • Lab1_Assignment.qmd — your edited source file
  • Lab1_Assignment.html — the rendered output