get_hotspots
site.SiteProblem.get_hotspots(
what='demand',
neighbourhood_method='rook',
combination_method='multiply',
k=None,
verbose=True,
significance_threshold=0.05,
force_weight_recalculation=False,
n_bins=3,
)Identify statistically significant hotspots and coldspots.
Returns hotspot, coldspot, outlier and non-significant classifications derived from Local Moran’s I.
Performs local spatial autocorrelation analysis on a selected variable using the specified spatial weights matrix. Areas with significantly high values surrounded by high values are classified as hotspots, while areas with significantly low values surrounded by low values are classified as coldspots.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| what | str | Variable to analyse. This may be the name of a stored dataset or metric associated with the problem, such as demand, accessibility, or equity measures. | "demand" |
| neighbourhood_method | (rook, queen, k - nearest) | Method used to define neighbouring regions. | "rook" |
| k | int | Number of neighbours to use when neighbourhood_method="k-nearest". Required if neighbourhood_method="k-nearest". |
None |
Returns
| Name | Type | Description |
|---|---|---|
| geopandas.GeoDataFrame | Region geometry layer with additional columns describing hotspot/coldspot classification and associated statistics. |
Notes
Spatial weights are generated when required and cached for reuse. Cached weights are automatically invalidated when the region geometry or weighting parameters change.