Use the following graphics functions: autoplot(), ggseasonplot(), ggsubseriesplot(), gglagplot(), ggAcf() and explore features from the following time series: hsales, usdeaths, bricksq, sunspotarea, gasoline.
library(fpp2)
library(ggplot2)
hsales - Monthly sales of new one-family houses sold in the USA since 1973.
autoplot(hsales)
ggseasonplot(hsales)
ggseasonplot(hsales, polar = TRUE)
ggsubseriesplot(hsales)
gglagplot(hsales)
ggAcf(hsales)
usdeaths - Monthly accidental deaths in USA (from 1973 to 1979).
autoplot(usdeaths)
ggseasonplot(usdeaths)
ggseasonplot(usdeaths, polar = TRUE)
ggsubseriesplot(usdeaths)
gglagplot(usdeaths)
ggAcf(usdeaths)
bricksq - Australian quarterly clay brick production: 1956–1994.
autoplot(bricksq)
ggseasonplot(bricksq)
ggseasonplot(bricksq, polar = TRUE)
ggsubseriesplot(bricksq)
gglagplot(bricksq)
ggAcf(bricksq)
ggsubseriesplot() plot. However it’s not clear if this can translate to some seasonality or rather some cycle.sunspotarea - Annual averages of the daily sunspot areas (in units of millionths of a hemisphere) for the full sun.
autoplot(sunspotarea)
#ggseasonplot(sunspotarea)
#ggseasonplot(sunspotarea, polar = TRUE)
#ggsubseriesplot(sunspotarea)
gglagplot(sunspotarea)
ggAcf(sunspotarea)
ggseasonplot and ggsubseriesplot fail with some error. However, there appears to be a consistent cycle of about 12 years.gasoline - Weekly data beginning 2 February 1991, ending 20 January 2017. Units are “million barrels per day”.
autoplot(gasoline)
#ggseasonplot(gasoline)
#ggseasonplot(gasoline, polar = TRUE)
#ggsubseriesplot(gasoline)
gglagplot(gasoline)
ggAcf(gasoline)