Nothing
The {bacenR} package provides tools to download and process data from the Brazilian Central Bank (Banco Central do Brasil — Bacen) in a simple and efficient way. Currently, the package includes the following functions:
get_balance_sheets(): download balance sheets from financial institutionsget_balance_sheets( institution = c("BANCOS", "COOPERATIVAS"), months = c(6, 12), first_year = 2022, final_year = 2023, out_dir = tempdir(), overwrite = FALSE )
tidy_balance_sheets(): process downloaded balance sheets with get_balance_sheets() and combine them into a single, unified file# First, download balance sheets get_balance_sheets( institution = c("BANCOS", "COOPERATIVAS"), months = 12, first_year = 2022, final_year = 2023, out_dir = tempdir(), overwrite = FALSE ) # Now, tidy the files tidy_balance_sheets( path_raw = tempdir(), out_dir = tempdir(), doc_filter = 4010, save = FALSE )
get_normative_data(): download regulatory metadatanormas <- get_normative_data( terms = c("Cooperativas", "Cooperativa"), ini_date = "2025-01-01", end_date = "2025-12-12" )
get_normative_txt(): download the full texts of regulatory instructions# First, download normative data normative_data <- get_normative_data( terms = "Cooperativa", ini_date = "2023-08-01", end_date = "2023-12-10" ) # Then, download the full texts for the retrieved normatives normative_txt <- get_normative_txt(normative_data)
get_institutions(): download information about institutions regulated by Bacen in activity# Download multiple institution types get_institutions( institution = c("CONGLOMERADOS"), years = 2011:2025, months = 1:12, out_dir = tempdir(), cleanup_zip = TRUE, verbose = TRUE )
tidy_institutions(): precess the data downloaded with get_institutions() and combine them into a single, unified file# First, download institution data get_institutions( institution = "COOPERATIVAS", years = 2023, months = 11:12, out_dir = tempdir() ) # Process institution files from a directory institutions <- tidy_institutions( path_dir = tempdir(), out_dir = tempdir(), verbose = TRUE )
get_ifdata_reports(): download IFdata Reports for specific periods and institution types. See also IFdata Reports interface.# Multiple periods cc_ativa_pj_modalidade_20142024 <- bacenR::get_ifdata_reports( year = c(2014:2024), month = 12, report = 13, type_institution = 2 )
tidy_ifdata_reports(): tidy the data.frames downloaded with get_ifdata_reports().tidy_cc_ativa_pj_modalidade_20142024 <- bacenR::tidy_ifdata_reports( cc_ativa_pj_modalidade_20142024 )
get_ifdata_registry(): download IFdata Registry data for specified years and months. # Multiple years and months data <- get_ifdata_registry( year = c(2023, 2024), month = c(6, 12) )
For more details and examples, see the project on GitHub: https://github.com/rtheodoro/bacenR
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.