Statistics
The Statistics toolbox answers a question you cannot settle by looking at a map: is the pattern you think you see actually there, or would a random arrangement of the same values look much the same?
Five tools, all running in your browser. Two of them report numbers in the run log, two write a new layer you can style, and one produces a density surface.
Two things to set before anything else
Section titled “Two things to set before anything else”The value field. Except for the two purely geometric tools, these methods work on one numeric attribute of your layer: a population, a price, a rate, a measurement.
The spatial weights. Every one of these methods needs a definition of what “nearby” means, because that is what makes them spatial rather than ordinary statistics. You choose between:
- K nearest neighbours, the default, where each feature is compared with its
kclosest neighbours, 8 by default. Robust when your features are unevenly spread. - Distance band, where each feature is compared with everything within a radius you set in kilometres. Meaningful when the distance itself matters, such as a 30 minute drive or a noise radius. Watch out for isolated features with no neighbour at all inside the band.
Permutations control the significance test. The tool shuffles your values at random many times, 999 by default, and checks how often chance produces a pattern as strong as yours. More permutations give a more stable p-value and take longer.
These tools work on point and polygon layers, up to 5000 features.
Start here
Section titled “Start here”Getis-Ord Gi* hotspots
Section titled “Getis-Ord Gi* hotspots”The most directly readable of the five. It looks at each feature together with its neighbours and tells you whether that neighbourhood is a hot spot, a cluster of high values, or a cold spot, a cluster of low ones.
The result is a new layer where every feature carries a z-score. Style it with a diverging colour ramp centred on zero and you have the classic hotspot map: strong positive is hot, strong negative is cold, near zero is unremarkable.
A high value on its own is not a hotspot. A hotspot is a high value surrounded by other high values, which is precisely what makes the method useful.
Local Moran’s I (LISA)
Section titled “Local Moran’s I (LISA)”Goes one step further and sorts each feature into four kinds of local pattern.
| Result | What it means |
|---|---|
| High-High | A high value among high values. The core of a cluster. |
| Low-Low | A low value among low values. |
| High-Low | A high value surrounded by low ones. An outlier, often the interesting case. |
| Low-High | A low value surrounded by high ones. |
Features whose pattern could be explained by chance are labelled Not significant. The output layer carries the cluster label, the local statistic and the pseudo p-value, so colour it by the cluster field.
Where Gi* shows you where the concentrations are, LISA also shows you the exceptions, which is why the two are often run together.
Kernel density (heatmap)
Section titled “Kernel density (heatmap)”Turns a point layer into a continuous density surface, the familiar heat map. Each point spreads its influence over its surroundings, and the surface is the sum of all of them.
| Parameter | What to set |
|---|---|
| Point layer | The points to spread. |
| Weight field | Optional. A numeric field weighting each point, so a shop with ten times the turnover counts ten times. Blank means every point counts the same. |
| Search radius / bandwidth (km) | How far each point spreads. This decides everything: too small and you get isolated dots, too large and everything blurs into one smooth blob. |
| Cell size (km) | The resolution of the output grid. Keep it well below the bandwidth, roughly a fifth of it. |
Bandwidth is a choice, not a measurement, so try two or three values and keep the one that shows structure without inventing it.
Global Moran’s I and Average nearest neighbor
Section titled “Global Moran’s I and Average nearest neighbor”These two do not produce a layer. They report their result in the run log, at the bottom of the panel, because their answer is a single verdict about the whole layer.
Global Moran’s I tells you whether similar values sit near each other overall. The log gives the statistic, the value expected under randomness, a p-value and a plain reading: clustered, dispersed, or no significant autocorrelation. Run it before LISA or Gi*: if the global test finds nothing, local clusters are unlikely to be worth chasing.
Average nearest neighbor ignores your attributes entirely and asks whether the points themselves are clustered, dispersed, or randomly spread. The log gives the observed and expected mean distance to the nearest neighbour, their ratio, a z-score and a p-value. A ratio below 1 means clustered, above 1 means dispersed.
All the tools
Section titled “All the tools”| Tool | What it does | Result |
|---|---|---|
| Global Moran’s I | Measures overall spatial autocorrelation of a numeric field across the layer. | Run log |
| Local Moran’s I (LISA) | Classifies each feature as High-High, Low-Low, High-Low, Low-High or not significant, with a pseudo p-value. | New layer |
| Getis-Ord Gi* hotspots | Finds statistically significant hot spots and cold spots of a numeric field. | New layer |
| Average nearest neighbor | Tests whether points are clustered, dispersed or randomly distributed. | Run log |
| Kernel density (heatmap) | Estimates a density surface from points, with an optional weight field. | New layer |
Significance is not importance. A significant cluster of two features can be statistically real and practically irrelevant. Read the numbers next to what you know of the ground.
Rates, not raw counts. Mapping counts by area usually just maps where people live. Convert to a rate or a density before testing, unless the count itself is the subject.