/fable

Tidy time series forecasting

Primary LanguageROtherNOASSERTION

fable

Travis build status AppVeyor Build Status Coverage status CRAN_Status_Badge lifecycle

The R package fable provides methods and tools for displaying and analysing univariate time series forecasts including exponential smoothing via state space models and automatic ARIMA modelling. Data, model and forecast objects are all stored in a tidy format.

Installation

You can install the development version from GitHub

# install.packages("devtools")
devtools::install_github("tidyverts/fable")

Installing this software requires a compiler

Example

library(fable)
library(tsibbledata)
library(lubridate)
aus_retail %>%
  filter(
    State %in% c("New South Wales", "Victoria"),
    Industry == "Department stores"
  ) %>% 
  model(
    ets = ETS(box_cox(Turnover, 0.3)),
    arima = ARIMA(log(Turnover)),
    snaive = SNAIVE(Turnover)
  ) %>%
  forecast %>% 
  autoplot(filter(aus_retail, year(Month) > 2010), level = NULL)

You can read more about the functionality of this package and the ideas behind it here: https://tidyverts.github.io/tidy-forecasting-principles/