download_read_dfp_zip_file: Downloads and reads DFP datasets

Description Usage Arguments Value Examples

View source: R/fct_download_read_dfp_zip_file.R

Description

Downloads and reads DFP datasets

Usage

1
2
3
4
5
6
7
download_read_dfp_zip_file(
  url_in,
  companies_cvm_codes,
  type_format,
  cache_folder = "gcvmd_cache",
  clean_data
)

Arguments

url_in

Url of file to download and read

companies_cvm_codes

Numeric CVM code of companies. IF set to NULL (default), will return data for all available companies.

type_format

Type of format of document (con = consolidated, ind = individual). Default = c('con', 'ind')

cache_folder

Path of cache folder to keep memoise and zip files

clean_data

Clean data or return raw data? See read_dfp|itr_csv() for details

Value

A dataframe with dfp data

Examples

1
2
3
4
5
6
7
8
## Not run:  # keep cran check fast
my_url <- 'http://dados.cvm.gov.br/dados/CIA_ABERTA/DOC/DFP/DRE/DADOS/dre_cia_aberta_2010.zip'
df_out <- download_read_dfp_zip_file(url_in = my_url,
                                     companies_cvm_codes = NULL,
                                     type_format = 'con',
                                     clean_data = TRUE)

## End(Not run)

msperlin/GetCVMData documentation built on Aug. 4, 2020, 1:19 a.m.