Add spatial autocorrelation statistics (Moran's I, LISA, Geary's C)

Aperta
#1,135 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
numpy, python
Ambito
data

Direzione di ricerca

Start by reading hotspots() and emerging_hotspots(), then trace the existing ArrayTypeFunctionMapping backend dispatch pattern for numpy, cupy, and dask variants. Define how global and local statistics, permutation p-values, spatial weights, and categorical join counts fit the raster API; done means the listed statistics support the specified backends and return scalars or grid-matched DataArrays as described.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

after-1.0.0-release enhancement

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
Lingua principale
Python
Stelle
972
Fork
92
Merge medio
2g 12h
PR unite (30g)
7

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di xarray-contrib/xarray-spatial

Tutte le issue di xarray-contrib/xarray-spatial

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.