interpolate_pg_timeseries: interpolate_pg_timeseries

Description Usage Arguments Details Value

Description

Interpolation of time-series data where only some cross-sections are available.

Usage

1
2
3
4
5
6
7
8
9
interpolate_pg_timeseries(
  pgdf,
  variable,
  date_var = "year",
  interval = "1 year",
  startdate = NULL,
  enddate = NULL,
  add_pg_index = TRUE
)

Arguments

pgdf

output from PRIO-GRID gen_*() function.

variable

the variable to interpolate missing values from.

date_var

string denoting the name of the date variable. Defaults to "year".

interval

string denoting the interval between interpolated values, i.e. the temporal resolution. Defaults to "1 year".

startdate

starting date. Defaults to the earliest observation in the original data.

enddate

end date. Defaults to the latest observation in the original data.

add_pg_index

boolean, whether to add a pgid column or not. Default is TRUE.

Details

'interval' can be specified as '"day"', '"week"', '"month"', '"quarter"' or '"year"'. See 'seq.Date' for details.

Value

Interpolated time-series data frame.


prio-data/priogrid documentation built on June 28, 2021, 5:34 a.m.