| Title: | Reading FRE Corporate Data of Public Traded Companies from B3 |
|---|---|
| Description: | Reads corporate data such as board composition and compensation for companies traded at B3, the Brazilian exchange <https://www.b3.com.br/>. All data is downloaded and imported from the ftp site <https://dados.cvm.gov.br/dados/CIA_ABERTA/DOC/FRE/>. |
| Authors: | Marcelo Perlin [aut, cre], Guilherme Kirch [aut] |
| Maintainer: | Marcelo Perlin <[email protected]> |
| License: | GPL-2 |
| Version: | 1.2.0 |
| Built: | 2026-10-04 11:35:24 UTC |
| Source: | https://github.com/msperlin/getfredata |
This function deletes all downloaded ZIP files, temporary files, and cached datasets stored in the cache folder.
clean_fre_cache(cache_folder = get_default_cache_dir())clean_fre_cache(cache_folder = get_default_cache_dir())
cache_folder |
Path of cache folder to delete (default = get_default_cache_dir()) |
A boolean indicating whether the operation succeeded (invisibly)
## Not run: clean_fre_cache() ## End(Not run)## Not run: clean_fre_cache() ## End(Not run)
'r lifecycle::badge("deprecated")'
'get_fre_data()' was deprecated in v1.0.0 in favour of [get_fre_data2()].
get_fre_data(...)get_fre_data(...)
... |
Ignored. |
Nothing; always errors.
## Not run: # Use get_fre_data2() instead l_fre <- get_fre_data2() ## End(Not run)## Not run: # Use get_fre_data2() instead l_fre <- get_fre_data2() ## End(Not run)
The FRE (formularios de referencia) is the reporting system of companies traded at B3. This function will access the CVM ftp and parse all available files according to user choices such as dates and companies.
get_fre_data2( first_year = lubridate::year(lubridate::today()) - 1, last_year = lubridate::year(lubridate::today()), companies_cvm_codes = NULL, cache_folder = get_default_cache_dir(), verbose = TRUE )get_fre_data2( first_year = lubridate::year(lubridate::today()) - 1, last_year = lubridate::year(lubridate::today()), companies_cvm_codes = NULL, cache_folder = get_default_cache_dir(), verbose = TRUE )
first_year |
First year of selected data. CVM FRE data is available from 2010 onwards. |
last_year |
Last year of selected data. |
companies_cvm_codes |
Numeric vector of CVM company codes to filter.
If |
cache_folder |
Path of cache folder to keep cache, raw zip files, and parsed RDS files (default = 'gfred_cache'). |
verbose |
Logical. Whether to print informative messages during execution (default = TRUE). |
The resulting list contains tibbles corresponding to individual tables published in the FRE reports:
acionador: Stockholders details and equity participation
capital_social: Share capital structure and issued shares
posicao_acionaria: Equity ownership structure
administrador_membro_conselho_fiscal: Board and director composition
remuneracao_reconhecida_administradores: Executive compensation details
remuneracao_orgaos: Summary of remuneration by corporate body
auditor_formulario_referencia: Independent audit firm details
distribuicao_dividendo: Dividend distributions and payout metrics
dividas: Debt composition by maturity and guarantee
And other corporate disclosures.
All tables in the returned list include the cd_cvm column (CVM company code),
enabling consistent cross-table joining and filtering by company.
Parsed files are automatically cached as RDS objects in cache_folder/parsed-rds/
to accelerate subsequent queries for the same years.
A list of tibbles, where each element is a different table from the FRE system.
All tables include the cd_cvm column, allowing consistent filtering across the entire dataset.
## Not run: l_fre <- get_fre_data2(first_year = 2020, last_year = 2020, cache_folder = tempdir()) # Filter by CVM company codes silently l_fre <- get_fre_data2(companies_cvm_codes = c(9512, 18627), verbose = FALSE) ## End(Not run)## Not run: l_fre <- get_fre_data2(first_year = 2020, last_year = 2020, cache_folder = tempdir()) # Filter by CVM company codes silently l_fre <- get_fre_data2(companies_cvm_codes = c(9512, 18627), verbose = FALSE) ## End(Not run)
Imports a dataset from cvm <https://sistemas.cvm.gov.br/cadastro/SPW_CIA_ABERTA.ZIP>, containing up to date information about companies, active or not.
get_info_companies(cache_folder = "gfred_cache")get_info_companies(cache_folder = "gfred_cache")
cache_folder |
Path of cache folder to keep cache, raw zip files, and parsed RDS files (default = 'gfred_cache'). |
A dataframe with several information about B3 companies
## Not run: # keep cran check fast df_info <- get_info_companies() str(df_info) ## End(Not run)## Not run: # keep cran check fast df_info <- get_info_companies() str(df_info) ## End(Not run)
Helps users search for a company
search_company(char_to_search, cache_folder = "gfred_cache")search_company(char_to_search, cache_folder = "gfred_cache")
char_to_search |
Character for partial matching |
cache_folder |
Path of cache folder to keep cache, raw zip files, and parsed RDS files (default = 'gfred_cache'). |
A dataframe with companies
## Not run: # dontrun: keep cran check fast df <- search_company('petrobras') ## End(Not run)## Not run: # dontrun: keep cran check fast df <- search_company('petrobras') ## End(Not run)