ts_vva_plot | R Documentation |
This function will produce three plots faceted on a single graph. The three graphs are the following:
Value Plot (Actual values)
Value Velocity Plot
Value Acceleration Plot
ts_vva_plot(.data, .date_col, .value_col)
.data |
The data you want to visualize. This should be pre-processed and
the aggregation should match the |
.date_col |
The data column from the |
.value_col |
The value column from the |
This function expects to take in a data.frame/tibble. It will return
a list object that contains the augmented data along with a static plot and
an interactive plotly plot. It is important that the data be prepared and have
at minimum a date column and the value column as they need to be supplied to
the function. If your data is a ts, xts, zoo or mts then use ts_to_tbl()
to
convert it to a tibble.
The original time series augmented with the differenced data, a static plot and a plotly plot of the ggplot object. The output is a list that gets returned invisibly.
Steven P. Sanderson II, MPH
suppressPackageStartupMessages(library(dplyr))
data_tbl <- ts_to_tbl(AirPassengers) %>%
select(-index)
ts_vva_plot(data_tbl, date_col, value)$plots$static_plot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.