LAB 4 — ASSIGNMENT

Spatial Autocorrelation & Hot Spot Analysis

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–7) 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 4 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/Lab4/ folder. Rename to Lab4_Assignment_YourLastName.qmd before editing.

2

Knit the file first

Press Cmd+Shift+K (Mac) or Ctrl+Shift+K (PC). Steps 1–7 render automatically. Review the Moran’s I output (Step 4) and the LISA cluster map (Step 7) — you will interpret these for Q1.

3

Answer the three questions

Q1: Interpret Global Moran’s I and identify hot spots from the LISA map (text). Q2: Re-run the full LISA analysis on poverty rate alone using the scaffold chunks (code). Q3: Compare poverty hot spots vs. composite index hot spots (text). Re-knit after completing Q2.

4

Submit to Canvas

Submit both Lab4_Assignment_YourLastName.qmd and Lab4_Assignment_YourLastName.html.

The Three Questions

Q1 Interpret the Global Moran’s I and LISA Results Text answer — no code required

After knitting, review the Step 4 output and Step 7 maps, then answer:

  • Global Moran’s I: What is the value and is it statistically significant? What does this tell you about the spatial distribution of economic hardship in Maricopa County?
  • Hot spot identification: From the LISA cluster map, identify 2–3 specific hot spot (HH) areas. Where in the county are they concentrated?
  • Cold spots and outliers: Where are the cold spots (LL)? Are there any spatial outliers (HL or LH), and what might explain them?
Q2 LISA Analysis on Poverty Rate Alone Code + output required

Rerun the entire LISA analysis on poverty rate alone instead of the composite economic hardship index:

  • Four scaffold chunks are provided: q2-poverty-morans, q2-poverty-lisa, q2-poverty-lisa-map, and q2-comparison
  • The spatial weights (lw) are already built in Step 3 — you only need to rerun moran.test(), localmoran(), and the classification/mapping code
  • Substitute poverty_rate for hardship_index
Q3 Compare Poverty Hot Spots vs. Composite Index Hot Spots Text answer — no code required

Compare the results from Q2 with the composite index results from Steps 4–7:

  • Pattern comparison: Do the hot spots shift when you use poverty rate alone vs. the 5-variable composite index? Are some areas identified by one measure but not the other?
  • Measurement implications: What does this tell you about using a single variable vs. a composite index for spatial analysis?
  • Policy relevance: If advising a city agency on where to target neighborhood investment, would you use the poverty-rate hot spots or the composite-index hot spots? Why?

Quick Reference

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

Download & Submit

Lab 4 Assignment File

Download Lab4_Assignment.qmd

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

Submit to Canvas

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