Spatial Statistics · Python · Geostatistics

Build rigorous, reproducible
geostatistical pipelines in Python.

From spatial autocorrelation and variogram fitting to kriging interpolation, spatial regression, and memory-efficient processing at scale — a production playbook for spatial data scientists, environmental analysts, and Python GIS teams.

Why spatial data needs its own methods

Spatial data violates the i.i.d. assumption. Observations near each other are correlated, scale changes everything, and naive cross-validation silently inflates accuracy. This site documents the methods, code, and design patterns that let you ship spatial models that actually generalise.

Three pillars anchor the site: Core Concepts covers the mathematical foundations — spatial dependence, stationarity, variography, point processes, and weight matrices. Kriging & Interpolation turns sparse point data into uncertainty-aware surfaces using IDW, ordinary kriging, and universal kriging with PyKrige. Python Workflows wires everything together into end-to-end pipelines with GeoPandas, PySAL, scikit-gstat, and Dask — including spatial regression, cross-validation, and memory-efficient processing.

Every page ships copy-ready Python, explicit validation diagnostics, and documented failure modes — the parts that matter in production but rarely appear in tutorials.

The three pillars

Start with whichever fits your current question. Each pillar links to sub-topics and deep-dive articles.

Core Concepts — topics

Sub-topics within Core Concepts of Spatial Statistics & Geostatistics.

Kriging & Interpolation — topics

Sub-topics within Kriging, Interpolation & Surface Generation Techniques.

Python Workflows — topics

Sub-topics within Python Workflows for Spatial Modeling & Regression.

Start here — implementation guides

The most-used walkthroughs. Each one is self-contained: copy the code, run it, ship it.

Kriging & Interpolation
Step-by-Step Ordinary Kriging with PyKrige
Core Concepts
How to Calculate Moran's I in PySAL
Python Workflows
Spatial K-Fold Cross-Validation Setup
Core Concepts
Ripley's K-Function Implementation Guide
Core Concepts
Correcting Spatial Sampling Bias with GeoPandas
Python Workflows
Implementing Spatial Lag Models in Python

All implementation articles

Every hands-on guide on the site, organised by pillar.

Point Pattern Analysis
Ripley's K Function Implementation Guide
Sampling Bias Mitigation
Correcting Spatial Sampling Bias with GeoPandas
Spatial Autocorrelation Metrics
How to Calculate Moran's I in PySAL
Spatial Weight Matrices
Building Custom Spatial Weights Matrices in Python
Stationarity Trend Analysis
Testing for Second-Order Stationarity in Python
Ordinary Universal Kriging
Step-by-Step Ordinary Kriging with PyKrige
Cross Validation Strategies
Spatial K-Fold Cross-Validation Setup in Python
Geopandas Data Preparation
Optimizing GeoPandas Spatial Joins for Large Datasets
Memory Efficient Processing
Reducing Memory Bottlenecks in Geospatial Workflows
Spatial Regression Models
Implementing Spatial Lag Models in Python