spatial-ews / spatialwarnings

An R package to compute spatial early-warning signals of ecosystem degradation
Other
14 stars 4 forks source link

Add variogram-based indicators #85

Closed alexgenin closed 3 years ago

alexgenin commented 5 years ago

Nijp et al. (2019) suggest using (semi-)variograms as a way to detect spatial autocorrelation. In their words:

Variograms (Figure 6) provide a measurable, interpretable and intuitive measure of vegetation patch‐size distribution (Li & Reynolds, 1995; Woodcock et al., 1988), are applicable to binary data, quantify spatial correlation (in random and spatially structured components) and can account for anisotropy (e.g. linear features on sloping terrain) in a single analysis (Rossi et al., 1992; Webster & Oliver, 2007). Additionally, variograms do not, in contrast to wavelength analyses (e.g. Fast Fourier Transforms; Mugglestone and Renshaw (1998)), require equidistant sampling and preprocessing to deal with no data values. https://onlinelibrary.wiley.com/doi/full/10.1111/gcb.14591

Variograms would indeed be a good addition to the package. On top of just using variogram-based measures of autocorrelation, variograms could be used as an alternative way to measure anisotropy in a given image (complementing the theta-spectrum method to detect if patterns are periodic/anistropic in an image).

However, after a quick look, it seems that variogram implementations in R are designed for cases when you have spatial points with x/y coordinates, and not a raster image. As a consequence, they are quite slow (and thus cannot be repeated 1000 times, which is required to test for significance). We could however use a different implementation, or use our own (probably not too hard to implement).

TODO:

alexgenin commented 4 years ago

There is now a first stab at an implementation in the package. To speed up variogram computations, a random subset of cells is chosen from the matrix.

alexgenin commented 4 years ago

These indicators will not make it for spatialwarnings 2.0, but will be integrated later so that we can have the feedback from Jelmer (Nijp, from Nijp et al. 2019)

alexgenin commented 3 years ago

These are now implemented in the package (still with experimental status).