This function is simply a wrapper around fredr
and requires you to have an FRED API key saved in the FRED_API_KEY
environment variable.
Examples
if (FALSE) {
get_fred("UNRATE")
series = c(
gdp = "GDP",
urate = "UNRATE"
)
get_fred(series, start = as.Date("2024-07-01"), end = 2024)
# Tibble with list columns including additional metadata
complete_results = get_fred(series, start = 2020, end = 2025, metadata = T)
complete_results
complete_results |>
tidyr::unnest(metadata)
}