Skip to content

Latest commit

 

History

History
66 lines (43 loc) · 2.7 KB

README.md

File metadata and controls

66 lines (43 loc) · 2.7 KB

Time Series Plots .R

Time Series analysis concepts using examples in r. Multiple data sets were used to demonstrate reading in data, filtering, date conversion, plotting (autoplot, gg_season, gg_subseries, GGalley), seasonality, cross correlation, autocorrelation, ACF, lag, white noise etc.

Packages: fpp3, readr

Data Preprocessing:

  • tsibble objects
  • Data: PBS (tsibble object) containing monthly data on Australia medicare prescription data
  • Filtering (Month, Concession, Type, Cost)
  • Summarise (all costs in a given month)
  • Mutate to create a new cost column
  • Date conversion
  • Tsibble object Date conversion

Time series plots

  • Airport Data
  • Autoplot of Cost (Antidiabetic drug sales)
  • Checking for seasonality
  • Seasonal subseries plot
  • Demand per day, week, year etc.

image

image

image

image

image

image

image

Holiday Tourism Data

  • "Australian domestic holiday nights" Time series plots
    • autoplot, gg_season, gg_subseries
  • Cross Correlation: "Half-hourly electricity demand: Victoria, Australia"
    • Demand, temperature
  • GGally
  • Auto-correlation - checking for lag one time period ago
  • (ACF) auto correlation function
  • White Noise

image

image

image

Code to play with a time series

US Employment

image

image

image

image