An R-package for obtaining vintage data from ALFRED: https://alfred.stlouisfed.org. Note that this product uses the FRED© API but is not endorsed or certified by the Federal Reserve Bank of St. Louis.
- Simple-to-use function for downloading real-time data from ALFRED at different points in time.
- Returns tidy data frames for further analysis, see https://cran.r-project.org/web/packages/tidyr/vignettes/tidy-data.html.
- Contrary to similar R-packages, you don't have to get an API-key yourself.
A more detailed example can be found in my vignette: https://cran.r-project.org/web/packages/alfred/vignettes/alfred.html
library(alfred)
# Download industrial production index releases from March 2015 for 2013.
get_alfred_series("INDPRO", "test",
observation_start = "2013-03-01", observation_end = "2013-03-30",
realtime_start = "2015-02-02", realtime_end = "2015-02-02")
# Wrapper for getting only most recent releases
get_fred_series("INDPRO", "indpro", observation_start = "2009-03-01", observation_end = "2009-03-01")
Development version (GitHub):
#install.packages("devtools")
library(devtools)
install_github("onnokleen/alfred")
When using the FRED© API, you are agreeing to be bound by the FRED© API Terms of Use, see https://research.stlouisfed.org/docs/api/terms_of_use.html.
- 26.07.2021: Fixed error messages
- 19.05.2021: Added the option to supply your own API key Building the vignette is skipped if there is no internet
- 19.01.2021: Minor fix for handling of failed downloads if connection refused by API
- 06.01.2021: Minor fix for handling of failed downloads, tests are skipped without internet connection
- 27.12.2020: Minor fix for curl dependency on macOS
- 11.09.2020: Minor fix for future compatibility with dplyr
- 01.04.2019: Test fixed
- 06.03.2018: Test fixed
- 20.02.2018: Re-added vignette
- 08.10.2017: Bug-fixes
- 23.09.2017: Performance improvements
- 10.06.2017: Bug fixes
- 08.06.2017: First release on CRAN