Skip to content

Instantly share code, notes, and snippets.

@mcohen01
Created March 14, 2019 06:07
Show Gist options
  • Save mcohen01/c8684c88047773e6c0dce0c394cb71dc to your computer and use it in GitHub Desktop.
Save mcohen01/c8684c88047773e6c0dce0c394cb71dc to your computer and use it in GitHub Desktop.
library(forecast)
hourly_boots <- read.csv('hourly_boots.csv', header = F)
names(hourly_boots) <- c('time', 'value')
ts.index <- seq(from = as.POSIXct("2018-12-17 00:00"),
to = as.POSIXct("2019-03-09 23:00"),
by="hour")
periods <- msts(hourly_boots$value, seasonal.periods = c(24, 24*7))
model <- tbats(periods)
plot(model)
plot(forecast(model))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment