knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.height = 5,
  fig.width = 7
)

Introduction

This vignette gives you a quick tour of the time series datasets embedded in echos:

Load packages

library(echos)
library(tidyverse)
library(tsibble)

M4 data

The dataset m4_data is a tsibble with six monthly time series from the M4 Forecasting Competition. The datasets contains the following time series:

m4_data
p <- ggplot()

p <- p + geom_line(
  data = m4_data,
  aes(
    x = index,
    y = value
  )
)

p <- p + facet_wrap(
  ~series,
  ncol = 2,
  scales = "free")

p <- p + labs(x = "Time")
p <- p + labs(y = "Value")
p

Synthetic data

The dataset synthetic_data is a tibble with ten synthetic time series. The dataset contains the following time series:

synthetic_data
p <- ggplot()

p <- p + geom_line(
  data = synthetic_data,
  aes(
    x = index,
    y = value
  )
)

p <- p + facet_wrap(
  ~factor(
    variable, 
    levels = c(
      "Square Wave",
      "Sawtooth Wave",
      "Harmonic Wave",
      "Harmonic Wave w/ Trend",
      "Amplitude Modulated Wave",
      "Frequency Modulated Wave",
      "AR(1) Process",
      "MA(2) Process",
      "White Noise Process",
      "Random Walk Process"
    )),
  ncol = 2,
  scales = "free")

p <- p + labs(x = "Time")
p <- p + labs(y = "Value")
p


ahaeusser/echos documentation built on June 2, 2025, 2:17 a.m.