1.1. What is fpp3 package about? How many data sets does it have? What all packages does it load?
The fpp3 package is a package designed to support the book Forecasting: Principles and Practice (3rd edition). It provides a unified framework for time series analysis and forecasting in R. It also loads several core packages and example datasets used throughout the textbook (Hyndman, 2019). To identify how many datasets and what packages are included in fpp3, we can run:
library(fpp3)
Registered S3 method overwritten by 'tsibble':
method from
as_tibble.grouped_df dplyr
After counting, we see that 25 datasets are included in the package.
1.2. What is a tsibble?
A tsibble is a tidy data structure designed specifically for time series analysis in R. The tsibble provides tools to “easily manipulate and analyse temporal data, such as filling in time gaps and aggregating over calendar periods” (Wang et al., 2018).
1.3. What is feasts package about?
The feasts package focuses on exploratory analysis of time series data. It provides a collection of features, decomposition methods, statistical summaries and graphics functions for the analysing tidy time series data (O’Hara-Wild et al., 2019a).
1.4. What is fable package about?
The fable package is the modeling and forecasting component of the fpp3 ecosystem (although the previous ones are part of that ecosystem as well). It provides a collection of commonly used univariate and multivariate time series forecasting models including ETS and ARIMA models (O’Hara-Wild et al., 2019b).
For this, I decided to plot 3 graphs: Consumer Price Index for All Urban Consumers (All Items in U.S. City Average), Unemployment Rate, and Federal Funds Effective Rate.
cpiaucsl_data <-fredr(series_id ="CPIAUCSL",observation_start =as.Date("2015-01-01"),observation_end =as.Date("2025-01-01") )unrate_data <-fredr(series_id ="UNRATE",observation_start =as.Date("2015-01-01"),observation_end =as.Date("2025-01-01") )fedfunds_data <-fredr(series_id ="FEDFUNDS",observation_start =as.Date("2015-01-01"),observation_end =as.Date("2025-01-01") )ggplot(cpiaucsl_data, aes(x = date, y = value)) +geom_line(color ="deepskyblue3") +labs(title ="Consumer Price Index for All Urban Consumers: All Items in U.S. City Average",subtitle ="FRED: CPIAUCSL",x ="Date",y ="Index (1982–84 = 100)" ) +theme_minimal()
Hyndman, R. (2019). fpp3: Data for “forecasting: Principles and practice” (3rd edition). In CRAN: Contributed Packages. The R Foundation. https://doi.org/10.32614/cran.package.fpp3
O’Hara-Wild, M., Hyndman, R., & Wang, E. (2019a). Feasts: Feature extraction and statistics for time series. In CRAN: Contributed Packages. The R Foundation. https://doi.org/10.32614/cran.package.feasts
O’Hara-Wild, M., Hyndman, R., & Wang, E. (2019b). Fable: Forecasting models for tidy time series. In CRAN: Contributed Packages. The R Foundation. https://doi.org/10.32614/cran.package.fable
Wang, E., Cook, D., Hyndman, R., & O’Hara-Wild, M. (2018). Tsibble: Tidy temporal data frames and tools. In CRAN: Contributed Packages. The R Foundation. https://doi.org/10.32614/cran.package.tsibble