Spatial statistics

Density, clustering, hotspots and autocorrelation — measuring pattern rather than drawing it.

Clustered, random and regular point patterns with the same number of points in the same area. the same 36 points, three timesclusteredrandomregularA count per zone cannot tell these apart — which is why this topic is statistics rather than mapping

Mapping shows you a pattern. Statistics tells you whether the pattern is one. Those are different questions, and the second needs a null model: a clustered, a random and a regular point pattern can hold exactly the same number of points in exactly the same area, and no count per zone distinguishes them.

Two choices decide most results here and are usually left at their defaults. The first is the neighbourhood — contiguity, k-nearest, or a distance band — which is a hypothesis about how the process spreads, not a technicality; change it and Moran’s I changes with it. The second is the scale of analysis, because autocorrelation measured over census tracts and over counties are answers to different questions.

Below: the concepts cover density, autocorrelation, clustering and hotspots; the how-to guides compute them; and the fixes are the results that come back null, or significant for the wrong reason.

Learning paths run through this topic too — see the end of this page.

🧭 Start with the concepts

The ideas the how-to guides below assume you already have.

Show every concept in this topic

⚙️ Then do the task

Step-by-step walkthroughs with code you can copy and adapt.

Show every how-to guide in this topic

🔧 When it breaks

The errors this topic produces, with the cause explained rather than just the command.

Show every fix in this topic

Related topics

Subjects that keep coming up alongside this one, most overlap first.

Keep browsing

Spatial statistics sits in Analysis. Every topic on the site is listed on the topics index.