Retrieves Call Report or UBPR filer information from the FFIEC Central Data Repository API for available reporting periods.
Usage
get_reporting_periods(
user_id = Sys.getenv("FFIEC_USER_ID"),
bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"),
as_data_frame = FALSE
)
get_ubpr_reporting_periods(
user_id = Sys.getenv("FFIEC_USER_ID"),
bearer_token = Sys.getenv("FFIEC_BEARER_TOKEN"),
as_data_frame = FALSE
)Value
A list containing the parsed JSON response from the API, where each
element in the list represents an available reporting period. If
as_data_frame = TRUE, then the list is converted to a tibble (and
returned as such).
Examples
if (!no_creds_available()) {
# Assume you have set the following environment variables:
# - FFIEC_USER_ID
# - FFIEC_BEARER_TOKEN
# Retrieve reporting periods and return as a list
get_reporting_periods()
# Retrieve UBPR reporting periods and return as a tibble
get_ubpr_reporting_periods(as_data_frame = TRUE)
}
#> # A tibble: 94 × 1
#> ReportingPeriod
#> <date>
#> 1 2002-12-31
#> 2 2003-03-31
#> 3 2003-06-30
#> 4 2003-09-30
#> 5 2003-12-31
#> 6 2004-03-31
#> 7 2004-06-30
#> 8 2004-09-30
#> 9 2004-12-31
#> 10 2005-03-31
#> # ℹ 84 more rows
