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 <http://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: | 0.8.2 |
Built: | 2024-11-08 04:28:17 UTC |
Source: | https://github.com/msperlin/getfredata |
Reads folder for zip file post 2011 (internal)
gdfpd.read.zip.file.type.fre(rnd_folder_name, folder_to_unzip = tempdir())
gdfpd.read.zip.file.type.fre(rnd_folder_name, folder_to_unzip = tempdir())
rnd_folder_name |
Folder name where unzipped files are available |
folder_to_unzip |
Folder to unzip files |
A list with financial statements
# no example (this functions not used directly)
# no example (this functions not used directly)
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_data( companies_cvm_codes = NULL, first_year = lubridate::year(Sys.Date()) - 2, last_year = lubridate::year(Sys.Date()), fre_to_read = "last", cache_folder = "gfred_cache" )
get_fre_data( companies_cvm_codes = NULL, first_year = lubridate::year(Sys.Date()) - 2, last_year = lubridate::year(Sys.Date()), fre_to_read = "last", cache_folder = "gfred_cache" )
companies_cvm_codes |
Numeric CVM code of companies. IF set to NULL (default), will return data for all available companies. |
first_year |
First year of selected data |
last_year |
Last year of selected data |
fre_to_read |
Whether to read 'first', 'last' or 'all' fre docs ('last' is default). Be aware that companies do release several FRE docs for a single year. |
cache_folder |
Path of cache folder to keep cache and zip files |
A list of tibbles, where each element is a different table from the FRE system
## Not run: l_fre <- get_fre_data(18627) ## End(Not run)
## Not run: l_fre <- get_fre_data(18627) ## End(Not run)
Imports a dataset from cvm <http://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 and zip files |
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)
This function will add several columns to each table in fre list.
my_fix_cols(df_in, df_info_file)
my_fix_cols(df_in, df_info_file)
df_in |
Entry dataframe |
df_info_file |
Informations about file |
An organized dataframe
## Not run: # no example here ## End(Not run)
## Not run: # no example here ## 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 and zip files |
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)