ESDA — Interactive Lab

A pedagogical companion to Exploratory Spatial Data Analysis: Spatial Clusters and Dynamics of Human Development in South America ↗ Back to the post

Why spatial autocorrelation? Why LISA?

Look at a map of human development across South America and one thing jumps out: prosperous regions tend to sit next to other prosperous regions, and lagging regions next to lagging regions. But is that clustering real, or could it arise by chance? Exploratory Spatial Data Analysis (ESDA) gives you the tools to answer.

This app turns the dials yourself. In four tabs you will: watch random data become a spatial cluster as you push the autocorrelation knob; reproduce a Moran scatter plot and see how its slope is Moran's I; identify HH, LL, HL, and LH regions like LISA does in the post; and finally compare the post's reported Moran's I values across outcomes and years on a forest plot.

From random to clustered — what positive spatial autocorrelation looks like

The left grid below is random (Moran's I near zero). The right grid morphs from random to clustered and back — the same idea behind the post's South-America choropleths, where prosperity and deprivation form contiguous bands rather than being scattered.

Animation cycles ~8 s. The right grid keeps the same cells; only the autocorrelation strength changes.
Tab 2

Moran's I Lab

Slide the autocorrelation strength on a simulated lattice and watch the Moran scatter plot rotate. The slope is I.

Tab 3

LISA Explorer

Per-region HH / LL / HL / LH counts as you turn the knob. Run 100 simulations to see the sampling distribution of I.

Tab 4

Forest plot

The post's Moran's I across outcomes and years on one chart. Toggle outcomes and methods; hover for SE and CI.

Glossary (open a card if a term is unfamiliar)

Spatial weights W
An n × n matrix encoding which regions are neighbours. Queen contiguity: share an edge or a corner. Row-standardised so each row sums to 1.
Moran's I
A scalar summary of global spatial autocorrelation. Slope of the regression of W·z on z. Positive I means like-values cluster geographically.
Spatial lag W·z
The weighted average of a region's neighbours' standardised values. "What do my neighbours look like, on average?"
LISA
Local Indicators of Spatial Association. Decomposes Moran's I into one statistic per region. Identifies where the clusters are, not just whether they exist.
HH cluster
High value surrounded by high neighbours — a hot spot. In the post: Southern Cone prosperity core in 2019 (30 regions).
LL cluster
Low value surrounded by low neighbours — a cold spot. In the post: Amazon / Guyana deprivation cluster in 2019 (37 regions).
HL / LH outliers
Regions whose value diverges sharply from their neighbours. HL = high value among low neighbours; LH = low value among high neighbours.
Permutation test
Re-shuffle region values across the map thousands of times to build a null distribution. The post uses 999 permutations and gets p = 0.001 for both 2013 and 2019.

Moran's I Lab

Pull the ρ slider rightward and watch the cloud of points on the Moran scatter plot rotate from a circular blob (random) into a tilted ellipse (clustered). The orange regression line's slope is Moran's I. In the post, this slope went from 0.568 in 2013 to 0.632 in 2019 — try setting ρ to those values and see what the scatter looks like at those levels.

0 = random; near 1 = strongly clustered.
side × side regions arranged on a square lattice.
Generates a new realisation at the same ρ.

Diagnostics

Moran's I
HH regions
LL regions
Outliers (HL+LH)
n regions

What to look for

  • Push ρ from 0 to 0.95 — the orange line rotates from flat (no slope) to steep (slope ≈ ρ).
  • The post's I = 0.632 (2019) sits near ρ ≈ 0.6 on the slider. Try it.
  • At low ρ, points spread evenly across all four quadrants. At high ρ, they pile up in HH (top-right) and LL (bottom-left).

LISA Explorer

Global Moran's I gives you one number for the whole map. LISA decomposes it region-by-region so you can see where the clusters are. Slide ρ and watch the HH/LL/HL/LH bars move; press Run 100 simulations to see the sampling distribution.

LISA counts

HH (hot spot)
LL (cold spot)
HL outlier
LH outlier
Not significant
Moran's I

Post's 2019 LISA counts (for reference)

HH30
LL37
HL5
LH1
Not significant80
Moran's I0.632

Sampling distribution of Moran's I

How variable is I across resampled lattices at the current ρ? Each click runs 100 fresh draws.

What to look for

  • At ρ ≈ 0, the LISA counts are roughly balanced across all four quadrants — nothing clusters.
  • At ρ ≈ 0.7 (the LISA Explorer default), HH and LL dominate while outliers shrink — matching the post's 30 HH + 37 LL + 6 outliers picture.
  • The 100-simulation histogram shows how Moran's I itself is a random variable. The post's I = 0.632 is a single draw from a distribution that depends on ρ and the spatial structure.

Moran's I across outcomes — forest plot

The post computes Moran's I for the SHDI and its three component indices (Health, Education, Income) in 2013 and 2019. The numbers come from the post's permutation tests with 999 random reshufflings; the 95% CI is computed from the permutation null. Toggle outcomes and methods to compare.

Outcomes

Methods

What to look for

  • For SHDI, I rose from 0.568 to 0.632 between 2013 and 2019 — the spatial divide deepened.
  • All level indices show strong positive autocorrelation; the change variable shows much weaker (and possibly insignificant) clustering, reflecting that most regions improved by similar small amounts.
  • The error bars overlap heavily for adjacent years but never cross zero — every estimate is statistically far from the null of no clustering.