A quick introduction for downloading FRED and ALFRED data.
You may install the last stable release via CRAN or the latest development version from github.
Downloading data is straightforward (for real-time data from ALFRED see below):
The output is a data frame
## date indpro
## 1 1919-01-01 5.0124
## 2 1919-02-01 4.7908
## 3 1919-03-01 4.6524
## 4 1919-04-01 4.7355
## 5 1919-05-01 4.7632
## 6 1919-06-01 5.0678
This can be readily used, i.e. for plotting
When using get_alfred_series for downloading real-time data sets, there will be an additional column for the respective vintage dates.
df_vintages <-
get_alfred_series("GDPC1", "rgdp",
observation_start = "2007-05-31",
realtime_start = "2008-05-31", realtime_end = "2009-03-30")
head(df_vintages)
## date realtime_period rgdp
## 1 2007-07-01 2008-05-31 11658.9
## 2 2007-10-01 2008-05-31 11675.7
## 3 2008-01-01 2008-05-31 11701.9
## 4 2007-07-01 2008-06-26 11658.9
## 5 2007-10-01 2008-06-26 11675.7
## 6 2008-01-01 2008-06-26 11703.6
Because of its output being a tidy data frame, it is easy to visualise revisions by