app.engine.getis_ord_gi_star module

app.engine.getis_ord_gi_star.compute_getis_ord_gi_star(grid)[source]

Compute Getis-Ord Gi* z-scores for a 2D numeric grid.

This implementation uses rook adjacency and includes the focal cell in the local neighborhood. It returns a matrix with one Gi* score per cell.

Parameters:

grid (Iterable[Iterable[float]])

Return type:

ndarray

app.engine.getis_ord_gi_star.rank_hotspots(grid)[source]

Rank cells by Gi* score from strongest hotspot to weakest.

Parameters:

grid (Iterable[Iterable[float]])

Return type:

list[tuple[tuple[int, int], float]]