get_st_indicators: Get spatio-temporal indicators from a data frame containing...

Description Usage Arguments Details Value References

View source: R/st_indicators.R

Description

Calculate spatio-temporal indicators of one or more variables within a spatio-temporal neighborhood of one or more maximum radius (in terms of spatio-temporal distance).

Usage

1
2
3
4
get_st_indicators(df, stations_sf, radiuses = c(0.1), stats = c("mean",
  "sd"), alpha = 0.5, neib_type = "cone", time_id = "time",
  site_id = "site_id", vars = c("value"), parallel = FALSE,
  nsplits = 4)

Arguments

df

A data frame containing spatio-temporal information

stations_sf

An sf object containing geographical information on the location of df

radiuses

A vector of values defining the maximum spatio-temporal distance allowed for an observation to be considered within a spatio-temporal neighbourhood

stats

A vector containing the names of functions that are to be used to calculate summarizing statistics

alpha

a weighting factor for the spatio-temporal distance

neib_type

the type of neighborhood to consider. Can be

  • cone (default) - a cone with the center of its base at the observation (spatial radius growing with time)

  • reversed - a cone with its peak at the observation (spatial radius shrinking with time)

time_id

The name of the column containing time-stamps in df

site_id

The name of the column containing location IDs in df

vars

The name of the variables to summarize into indicators

parallel

Boolean indicating whether the code should run in parallel. Default is FALSE

nsplits

Number of subsets of rows to split the data frame into so they can be processed in parallel

Details

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.

Value

A data frame that contains summary statistics of the values of vars found within the spatio-temporal neighbourhoods of the one or more radiuses of each pair (location ID, time-stamp) in df

References

Ohashi, Orlando, and Luis Torgo. "Wind speed forecasting using spatio-temporal indicators." ECAI. 2012.


mrfoliveira/Evaluation-procedures-for-forecasting-with-spatio-temporal-data documentation built on April 11, 2021, 10:50 a.m.