transform_data: Apply different transformations to the original series

Description Usage Arguments Value Author(s) Examples

View source: R/transform_data.R

Description

This function apply different transformations to the original variables. This data preprocessing step was incorporated with the aim of highlighting different types of anomalies such as sudden isolated spikes, sudden isolated drops, sudden shifts, impossible values (negative values) and out of range values etc

Usage

1
2
transform_data(data, time_bound = 90, regular = FALSE,
  time_col = "Timestamp")

Arguments

data

A dataframe. This dataframe contains a seperate column for Timestamp, in addition to the variables that need to be transformed

time_bound

A positive constant. This is to reduce the effect coming from too small time gaps when calculating derivatives.

regular

Regular time interval (TRUE) or irregular (FALSE)

time_col

A quoted string to specify the column name of the timestamp

Value

A tsibble object with the original and the transformed series

Author(s)

Priyanga Dilini Talagala

Examples

1
2
3
data <- data_sandy_anom[,c("Timestamp", "Cond", "Tur", "Level")]
data <- tidyr::drop_na(data)
trans_data <- oddwater::transform_data(data)

pridiltal/oddwater documentation built on Dec. 18, 2019, 8:18 p.m.