Motivation
We already have Getis-Ord Gi* via hotspots() and emerging_hotspots(), but Moran's I (global and local/LISA) is the other fundamental spatial statistic that most analysis workflows depend on. Right now users have to leave xarray-spatial to compute these, which breaks the pipeline.
Scope
Statistics:
- Global Moran's I
- Local Moran's I (LISA) with significance testing via random permutation
- Geary's C (global and local)
- Join count statistics for categorical rasters
Spatial weights:
- Queen and rook contiguity derived from the raster grid structure
- Distance-band weights (binary and inverse-distance)
Implementation notes
- Should follow the existing backend dispatch pattern: numpy, cupy, dask+numpy, dask+cupy via
ArrayTypeFunctionMapping.
- Local statistics (LISA, local Geary) return xarray DataArrays matching the input grid. Global statistics (Moran's I, Geary's C) return scalar results.
- P-values from permutation testing should be included in the output, either as a second DataArray or as attributes.
- Permutation-based significance is embarrassingly parallel and maps well to both dask chunks and GPU threads.
Related
hotspots() already computes Gi* z-scores
emerging_hotspots() does temporal hot spot classification
- PySAL/esda covers this for vector data, but there's nothing raster-native
Motivation
We already have Getis-Ord Gi* via
hotspots()andemerging_hotspots(), but Moran's I (global and local/LISA) is the other fundamental spatial statistic that most analysis workflows depend on. Right now users have to leave xarray-spatial to compute these, which breaks the pipeline.Scope
Statistics:
Spatial weights:
Implementation notes
ArrayTypeFunctionMapping.Related
hotspots()already computes Gi* z-scoresemerging_hotspots()does temporal hot spot classification