Closed msperlin closed 3 years ago
The problem was with the structure of CVM's ftp files. Just fixed the issue with latest code.
Estou com este mesmo problema para baixar os dados.
df_itr <- get_itr_data(companies_cvm_codes = 20958, first_year = 2019, last_year = 2020, type_docs = c('BPA', 'BPP'), individual_dre_quarters = TRUE, clean_data = TRUE, use_memoise = FALSE )
Downloading DRE Error in open.connection(x, "rb") : HTTP error 404.
Oi Luiz, chegaste a atualizar o pacote?
devtools::install_github('msperlin/GetDFPData2')
Oi Marcelo, consegui sim atualizar o pacote. Não há mais o erro informado acima. Porém, não consigo utilizar a função get_itr_data. Poderia me ajudar?
Estou tentando:
df_weg <- get_itr_data( companies_cvm_codes = 5410, first_year = 2018, last_year = lubridate::year(Sys.Date()), type_docs = c("BPA", "BPP", "DRE"), type_format = c("con", "ind"), individual_dre_quarters = TRUE, clean_data = TRUE, use_memoise = FALSE, cache_folder = "gcvmd_cache" )
Aparece o seguinte erro:
Error in get_itr_data(companies_cvm_codes = 5410, first_year = 2018, last_year = lubridate::year(Sys.Date()), : não foi possível encontrar a função "get_itr_data"
Função get_itr_data ainda está em desenvolvimento. Alguns resultados que observei não estão batendo com o ITR e decidi retirar do pacote por enquanto.
if (!require(GetDFPData2)) devtools::install_github('msperlin/GetDFPData2') # not in CRAN yet library(dplyr)
df_itr <- get_itr_data(companies_cvm_codes = NULL, first_year = 2010, last_year = 2011, type_docs = c('DRE', 'BPA', 'BPP','DFC_MI','DFC_MD') )
E obtenho o seguinte erro:
Downloading DRE Error in open.connection(x, "rb") : HTTP error 404.