Every analyst has made a map that “obviously” shows a hot spot. A red blob of crime incidents in the city center. A dark cluster of disease cases near a river. A concentration of accidents on a stretch of highway. The eye finds the pattern instantly, and the manager nods. Then someone, usually the person you least want to disappoint, asks: “How do you know that isn’t just where most people live?”
That question is the reason hot spot analysis exists. It takes the eyeball impression and puts it to a statistical test: is this cluster of high values larger than what pure chance would produce, given the values around it? The most widely used tool for the job is the Getis-Ord Gi* statistic (pronounced “G-i-star”). In this guide I’ll explain what it measures, how to read its output, how to run it properly, and the traps that turn a rigorous method into a decorated guess.
This article is part of our work on spatial statistics. For the full conceptual frame, read Spatial Statistics for GIS: Complete Guide.

What Is a Hot Spot?
A hot spot is a location where high values cluster together, significantly more than you would expect by chance. A cold spot is the opposite: a cluster of low values.
Notice two subtleties right away.
- A hot spot is not simply a feature with a high value. A single district with a very high rate, surrounded by districts with low rates, is an outlier, not a hot spot. Gi* looks for high values surrounded by other high values.
- A hot spot is a statistical claim, not a visual one. It comes with a z-score and a p-value, and can be right or wrong at a stated confidence level.
The Getis-Ord Family
The statistics are named after Arthur Getis and J. K. Ord, who introduced them in the early 1990s. You will meet three related versions.
- General G: a global statistic that tells you whether high values or low values tend to cluster across the whole study area. It gives one number for the entire map.
- Gi: a local statistic computed for each feature, using its neighbors only (the feature itself is excluded).
- Gi*: a local statistic for each feature, using the feature and its neighbors (the focal feature is included).
Why the star matters
Gi* includes the feature itself in the calculation. For hot spot mapping this is usually what you want: you are asking whether a neighborhood, centered on this feature and including it, is unusually high. That is why tools and textbooks overwhelmingly use Gi* for hot spot analysis.
What Gi* Actually Computes
Without the formula, the logic is simple.
- For each feature, define its neighborhood: the features considered close enough to count.
- Sum the values within that neighborhood, including the feature itself.
- Compare that local sum to the sum you would expect if values were distributed at random across the whole study area, taking into account the overall mean and variability.
- Convert the difference into a z-score, the number of standard deviations by which the local sum differs from expectation, and a p-value.
The output, for every feature, is:
- A z-score. A large positive value means the local neighborhood is unusually high (hot). A large negative value means unusually low (cold). Near zero means nothing special.
- A p-value. The probability of seeing a local pattern at least this extreme if the values were randomly arranged. Small values mean it is unlikely to be chance.
Reading the Results: Confidence Levels
Hot spot tools usually translate z-scores and p-values into confidence bins.
| z-score (approx.) | p-value | Confidence | Meaning |
|---|---|---|---|
| above 2.58 | below 0.01 | 99 percent | Strong hot spot |
| 1.96 to 2.58 | 0.01 to 0.05 | 95 percent | Hot spot |
| 1.65 to 1.96 | 0.05 to 0.10 | 90 percent | Weaker hot spot |
| between -1.65 and 1.65 | above 0.10 | Not significant | No significant clustering |
| -1.65 to -1.96 | 0.05 to 0.10 | 90 percent | Weaker cold spot |
| -1.96 to -2.58 | 0.01 to 0.05 | 95 percent | Cold spot |
| below -2.58 | below 0.01 | 99 percent | Strong cold spot |
Two important cautions.
- These thresholds assume a single test. You are running hundreds or thousands of tests, one per feature, so some “significant” results will appear by chance alone. Good tools offer a False Discovery Rate (FDR) correction that adjusts the thresholds. Use it.
- Statistical significance is not importance. A significant but tiny cluster may be irrelevant for decisions. Look at the actual values as well.
Preparing Your Data
Gi* requires careful input. Most poor results begin here.
1. Choose a numeric variable
Hot spot analysis needs a value attached to each feature: a count, a rate, an amount, a density. If you only have point events (each incident is a point with no value), you must first aggregate them, by counting points within polygons, such as districts, hexagons or grid cells, or let a tool do the aggregation for you.
2. Prefer rates over counts when population varies
A district with more people will have more crimes or more cases, simply because more people live there. Mapping raw counts shows where people are, not where risk is. Use rates (cases per 1,000 inhabitants) or other normalized values, carefully handling tiny populations.
3. Mind the aggregation unit
The size and shape of the polygons influences the result. This is the Modifiable Areal Unit Problem (MAUP): change the zoning and the pattern may change. Regular grids or hexagons give comparable units. Administrative areas are convenient but unequal. Test more than one.
4. Use a suitable projected CRS
The analysis uses distances between features, so the data should be in a projected CRS with meaningful units. See Coordinate Reference Systems (CRS) Explained Simply.
5. Check for outliers and small numbers
Extremely high values, or rates built on very few observations, can create false hot spots. Inspect your data, and consider smoothing or empirical Bayes rates for unstable small-number rates.
6. Ensure enough features
Gi* needs a reasonable number of features, usually at least thirty, to give reliable results. And every feature should have neighbors, so avoid isolated islands.
Defining Neighbors: The Conceptualization of Spatial Relationships
How you define “neighbors” is the most influential decision, and it deserves reflection.
- Distance band (fixed distance): features within a chosen distance are neighbors. Works well with points and with polygons of similar size. The distance should be large enough that every feature has at least a few neighbors, and small enough to capture the local scale of the process.
- K nearest neighbors: each feature’s nearest k features, regardless of distance. Useful when the density of features varies.
- Contiguity (queen or rook): polygons that share a border (rook) or a border or a corner (queen). Natural for polygon data of regular size.
- Inverse distance weighting: nearer neighbors count more than farther ones.
Finding a defensible distance
Don’t pick a distance at random. Two good approaches:
- Incremental spatial autocorrelation: compute Moran’s I at increasing distances and look for the peak of the z-score, which suggests the scale at which clustering is strongest. See Spatial Autocorrelation and Moran’s I Explained.
- Meaning-based choice: the distance people actually travel, the range of an effect, or the size of a neighborhood in the real process you study.
Row standardization
Most tools use row standardization, so that features with many neighbors don’t dominate those with few. It’s usually recommended with polygon data, especially for contiguity.
Running Hot Spot Analysis
In ArcGIS Pro
The Hot Spot Analysis (Getis-Ord Gi*) tool takes your features, the numeric field, the conceptualization of spatial relationships and the distance, and produces a layer with the z-score, p-value and a confidence-bin field. There is also an Optimized Hot Spot Analysis tool that selects a distance and aggregates points automatically, a good starting point for beginners, though you should still understand what it chose.
In GeoDa
GeoDa is a free program designed for exploratory spatial analysis. It runs Getis-Ord local statistics with permutation-based significance and produces cluster maps. An excellent way to learn.
In QGIS
QGIS doesn’t ship a one-click Gi* tool in its core, so people use plugins, Python or R, and GeoDa. Check the plugin repository for what is available for your version.
In Python (PySAL)
The PySAL family provides Gi* in its esda package, using spatial weights from libpysal:
import geopandas as gpd
from libpysal import weights
from esda.getisord import G_Local
# Polygons with a numeric column "rate", already in a projected CRS
gdf = gpd.read_file("districts.gpkg")
# Spatial weights: queen contiguity, row-standardized
w = weights.Queen.from_dataframe(gdf)
w.transform = "R"
# Gi* (star=True includes the focal feature), with permutation-based p-values
g = G_Local(gdf["rate"].values, w, star=True, permutations=999, seed=42)
gdf["gi_z"] = g.Zs # z-scores
gdf["gi_p"] = g.p_sim # simulated p-values
# Simple classification (apply FDR correction for serious work)
gdf["spot"] = "not significant"
gdf.loc[(gdf["gi_z"] > 1.96) & (gdf["gi_p"] < 0.05), "spot"] = "hot spot"
gdf.loc[(gdf["gi_z"] < -1.96) & (gdf["gi_p"] < 0.05), "spot"] = "cold spot"Library options and defaults evolve, so check the documentation for your version. For the wider toolkit, see Geospatial Development & Automation: The Ultimate Guide.
In R
The spdep package provides localG for local Getis-Ord statistics, within a comprehensive spatial statistics toolkit.
Mapping the Result
How you present the output matters as much as the analysis.
- Use a diverging color scheme: warm colors (reds) for hot spots, cool colors (blues) for cold spots, and a neutral gray or white for non-significant areas.
- Show confidence levels, for example three shades of each color for 90, 95 and 99 percent.
- Explain the legend in plain words: “statistically significant hot spot, 95 percent confidence”.
- Show the non-significant areas too, and don’t hide them. They are part of the answer.
- Add context: a light basemap, boundaries and labels, following the guidance in Cartography Principles: Designing Maps That Communicate.
- State the method on the map: the variable, the neighborhood definition and the distance, the correction applied.
A Worked Example: Traffic Accidents
Question: where do road accidents concentrate in a city, beyond what traffic volume explains?
- Collect accident points for three years, and traffic volume data.
- Create a hexagonal grid over the city, of a size that matches the scale of street blocks, and aggregate accidents per hexagon.
- Normalize by traffic exposure if available, such as accidents per million vehicle-kilometers, or at least understand that raw counts follow traffic.
- Choose a neighborhood using incremental spatial autocorrelation to find the scale where clustering peaks.
- Run Gi* with FDR correction.
- Map the results with a diverging palette, and mark 90, 95 and 99 percent confidence.
- Check the hot spots on the ground: what do they have in common? Complex intersections, poor lighting, school zones?
- Test robustness: repeat with a different grid size and distance. Hot spots that persist are more trustworthy.
- Report the findings with their limitations, and propose targeted interventions.
Interpreting With Care
- Hot spots indicate where, not why. They generate hypotheses. A cluster of crime may reflect crime, but also reporting practices or policing intensity.
- Absence of a hot spot is not absence of a problem. Gi* detects clusters. A widespread, uniformly high pattern, or an isolated severe case, won’t show up.
- Results depend on your choices: variable, aggregation unit, distance, weights. Report them.
- Beware of edge effects. Features at the boundary of the study area have fewer neighbors, which can bias results. Consider a buffer of data beyond your area.
- Temporal stability matters. A hot spot that appears in one month may vanish in the next. Time-based extensions, such as emerging hot spot analysis with space-time cubes, test whether clusters are new, persistent or fading.
- Avoid ecological fallacy. A hot spot of high rates in an area doesn’t mean every person there is at risk.
- Consider ethical implications. Labeling a neighborhood a “hot spot” can stigmatize its residents. Communicate with care.
Hot Spots vs. Other Tools
| Tool | What it tells you | Statistical test? |
|---|---|---|
| Kernel density (heat map) | Where events are concentrated, visually | No |
| Gi* hot spot analysis | Where high or low values significantly cluster | Yes |
| Local Moran’s I (LISA) | Clusters and spatial outliers (HH, LL, HL, LH) | Yes |
| Global Moran’s I | Whether there is clustering anywhere in the study area | Yes |
| DBSCAN and K-Means | Groups of points by density or proximity | No (algorithmic grouping) |
A heat map is a good first look, but it doesn’t test significance and is highly sensitive to its bandwidth. Local Moran’s I complements Gi* by identifying outliers. And clustering algorithms, described in Spatial Clustering: DBSCAN, K-Means, and Cluster Analysis, group points without a null hypothesis.
Common Mistakes
- Mapping raw counts where population or exposure varies.
- Choosing a distance arbitrarily, or too small, leaving features with no neighbors.
- Ignoring multiple testing, and reporting every 90 percent hot spot as a discovery.
- Using geographic coordinates where distances are in degrees.
- Running it on very few features.
- Using unstable small-number rates.
- Not testing different units or distances, and trusting a single run.
- Confusing hot spots with high values or with density.
- Presenting hot spots as causes.
- Omitting the method details from the map, which makes the result impossible to judge or repeat.
Final Thoughts
Hot spot analysis is a perfect example of what makes GIS more than cartography. It gives us a disciplined way to separate patterns that merely look striking from patterns that are statistically credible, and a language, z-scores, p-values and confidence levels, for discussing them with other professionals.
Use it with the humility of any statistical tool. Choose your variable and neighborhood deliberately, correct for multiple testing, test robustness and describe your limits. When you do, a hot spot map stops being a decoration and becomes evidence.
Where to go next: learn the global side of the story in Spatial Autocorrelation and Moran’s I Explained, and the algorithmic alternatives in Spatial Clustering: DBSCAN, K-Means, and Cluster Analysis.



