timetk: A toolkit for time series analysis in R
This tutorial focuses on 3 new functions for visualizing time series diagnostics:
plot_acf_diagnostics()
plot_seasonal_diagnostics()
plot_stl_diagnostics()
library(tidyverse)
library(timetk)
# Setup for the plotly charts (# FALSE returns ggplots)
FALSE interactive <-
%>%
m4_hourly group_by(id) %>%
plot_acf_diagnostics(
# ACF & PACF
date, value, .lags = "7 days", # 7-Days of hourly lags
.interactive = interactive
)
%>%
walmart_sales_weekly select(id, Date, Weekly_Sales, Temperature, Fuel_Price) %>%
group_by(id) %>%
plot_acf_diagnostics(
# ACF & PACF
Date, Weekly_Sales, .ccf_vars = c(Temperature, Fuel_Price), # CCFs
.lags = "3 months", # 3 months of weekly lags
.interactive = interactive
)
30_min %>%
taylor_ plot_seasonal_diagnostics(date, value, .interactive = interactive)
%>%
m4_hourly group_by(id) %>%
plot_seasonal_diagnostics(date, value, .interactive = interactive)
%>%
m4_hourly group_by(id) %>%
plot_stl_diagnostics(
date, value,.frequency = "auto", .trend = "auto",
.feature_set = c("observed", "season", "trend", "remainder"),
.interactive = interactive)
If you are interested in learning from my advanced Time Series Analysis & Forecasting Course, then join my waitlist. The course is coming soon.
You will learn: