align_time_grid: Align a time series to an specific time grid.

align_time_gridR Documentation

Align a time series to an specific time grid.

Description

The function aligns the frequency of the input time series with the output frequency given as an argument using the specified aggregation function.

Usage

align_time_grid(
  data,
  timeColumn = "time",
  valueColumn = "value",
  isRealColumn = "isReal",
  outputFrequency,
  aggregationFunctions = c("SUM", "AVG", "MIN", "MAX"),
  aggregationFunctionsSuffix = NULL,
  useEstimatedValues = F,
  tz = "UTC"
)

Arguments

data

<data.frame> containing the time series that has to be aligned with an output time step, i.e. with a specific frequency. If the measurementReadingType of the series is not instantaneous, the data must be converted first using the function clean_ts_integrate.

timeColumn

<string> identifying time column in data time series

valueColumn

<string> identifying value column in data time series

isRealColumn

<string> identifying the column in data time series that describes whether a value is real (T) or estimated (F).

outputFrequency

<string>. The frequency used to resample the input time series for the alignment. It must be a string in ISO 8601 format representing the time step (e.g. "PT15M","PT1H", "P1M", "P1D",...).

aggregationFunctions

<array> of strings. The aggregation functions to use when resampling the series. Supported aggregation functions: AVG, SUM, MIN, MAX, HDD (base temperature 20, 21, 22), CDD (base temperature 20, 21, 22).

aggregationFunctionsSuffix

<string> added as a suffix in resultant column values. Optional.

tz

<string> specifying the local time zone related to the building in analysis. The format of this time zones are defined by the IANA Time Zone Database (https://www.iana.org/time-zones).

useEstimatedValued

<boolean>. Do not ignore estimated values in input time series.

Value

<data.frame>. The time series resampled with the specified period and aggregation functions.


biggproject/biggr documentation built on Oct. 2, 2024, 11:13 p.m.