Spatial Statistics Project

Spatial Autocorrelation & Methods Portfolio

Two case studies in applied spatial statistics: a Moran's I / LISA diagnostic pipeline built for the Ruhr region (Germany), and a four-dataset methods showcase covering choropleth classification, autocorrelation, point-pattern density, and spatial inequality.
Python GeoPandas libpysal / esda mapclassify folium
01 — Ruhr_Spatial_Diagnostics

Spatial Autocorrelation Diagnostics, Ruhr Region

A Moran's I / Local Indicators of Spatial Association (LISA) pipeline built as a methodology precursor to a Dortmund LULC / spatial-econometrics thesis — run here on a synthetic 810-cell grid over the real Regionalverband Ruhr (RVR) boundary to validate the workflow before applying it to real thesis variables.

KNN weights → Global Moran's I → Local Moran's I (LISA)

Global spatial autocorrelation: I = 0.559 (p = 0.001)

A K-nearest-neighbours spatial weights matrix was built over the grid, a spatial lag computed, and Global Moran's I tested against a permutation-based reference distribution — a strongly significant positive value, indicating the surface is far from spatially random.

Grid cells810 Global Moran's I0.559 p-value0.001
Choropleth of the synthetic LST/NDVI-style grid over the Ruhr region boundary
Synthetic surface (LST/NDVI-style values) over the RVR boundary
Reference distribution and Moran scatterplot, I = 0.56
Permutation reference distribution & Moran scatterplot

Local Moran's I decomposes the global signal into per-cell cluster types (High-High / Low-Low / High-Low / Low-High) and flags which clusters are statistically significant — the basis for targeted, rather than region-wide, follow-up analysis.

Four-panel LISA diagnostic: local statistics, scatterplot quadrant, significance map, and cluster map
LISA diagnostic — local statistics / quadrant / significance / cluster map
Open interactive LISA cluster map

Note: run on a synthetic grid as a workflow validation step — real Kreise-level thesis variables (LULC change, built-up density) are the next input, per the project README.

02 — Spatial_Methods_Portfolio

Spatial Methods Portfolio

Four independent case studies, each pairing a core spatial-statistics method with a real dataset: choropleth classification (Sri Lanka), spatial autocorrelation (UK), point-pattern density (Japan), and spatial inequality decomposition (US).

UK · Brexit referendum, 2016

Spatial Autocorrelation of the Leave Vote

Local-authority-level "% Leave" share, classified by quantiles, then tested for spatial clustering via KNN weights and Global/Local Moran's I — the canonical Moran's I / LISA workflow applied to a real, high-salience dataset.

Vote share range21.4%–75.6% ClassificationQuantiles
Choropleth map of UK Leave vote share by local authority, quantile classified
Leave vote share by local authority (quantile classification)
Four-panel LISA diagnostic for Brexit vote share: local statistics, scatterplot quadrant, significance, cluster map
LISA diagnostic — Scotland reads as a strong Low-Low (Remain) cluster, the English Midlands/East as High-High (Leave)
Open interactive Brexit map
Sri Lanka · GND-level population, 2001 vs 2011

Choropleth Classification Method Comparison

Nine classification schemes (Equal Interval, Quantiles, Std. Mean, Maximum Breaks, Box-Plot, Head/Tail Breaks, Jenks-Caspall, Fisher-Jenks, Max-P) were fit to the same right-skewed population distribution and compared via the Absolute Deviation around Class Medians (ADCM) fit statistic — the distribution shape below is exactly why classifier choice matters.

Kernel density estimate with rug plot showing a strongly right-skewed population distribution
Right-skewed population density distribution motivating the classifier comparison
Open interactive map (toggle between classification schemes)
Tokyo · 10,000 geotagged Flickr photo points

Point-Pattern & Density Analysis

Hexbin density, KDE surfaces, and centrography (mean/median center, standard deviational ellipse) applied to photo-point data, plus formal tests for complete spatial randomness (Ripley's G, quadrat chi-square) — moving beyond visual density to statistically confirm the clustering is non-random.

Points10,000 Peak density zoneMinato/Shinjuku
Hexbin density map of Flickr photo points across Tokyo
Hexbin density — photo activity concentrated around central Tokyo
Centrography plot showing mean center, median center, and standard deviational ellipse over Tokyo photo points
Centrography — mean/median center and standard deviational ellipse
Open interactive density map
US Counties · per-capita income, 1969–2017

Spatial Inequality Decomposition

Gini index, Lorenz curves, and Theil decomposition (between vs. within Census region) applied to a county-level per-capita income panel spanning nearly 50 years, alongside Queen-contiguity Global Moran's I computed for every year in the series.

Moran's I, 19690.65 Moran's I, 20170.42 TrendConverging
Quintile-classified choropleth map of US county per-capita income
Per-capita income by county (quintile classification)
Line chart of Global Moran's I for US county income from 1969 to 2017, declining from 0.65 to 0.42
Global Moran's I by year — spatial clustering of income has weakened steadily since 1969

The decline in Moran's I over five decades suggests county-level income patterns have become less spatially clustered over time — but the Theil decomposition shows the "within-region" component of inequality has been rising since 2010, even as the "between-region" gap continues to shrink.

03 — MGWR_SDM_Regime_Analysis

MGWR & Spatial Durbin Regime Analysis

Does one model fit the whole city? Multiscale GWR and a five-city-sector Spatial Durbin Model applied to the same 1,493-cell Dortmund landscape-metrics grid (Built-up Patch Density, Vegetation Cohesion, Vegetation Patch Density × 2015/2025/2035) — testing whether landscape-metric drivers are spatially stationary or structurally different by sector.

MGWR: local vs. global relationships

MGWR closes up to 60% of the unexplained variance a citywide model leaves behind

Built-up and Vegetation Patch Density are barely explained by a single global relationship (R² ≈ 0.52–0.59) — letting each covariate's coefficient vary spatially via its own optimal bandwidth lifts fit to R² 0.81–0.89. Vegetation Cohesion, already well explained globally (R² 0.88–0.92), gains comparatively little from local variation.

Grid cells1,493 Models fit9 (3 metrics × 3 years) Largest MGWR gain+0.34 R² (Built-up PD, 2015)
SDM: five city-sector regimes

The same variable can push a metric up in one sector and down in another

Grouping Dortmund's 12 Stadtbezirke into five sectors (Core/North/East/South/West City) and fitting a separate Spatial Durbin Model per sector, a Chow test confirms the sectors are structurally different (p < 0.001 for all nine metric/year combinations) — not just noisier versions of one citywide model. A landscape-shape-index change that suppresses built-up density directly can spill over to increase it in neighbouring cells, and the size — sometimes the sign — of that effect flips between sectors.

Open interactive regime-zone map Open full case study
04 — GWR_Overall_Analysis

GWR Overall — Per-Cell Coefficient Evolution

A companion question to the MGWR/SDM study above: rather than asking whether relationships vary across space, this fits single-scale adaptive GWR independently for 2015/2025/2035 and differences the results — do local coefficients themselves drift as the city develops?

Adaptive bandwidth by metric

Built-up and Vegetation PD are local (145–253 neighbours); Vegetation Cohesion is nearly global (608–860)

The bandwidth GWR selects for each metric is itself a diagnostic: Vegetation Cohesion needs 3–5× more neighbours to fit well, meaning its relationships are far smoother across space — consistent with its high global R² in the MGWR study. Differencing Built-up PD's coefficients year over year shows a covariate's local effect not just weakening or strengthening, but flipping sign in the same location a decade later.

Open interactive coefficient explorer Open full case study
05 — Regime_Landscape_Metrics

Regime Landscape Metrics — 35 Years of Fragmentation

Raw FRAGSTATS fragmentation metrics (not a modelled outcome) computed directly from land-use rasters, 2000–2035, by city-sector regime — rising steadily through 2020, then predicted to reverse. A formal structural-plausibility check flags which of the model's own forecast transitions fall outside each regime's historical envelope.

Structural plausibility check

Edge Density is flagged as implausible in all 5 regimes for 2025→2030

Comparing each regime/metric's predicted 5-year rate of change against its own historical mean ± SD annual rate surfaces exactly which forecast transitions to trust — Cohesion and Largest Patch Index are never flagged; Edge Density is flagged everywhere in the 2025→2030 transition.

Open interactive regime metrics monitor Open full case study
06 — Grid_Landscape_Metrics

Grid Landscape Metrics — Cell-Level Trend

The same fragmentation metrics as above, at native 1,493-cell resolution instead of 5-regime averages — so within-district variation a regime mean hides (South City's Patch Density ranges from 3.96 to over 2,000 across its own cells, versus one regime number of 17.49) is directly inspectable.

Grid vs. regime resolution

Every cell, individually, 2000–2035

Quantile-classed choropleth robust to boundary-sliver outliers, with an info panel showing all 5 grid-native metrics (SHDI, Built-up PD, Built-up AI, Vegetation Cohesion, Edge Density) for any hovered cell at the selected year.

Open interactive grid-cell metrics monitor Open full case study
07

Methods & Tools

Core LibrariesGeoPandas, libpysal, esda, mapclassify, folium
AutocorrelationKNN & Queen contiguity weights, Global/Local Moran's I, LISA clusters
ClassificationEqual Interval, Quantiles, Fisher-Jenks, Head/Tail Breaks, Max-P, ADCM fit comparison
Point PatternsKDE, hexbin density, centrography, Ripley's G, quadrat CSR tests
InequalityGini index, Lorenz curves, Theil decomposition (between/within)
OutputInteractive folium web maps, static cartography, reproducible notebooks