Skip to content

Commit 1cf594c

Browse files
committed
R DHI
1 parent 4c1a0da commit 1cf594c

File tree

4 files changed

+45
-0
lines changed

4 files changed

+45
-0
lines changed

rstats/ard/.gitkeep

Whitespace-only changes.

rstats/ts/.gitkeep

Whitespace-only changes.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# global header, e.g., for loading libraries
2+
# library(...)
3+
4+
# dates: vector with dates of input data (class: Date)
5+
# sensors: vector with sensors of input data (class: character)
6+
# bandnames: vector with bandnames of input data (class: character)
7+
force_rstats_init <- function(dates, sensors, bandnames){
8+
9+
return(c("cumulative", "minimum", "variation"))
10+
}
11+
12+
13+
# inarray: 2D-array with dim = c(length(dates), length(bandnames))
14+
# No-Data values are encoded as NA. (class: Integer)
15+
# dates: vector with dates of input data (class: Date)
16+
# sensors: vector with sensors of input data (class: character)
17+
# bandnames: vector with bandnames of input data (class: character)
18+
# nproc: number of CPUs the UDF may use. Always 1 for pixel functions (class: Integer)
19+
force_rstats_pixel <- function(inarray, dates, sensors, bandnames, nproc){
20+
21+
s <- sum(inarray[,1], na.rm = TRUE) / 1e2
22+
m <- min(inarray[,1], na.rm = TRUE)
23+
v <- sd(inarray[,1], na.rm = TRUE) / mean(inarray[,1], na.rm = TRUE) * 1e4
24+
25+
return(c(s, m, v))
26+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Dynamic Habitat Indices
2+
3+
&copy;
4+
Copyright 2023, David Frantz
5+
6+
## Run with
7+
8+
- program: ``force-higher-level``
9+
- submodule: ``TSA``
10+
- UDF type: ``RSTATS_TYPE = PIXEL``
11+
- required parameters:
12+
- ``INTERPOLATE = RBF`` with very large kernels
13+
- ``DATE_RANGE``: set to one(!) full year
14+
- required R libraries: none
15+
16+
## References
17+
18+
- Radeloff, V. C., M. Dubinin, N. C. Coops, A. Allen, T. M. Brooks, M. Clayton, G. Costa, C. H. Graham, D. Helmers, A. R. Ives, D. Kolesov, A. M. Pidgeon, G. Rapacciuolo, E. Razenkova, N. Suttidate, B. E. Young, L. Zhu, and M. Hobi. (2019): **The Dynamic Habitat Indices (DHIs) from MODIS and global biodiversity**. *Remote Sensing of Environment, 222*, 204-214. [10.1016/j.rse.2018.12.009](https://doi.org/10.1016/j.rse.2018.12.009)
19+
- Hobi, M.L., Dubinin, M., Graham, C.H., Coops, N.C., Clayton, M.K., Pidgeon, A.M., & Radeloff, V.C. (2017): **A comparison of Dynamic Habitat Indices derived from different MODIS products as predictors of avian species richness.** *Remote Sensing of Environment, 195*, 142-152. [10.1016/j.rse.2017.04018](https://doi.org/10.1016/j.rse.2017.04018)

0 commit comments

Comments
 (0)