Description Usage Arguments Details Value References
View source: R/st_indicators.R
Calculate a spatio-temporal indicator of a certain variable within a spatio-temporal neighborhood of a certain radius.
1 2 3 4 5 6 7 8 9 | get_st_indicator(
all_neib_vals,
stat,
radius,
ind_name,
var,
time_id = "time",
site_id = "site"
)
|
all_neib_vals |
a data frame containing information on observations spatio-temporal distance to neighbours and variable values at the neighbouring locations and times. |
stat |
the name of a function that calculates a statistic (e.g., "mean"). If the stat is "weighted.mean" then the inverse of the spatio-temporal distance is used to weight the values of observations in the spatio-temporal neighbourhood |
radius |
a value defining the maximum spatio-temporal distance allowed for an observation to be considered within a spatio-temporal neighbourhood |
ind_name |
the name of the indicator column |
var |
the name of the variable to summarize into an indicator |
time_id |
the name of the column containing time-stamps |
site_id |
the name of the column containing location IDs |
The spatio-temporal distance is defined as
D_{i,j} = d_{i,j} x α + t_{i,j} x (1-α)
where d_i,j is the spatial distance between
locations, t_i,j is the temporal distance
between time-stapms and α is a weighting factor.
Note that radius
should always be a number between
zero and min(alpha, alpha-1)
, so the border conditions apply.
Also note that if alpha
is set to 1, then instead of a cone,
the neighbourhood will have the shape of a cylinder.
A data frame that contains a summary statistic
of the values found within the spatio-temporal neighbourhood
of a certain radius of each pair (location ID, time-stamp) in
all_neib_vals
http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.258.8742&rep=rep1&type=pdf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.