From e127592f7b43a1680bb3abb6d6f5777fa700281e Mon Sep 17 00:00:00 2001 From: msperlin Date: Fri, 19 Mar 2021 15:37:10 -0300 Subject: [PATCH] cran version --- DESCRIPTION | 6 +- NAMESPACE | 1 - R/fct_download_file.R | 1 - R/fct_download_read_itr_zip_file.R | 2 +- R/fct_export_xlsx.R | 5 +- R/fct_get_itr_data.R | 6 +- R/fct_read_dfp_csv.R | 6 +- R/fct_read_itr_csv.R | 7 +- R/fct_search_company.R | 2 +- R/utils-pipe.R | 2 +- docs/404.html | 160 -------- .../GetDFPData2-vignette-introduction.html | 126 ------ .../header-attrs-2.7/header-attrs.js | 12 - docs/articles/index.html | 159 -------- docs/authors.html | 163 -------- docs/bootstrap-toc.css | 60 --- docs/bootstrap-toc.js | 159 -------- docs/docsearch.css | 148 ------- docs/docsearch.js | 85 ---- docs/index.html | 175 --------- docs/link.svg | 12 - docs/news/index.html | 165 -------- docs/pkgdown.css | 367 ------------------ docs/pkgdown.js | 108 ------ docs/pkgdown.yml | 7 - docs/reference/Rplot001.png | Bin 1011 -> 0 bytes docs/reference/clean_dfp_itr_data.html | 188 --------- .../reference/download_read_dfp_zip_file.html | 221 ----------- .../reference/download_read_itr_zip_file.html | 221 ----------- docs/reference/export_xlsx.html | 188 --------- docs/reference/find_dl_size.html | 181 --------- docs/reference/find_file_size.html | 177 --------- docs/reference/fix_cnpj.html | 182 --------- docs/reference/get_contents_ftp.html | 182 --------- docs/reference/get_dfp_data.html | 231 ----------- docs/reference/get_dfp_docs.html | 226 ----------- docs/reference/get_info_companies.html | 186 --------- docs/reference/get_itr_data.html | 237 ----------- docs/reference/index.html | 281 -------------- docs/reference/my_download_file.html | 199 ---------- docs/reference/pipe.html | 166 -------- docs/reference/read_dfp_csv.html | 188 --------- docs/reference/read_itr_csv.html | 188 --------- docs/reference/search_company.html | 187 --------- .../select_responsible_beverage.html | 172 -------- man/download_read_itr_zip_file.Rd | 2 +- man/export_xlsx.Rd | 2 +- man/get_itr_data.Rd | 3 + man/search_company.Rd | 2 +- vignettes/GetDFPData2-vignette-introduction.R | 5 - .../GetDFPData2-vignette-introduction.Rmd | 58 ++- .../GetDFPData2-vignette-introduction.html | 167 -------- 52 files changed, 83 insertions(+), 5901 deletions(-) delete mode 100644 docs/404.html delete mode 100644 docs/articles/GetDFPData2-vignette-introduction.html delete mode 100644 docs/articles/GetDFPData2-vignette-introduction_files/header-attrs-2.7/header-attrs.js delete mode 100644 docs/articles/index.html delete mode 100644 docs/authors.html delete mode 100644 docs/bootstrap-toc.css delete mode 100644 docs/bootstrap-toc.js delete mode 100644 docs/docsearch.css delete mode 100644 docs/docsearch.js delete mode 100644 docs/index.html delete mode 100644 docs/link.svg delete mode 100644 docs/news/index.html delete mode 100644 docs/pkgdown.css delete mode 100644 docs/pkgdown.js delete mode 100644 docs/pkgdown.yml delete mode 100644 docs/reference/Rplot001.png delete mode 100644 docs/reference/clean_dfp_itr_data.html delete mode 100644 docs/reference/download_read_dfp_zip_file.html delete mode 100644 docs/reference/download_read_itr_zip_file.html delete mode 100644 docs/reference/export_xlsx.html delete mode 100644 docs/reference/find_dl_size.html delete mode 100644 docs/reference/find_file_size.html delete mode 100644 docs/reference/fix_cnpj.html delete mode 100644 docs/reference/get_contents_ftp.html delete mode 100644 docs/reference/get_dfp_data.html delete mode 100644 docs/reference/get_dfp_docs.html delete mode 100644 docs/reference/get_info_companies.html delete mode 100644 docs/reference/get_itr_data.html delete mode 100644 docs/reference/index.html delete mode 100644 docs/reference/my_download_file.html delete mode 100644 docs/reference/pipe.html delete mode 100644 docs/reference/read_dfp_csv.html delete mode 100644 docs/reference/read_itr_csv.html delete mode 100644 docs/reference/search_company.html delete mode 100644 docs/reference/select_responsible_beverage.html delete mode 100644 vignettes/GetDFPData2-vignette-introduction.R delete mode 100644 vignettes/GetDFPData2-vignette-introduction.html diff --git a/DESCRIPTION b/DESCRIPTION index 08a9903..cd0786a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,10 +1,12 @@ Package: GetDFPData2 Title: Reading Annual and Quarterly Financial Reports from B3 Version: 0.5 -Date: 2020-06-11 +Date: 2021-03-19 Authors@R: c(person("Marcelo", "Perlin", email = "marceloperlin@gmail.com", role = c("aut", "cre")), person("Guilherme", "Kirch", email = "guilhermekirch@gmail.com", role = c("aut"))) -Description: Reads annual and quarterly financial reports from companies traded at B3, the Brasilian exchange . All data is downloaded and imported from CVM's ftp site . +Description: Reads annual and quarterly financial reports from companies traded at B3, the Brazilian exchange + . + All data is downloaded and imported from CVM's public ftp site . Depends: R (>= 3.5.0) Imports: diff --git a/NAMESPACE b/NAMESPACE index 7c7b624..e6e68a6 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -4,6 +4,5 @@ export("%>%") export(export_xlsx) export(get_dfp_data) export(get_info_companies) -export(get_itr_data) export(search_company) importFrom(magrittr,"%>%") diff --git a/R/fct_download_file.R b/R/fct_download_file.R index 7775c30..b0e31a8 100644 --- a/R/fct_download_file.R +++ b/R/fct_download_file.R @@ -96,7 +96,6 @@ find_dl_size <- function(url_in) { return(size_out) } - find_file_size <- function(path) { info <- file.info(path) size <- info$size diff --git a/R/fct_download_read_itr_zip_file.R b/R/fct_download_read_itr_zip_file.R index fb6d3a7..dad86e3 100644 --- a/R/fct_download_read_itr_zip_file.R +++ b/R/fct_download_read_itr_zip_file.R @@ -19,7 +19,7 @@ download_read_itr_zip_file <- function(url_in, companies_cvm_codes, type_docs, type_format, - cache_folder = 'gcvmd_cache', + cache_folder, clean_data) { # create folder diff --git a/R/fct_export_xlsx.R b/R/fct_export_xlsx.R index 8e457b3..b532f35 100644 --- a/R/fct_export_xlsx.R +++ b/R/fct_export_xlsx.R @@ -1,6 +1,6 @@ #' Export DFP/ITR data to a xlsx file #' -#' @param l_dfp A list from get_dfp_data +#' @param l_dfp A list from get_dfp_data or get_itr_data #' @param f_xlsx Path to xlsx file #' #' @return A dataframe with several information about B3 companies @@ -18,10 +18,11 @@ export_xlsx <- function(l_dfp, f_xlsx = 'GetDFPData-XLSX.xlsx') { if (my_file_ext != 'xlsx') stop('File extension for f_xlsx should be .xlsx') + message('Exporting file to ', f_xlsx) writexl::write_xlsx(x = l_dfp, path = f_xlsx) - message(stringr::str_glue('\nArquivo salvo em {f_xlsx}.') ) + message(stringr::str_glue('\nDone! File saved at {f_xlsx}.') ) return(invisible(TRUE)) } diff --git a/R/fct_get_itr_data.R b/R/fct_get_itr_data.R index 03cfa6d..8a361f3 100644 --- a/R/fct_get_itr_data.R +++ b/R/fct_get_itr_data.R @@ -1,5 +1,7 @@ #' Downloads and reads ITR datasets #' +#' **IN DEVELOPMENT and NOT EXPORTED (dont use it)**. Results dont seem right.. +#' #' The ITR (informacoes trimestrais) is the quarterly reporting system of companies #' traded at B3. This function will access the CVM ftp and parse all available files according to user #' choices @@ -9,7 +11,6 @@ #' This option only applies for the DRE. Be aware that the original data only includes accumulated quarters. #' #' @return A list of tibbles, separated by column GRUPO_DFP -#' @export #' #' @examples #' @@ -85,7 +86,8 @@ get_itr_data <- function(companies_cvm_codes = NULL, clean_data = clean_data, companies_cvm_codes = companies_cvm_codes, type_docs = type_docs, - type_format = type_format)) + type_format = type_format, + cache_folder = cache_folder)) # do calculation of quarters if (individual_dre_quarters) { diff --git a/R/fct_read_dfp_csv.R b/R/fct_read_dfp_csv.R index f4d5bb8..79c78d6 100644 --- a/R/fct_read_dfp_csv.R +++ b/R/fct_read_dfp_csv.R @@ -22,8 +22,10 @@ read_dfp_csv <- function(file_in, clean_data) { col_types = readr::cols(CD_CONTA = readr::col_character(), VL_CONTA = readr::col_character(), CD_CVM = readr::col_number()), - locale = readr::locale(decimal_mark = ',', encoding = 'Latin1'), - progress = FALSE) %>% + locale = readr::locale(decimal_mark = ',', + encoding = 'Latin1'), + progress = FALSE, + quote = '\\"') %>% dplyr::mutate(VL_CONTA = readr::parse_number(VL_CONTA)) }) diff --git a/R/fct_read_itr_csv.R b/R/fct_read_itr_csv.R index 09a3843..4993503 100644 --- a/R/fct_read_itr_csv.R +++ b/R/fct_read_itr_csv.R @@ -22,9 +22,10 @@ read_itr_csv <- function(file_in, clean_data) { col_types = readr::cols(CD_CVM = readr::col_number(), CD_CONTA = readr::col_character(), VL_CONTA = readr::col_character()), - locale = readr::locale(#decimal_mark = '.', - encoding = 'Latin1'), - progress = FALSE) %>% + locale = readr::locale(decimal_mark = ',', + encoding = 'Latin1'), + progress = FALSE, + quote = '\\"') %>% dplyr::mutate(VL_CONTA = readr::parse_number(VL_CONTA)) %>% dplyr::ungroup() diff --git a/R/fct_search_company.R b/R/fct_search_company.R index 4b5bf7b..2f2636a 100644 --- a/R/fct_search_company.R +++ b/R/fct_search_company.R @@ -11,7 +11,7 @@ #' \dontrun{ # dontrun: keep cran check fast #' df <- search_company('petrobras') #' } -search_company <- function(char_to_search, cache_folder = 'gcvmd_cache') { +search_company <- function(char_to_search, cache_folder = 'gdfpd2_cache') { df_cvm <- get_info_companies(cache_folder) diff --git a/R/utils-pipe.R b/R/utils-pipe.R index e79f3d8..ce7106d 100644 --- a/R/utils-pipe.R +++ b/R/utils-pipe.R @@ -4,8 +4,8 @@ #' #' @name %>% #' @rdname pipe -#' @keywords internal #' @export +#' @keywords internal #' @importFrom magrittr %>% #' @usage lhs \%>\% rhs NULL diff --git a/docs/404.html b/docs/404.html deleted file mode 100644 index ca2de75..0000000 --- a/docs/404.html +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - - - -Page not found (404) • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -Content not found. Please use links in the navbar. - -
- - - -
- - - -
- - -
-

Site built with pkgdown 1.6.1.

-
- -
-
- - - - - - - - diff --git a/docs/articles/GetDFPData2-vignette-introduction.html b/docs/articles/GetDFPData2-vignette-introduction.html deleted file mode 100644 index d3c885c..0000000 --- a/docs/articles/GetDFPData2-vignette-introduction.html +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - -Using GetDFPData2 • GetDFPData2 - - - - - - - - - - -
-
- - - - -
-
- - - - -
-library(GetDFPData2)
-
-# todo
-
- - - -
- - - -
- -
-

Site built with pkgdown 1.6.1.

-
- -
-
- - - - - - diff --git a/docs/articles/GetDFPData2-vignette-introduction_files/header-attrs-2.7/header-attrs.js b/docs/articles/GetDFPData2-vignette-introduction_files/header-attrs-2.7/header-attrs.js deleted file mode 100644 index dd57d92..0000000 --- a/docs/articles/GetDFPData2-vignette-introduction_files/header-attrs-2.7/header-attrs.js +++ /dev/null @@ -1,12 +0,0 @@ -// Pandoc 2.9 adds attributes on both header and div. We remove the former (to -// be compatible with the behavior of Pandoc < 2.8). -document.addEventListener('DOMContentLoaded', function(e) { - var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); - var i, h, a; - for (i = 0; i < hs.length; i++) { - h = hs[i]; - if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 - a = h.attributes; - while (a.length > 0) h.removeAttribute(a[0].name); - } -}); diff --git a/docs/articles/index.html b/docs/articles/index.html deleted file mode 100644 index f20def1..0000000 --- a/docs/articles/index.html +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - -Articles • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
-

All vignettes

-

- -
-
Using GetDFPData2
-
-
-
-
-
- - -
- - -
-

Site built with pkgdown 1.6.1.

-
- -
-
- - - - - - - - diff --git a/docs/authors.html b/docs/authors.html deleted file mode 100644 index 0860438..0000000 --- a/docs/authors.html +++ /dev/null @@ -1,163 +0,0 @@ - - - - - - - - -Authors • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
- - - - -
- -
-
- - -
    -
  • -

    Marcelo Perlin. Author, maintainer. -

    -
  • -
  • -

    Guilherme Kirch. Author. -

    -
  • -
- -
- -
- - - -
- - -
-

Site built with pkgdown 1.6.1.

-
- -
-
- - - - - - - - diff --git a/docs/bootstrap-toc.css b/docs/bootstrap-toc.css deleted file mode 100644 index 5a85941..0000000 --- a/docs/bootstrap-toc.css +++ /dev/null @@ -1,60 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ - -/* modified from https://github.com/twbs/bootstrap/blob/94b4076dd2efba9af71f0b18d4ee4b163aa9e0dd/docs/assets/css/src/docs.css#L548-L601 */ - -/* All levels of nav */ -nav[data-toggle='toc'] .nav > li > a { - display: block; - padding: 4px 20px; - font-size: 13px; - font-weight: 500; - color: #767676; -} -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 19px; - color: #563d7c; - text-decoration: none; - background-color: transparent; - border-left: 1px solid #563d7c; -} -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 18px; - font-weight: bold; - color: #563d7c; - background-color: transparent; - border-left: 2px solid #563d7c; -} - -/* Nav: second level (shown on .active) */ -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} -nav[data-toggle='toc'] .nav .nav > li > a { - padding-top: 1px; - padding-bottom: 1px; - padding-left: 30px; - font-size: 12px; - font-weight: normal; -} -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 29px; -} -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 28px; - font-weight: 500; -} - -/* from https://github.com/twbs/bootstrap/blob/e38f066d8c203c3e032da0ff23cd2d6098ee2dd6/docs/assets/css/src/docs.css#L631-L634 */ -nav[data-toggle='toc'] .nav > .active > ul { - display: block; -} diff --git a/docs/bootstrap-toc.js b/docs/bootstrap-toc.js deleted file mode 100644 index 1cdd573..0000000 --- a/docs/bootstrap-toc.js +++ /dev/null @@ -1,159 +0,0 @@ -/*! - * Bootstrap Table of Contents v0.4.1 (http://afeld.github.io/bootstrap-toc/) - * Copyright 2015 Aidan Feldman - * Licensed under MIT (https://github.com/afeld/bootstrap-toc/blob/gh-pages/LICENSE.md) */ -(function() { - 'use strict'; - - window.Toc = { - helpers: { - // return all matching elements in the set, or their descendants - findOrFilter: function($el, selector) { - // http://danielnouri.org/notes/2011/03/14/a-jquery-find-that-also-finds-the-root-element/ - // http://stackoverflow.com/a/12731439/358804 - var $descendants = $el.find(selector); - return $el.filter(selector).add($descendants).filter(':not([data-toc-skip])'); - }, - - generateUniqueIdBase: function(el) { - var text = $(el).text(); - var anchor = text.trim().toLowerCase().replace(/[^A-Za-z0-9]+/g, '-'); - return anchor || el.tagName.toLowerCase(); - }, - - generateUniqueId: function(el) { - var anchorBase = this.generateUniqueIdBase(el); - for (var i = 0; ; i++) { - var anchor = anchorBase; - if (i > 0) { - // add suffix - anchor += '-' + i; - } - // check if ID already exists - if (!document.getElementById(anchor)) { - return anchor; - } - } - }, - - generateAnchor: function(el) { - if (el.id) { - return el.id; - } else { - var anchor = this.generateUniqueId(el); - el.id = anchor; - return anchor; - } - }, - - createNavList: function() { - return $(''); - }, - - createChildNavList: function($parent) { - var $childList = this.createNavList(); - $parent.append($childList); - return $childList; - }, - - generateNavEl: function(anchor, text) { - var $a = $(''); - $a.attr('href', '#' + anchor); - $a.text(text); - var $li = $('
  • '); - $li.append($a); - return $li; - }, - - generateNavItem: function(headingEl) { - var anchor = this.generateAnchor(headingEl); - var $heading = $(headingEl); - var text = $heading.data('toc-text') || $heading.text(); - return this.generateNavEl(anchor, text); - }, - - // Find the first heading level (`

    `, then `

    `, etc.) that has more than one element. Defaults to 1 (for `

    `). - getTopLevel: function($scope) { - for (var i = 1; i <= 6; i++) { - var $headings = this.findOrFilter($scope, 'h' + i); - if ($headings.length > 1) { - return i; - } - } - - return 1; - }, - - // returns the elements for the top level, and the next below it - getHeadings: function($scope, topLevel) { - var topSelector = 'h' + topLevel; - - var secondaryLevel = topLevel + 1; - var secondarySelector = 'h' + secondaryLevel; - - return this.findOrFilter($scope, topSelector + ',' + secondarySelector); - }, - - getNavLevel: function(el) { - return parseInt(el.tagName.charAt(1), 10); - }, - - populateNav: function($topContext, topLevel, $headings) { - var $context = $topContext; - var $prevNav; - - var helpers = this; - $headings.each(function(i, el) { - var $newNav = helpers.generateNavItem(el); - var navLevel = helpers.getNavLevel(el); - - // determine the proper $context - if (navLevel === topLevel) { - // use top level - $context = $topContext; - } else if ($prevNav && $context === $topContext) { - // create a new level of the tree and switch to it - $context = helpers.createChildNavList($prevNav); - } // else use the current $context - - $context.append($newNav); - - $prevNav = $newNav; - }); - }, - - parseOps: function(arg) { - var opts; - if (arg.jquery) { - opts = { - $nav: arg - }; - } else { - opts = arg; - } - opts.$scope = opts.$scope || $(document.body); - return opts; - } - }, - - // accepts a jQuery object, or an options object - init: function(opts) { - opts = this.helpers.parseOps(opts); - - // ensure that the data attribute is in place for styling - opts.$nav.attr('data-toggle', 'toc'); - - var $topContext = this.helpers.createChildNavList(opts.$nav); - var topLevel = this.helpers.getTopLevel(opts.$scope); - var $headings = this.helpers.getHeadings(opts.$scope, topLevel); - this.helpers.populateNav($topContext, topLevel, $headings); - } - }; - - $(function() { - $('nav[data-toggle="toc"]').each(function(i, el) { - var $nav = $(el); - Toc.init($nav); - }); - }); -})(); diff --git a/docs/docsearch.css b/docs/docsearch.css deleted file mode 100644 index e5f1fe1..0000000 --- a/docs/docsearch.css +++ /dev/null @@ -1,148 +0,0 @@ -/* Docsearch -------------------------------------------------------------- */ -/* - Source: https://github.com/algolia/docsearch/ - License: MIT -*/ - -.algolia-autocomplete { - display: block; - -webkit-box-flex: 1; - -ms-flex: 1; - flex: 1 -} - -.algolia-autocomplete .ds-dropdown-menu { - width: 100%; - min-width: none; - max-width: none; - padding: .75rem 0; - background-color: #fff; - background-clip: padding-box; - border: 1px solid rgba(0, 0, 0, .1); - box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .175); -} - -@media (min-width:768px) { - .algolia-autocomplete .ds-dropdown-menu { - width: 175% - } -} - -.algolia-autocomplete .ds-dropdown-menu::before { - display: none -} - -.algolia-autocomplete .ds-dropdown-menu [class^=ds-dataset-] { - padding: 0; - background-color: rgb(255,255,255); - border: 0; - max-height: 80vh; -} - -.algolia-autocomplete .ds-dropdown-menu .ds-suggestions { - margin-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion { - padding: 0; - overflow: visible -} - -.algolia-autocomplete .algolia-docsearch-suggestion--category-header { - padding: .125rem 1rem; - margin-top: 0; - font-size: 1.3em; - font-weight: 500; - color: #00008B; - border-bottom: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--wrapper { - float: none; - padding-top: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--subcategory-column { - float: none; - width: auto; - padding: 0; - text-align: left -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content { - float: none; - width: auto; - padding: 0 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--content::before { - display: none -} - -.algolia-autocomplete .ds-suggestion:not(:first-child) .algolia-docsearch-suggestion--category-header { - padding-top: .75rem; - margin-top: .75rem; - border-top: 1px solid rgba(0, 0, 0, .1) -} - -.algolia-autocomplete .ds-suggestion .algolia-docsearch-suggestion--subcategory-column { - display: block; - padding: .1rem 1rem; - margin-bottom: 0.1; - font-size: 1.0em; - font-weight: 400 - /* display: none */ -} - -.algolia-autocomplete .algolia-docsearch-suggestion--title { - display: block; - padding: .25rem 1rem; - margin-bottom: 0; - font-size: 0.9em; - font-weight: 400 -} - -.algolia-autocomplete .algolia-docsearch-suggestion--text { - padding: 0 1rem .5rem; - margin-top: -.25rem; - font-size: 0.8em; - font-weight: 400; - line-height: 1.25 -} - -.algolia-autocomplete .algolia-docsearch-footer { - width: 110px; - height: 20px; - z-index: 3; - margin-top: 10.66667px; - float: right; - font-size: 0; - line-height: 0; -} - -.algolia-autocomplete .algolia-docsearch-footer--logo { - background-image: url("data:image/svg+xml;utf8,"); - background-repeat: no-repeat; - background-position: 50%; - background-size: 100%; - overflow: hidden; - text-indent: -9000px; - width: 100%; - height: 100%; - display: block; - transform: translate(-8px); -} - -.algolia-autocomplete .algolia-docsearch-suggestion--highlight { - color: #FF8C00; - background: rgba(232, 189, 54, 0.1) -} - - -.algolia-autocomplete .algolia-docsearch-suggestion--text .algolia-docsearch-suggestion--highlight { - box-shadow: inset 0 -2px 0 0 rgba(105, 105, 105, .5) -} - -.algolia-autocomplete .ds-suggestion.ds-cursor .algolia-docsearch-suggestion--content { - background-color: rgba(192, 192, 192, .15) -} diff --git a/docs/docsearch.js b/docs/docsearch.js deleted file mode 100644 index b35504c..0000000 --- a/docs/docsearch.js +++ /dev/null @@ -1,85 +0,0 @@ -$(function() { - - // register a handler to move the focus to the search bar - // upon pressing shift + "/" (i.e. "?") - $(document).on('keydown', function(e) { - if (e.shiftKey && e.keyCode == 191) { - e.preventDefault(); - $("#search-input").focus(); - } - }); - - $(document).ready(function() { - // do keyword highlighting - /* modified from https://jsfiddle.net/julmot/bL6bb5oo/ */ - var mark = function() { - - var referrer = document.URL ; - var paramKey = "q" ; - - if (referrer.indexOf("?") !== -1) { - var qs = referrer.substr(referrer.indexOf('?') + 1); - var qs_noanchor = qs.split('#')[0]; - var qsa = qs_noanchor.split('&'); - var keyword = ""; - - for (var i = 0; i < qsa.length; i++) { - var currentParam = qsa[i].split('='); - - if (currentParam.length !== 2) { - continue; - } - - if (currentParam[0] == paramKey) { - keyword = decodeURIComponent(currentParam[1].replace(/\+/g, "%20")); - } - } - - if (keyword !== "") { - $(".contents").unmark({ - done: function() { - $(".contents").mark(keyword); - } - }); - } - } - }; - - mark(); - }); -}); - -/* Search term highlighting ------------------------------*/ - -function matchedWords(hit) { - var words = []; - - var hierarchy = hit._highlightResult.hierarchy; - // loop to fetch from lvl0, lvl1, etc. - for (var idx in hierarchy) { - words = words.concat(hierarchy[idx].matchedWords); - } - - var content = hit._highlightResult.content; - if (content) { - words = words.concat(content.matchedWords); - } - - // return unique words - var words_uniq = [...new Set(words)]; - return words_uniq; -} - -function updateHitURL(hit) { - - var words = matchedWords(hit); - var url = ""; - - if (hit.anchor) { - url = hit.url_without_anchor + '?q=' + escape(words.join(" ")) + '#' + hit.anchor; - } else { - url = hit.url + '?q=' + escape(words.join(" ")); - } - - return url; -} diff --git a/docs/index.html b/docs/index.html deleted file mode 100644 index 581dce0..0000000 --- a/docs/index.html +++ /dev/null @@ -1,175 +0,0 @@ - - - - - - - -Reading Annual and Quarterly Financial Reports from B3 • GetDFPData2 - - - - - - - - - - -
    -
    - - - - -
    - - -
    - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - diff --git a/docs/link.svg b/docs/link.svg deleted file mode 100644 index 88ad827..0000000 --- a/docs/link.svg +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - diff --git a/docs/news/index.html b/docs/news/index.html deleted file mode 100644 index d7f3eea..0000000 --- a/docs/news/index.html +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - - - -Changelog • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    -Version 0.5 (2020-06-11)

    -
      -
    • First
    • -
    -
    -
    - - - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/pkgdown.css b/docs/pkgdown.css deleted file mode 100644 index 1273238..0000000 --- a/docs/pkgdown.css +++ /dev/null @@ -1,367 +0,0 @@ -/* Sticky footer */ - -/** - * Basic idea: https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ - * Details: https://github.com/philipwalton/solved-by-flexbox/blob/master/assets/css/components/site.css - * - * .Site -> body > .container - * .Site-content -> body > .container .row - * .footer -> footer - * - * Key idea seems to be to ensure that .container and __all its parents__ - * have height set to 100% - * - */ - -html, body { - height: 100%; -} - -body { - position: relative; -} - -body > .container { - display: flex; - height: 100%; - flex-direction: column; -} - -body > .container .row { - flex: 1 0 auto; -} - -footer { - margin-top: 45px; - padding: 35px 0 36px; - border-top: 1px solid #e5e5e5; - color: #666; - display: flex; - flex-shrink: 0; -} -footer p { - margin-bottom: 0; -} -footer div { - flex: 1; -} -footer .pkgdown { - text-align: right; -} -footer p { - margin-bottom: 0; -} - -img.icon { - float: right; -} - -img { - max-width: 100%; -} - -/* Fix bug in bootstrap (only seen in firefox) */ -summary { - display: list-item; -} - -/* Typographic tweaking ---------------------------------*/ - -.contents .page-header { - margin-top: calc(-60px + 1em); -} - -dd { - margin-left: 3em; -} - -/* Section anchors ---------------------------------*/ - -a.anchor { - margin-left: -30px; - display:inline-block; - width: 30px; - height: 30px; - visibility: hidden; - - background-image: url(./link.svg); - background-repeat: no-repeat; - background-size: 20px 20px; - background-position: center center; -} - -.hasAnchor:hover a.anchor { - visibility: visible; -} - -@media (max-width: 767px) { - .hasAnchor:hover a.anchor { - visibility: hidden; - } -} - - -/* Fixes for fixed navbar --------------------------*/ - -.contents h1, .contents h2, .contents h3, .contents h4 { - padding-top: 60px; - margin-top: -40px; -} - -/* Navbar submenu --------------------------*/ - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu>.dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover>.dropdown-menu { - display: block; -} - -.dropdown-submenu>a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #cccccc; - margin-top: 5px; - margin-right: -10px; -} - -.dropdown-submenu:hover>a:after { - border-left-color: #ffffff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left>.dropdown-menu { - left: -100%; - margin-left: 10px; - border-radius: 6px 0 6px 6px; -} - -/* Sidebar --------------------------*/ - -#pkgdown-sidebar { - margin-top: 30px; - position: -webkit-sticky; - position: sticky; - top: 70px; -} - -#pkgdown-sidebar h2 { - font-size: 1.5em; - margin-top: 1em; -} - -#pkgdown-sidebar h2:first-child { - margin-top: 0; -} - -#pkgdown-sidebar .list-unstyled li { - margin-bottom: 0.5em; -} - -/* bootstrap-toc tweaks ------------------------------------------------------*/ - -/* All levels of nav */ - -nav[data-toggle='toc'] .nav > li > a { - padding: 4px 20px 4px 6px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; -} - -nav[data-toggle='toc'] .nav > li > a:hover, -nav[data-toggle='toc'] .nav > li > a:focus { - padding-left: 5px; - color: inherit; - border-left: 1px solid #878787; -} - -nav[data-toggle='toc'] .nav > .active > a, -nav[data-toggle='toc'] .nav > .active:hover > a, -nav[data-toggle='toc'] .nav > .active:focus > a { - padding-left: 5px; - font-size: 1.5rem; - font-weight: 400; - color: inherit; - border-left: 2px solid #878787; -} - -/* Nav: second level (shown on .active) */ - -nav[data-toggle='toc'] .nav .nav { - display: none; /* Hide by default, but at >768px, show it */ - padding-bottom: 10px; -} - -nav[data-toggle='toc'] .nav .nav > li > a { - padding-left: 16px; - font-size: 1.35rem; -} - -nav[data-toggle='toc'] .nav .nav > li > a:hover, -nav[data-toggle='toc'] .nav .nav > li > a:focus { - padding-left: 15px; -} - -nav[data-toggle='toc'] .nav .nav > .active > a, -nav[data-toggle='toc'] .nav .nav > .active:hover > a, -nav[data-toggle='toc'] .nav .nav > .active:focus > a { - padding-left: 15px; - font-weight: 500; - font-size: 1.35rem; -} - -/* orcid ------------------------------------------------------------------- */ - -.orcid { - font-size: 16px; - color: #A6CE39; - /* margins are required by official ORCID trademark and display guidelines */ - margin-left:4px; - margin-right:4px; - vertical-align: middle; -} - -/* Reference index & topics ----------------------------------------------- */ - -.ref-index th {font-weight: normal;} - -.ref-index td {vertical-align: top; min-width: 100px} -.ref-index .icon {width: 40px;} -.ref-index .alias {width: 40%;} -.ref-index-icons .alias {width: calc(40% - 40px);} -.ref-index .title {width: 60%;} - -.ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} -.ref-arguments .name {width: 20%;} -.ref-arguments .desc {width: 80%;} - -/* Nice scrolling for wide elements --------------------------------------- */ - -table { - display: block; - overflow: auto; -} - -/* Syntax highlighting ---------------------------------------------------- */ - -pre { - word-wrap: normal; - word-break: normal; - border: 1px solid #eee; -} - -pre, code { - background-color: #f8f8f8; - color: #333; -} - -pre code { - overflow: auto; - word-wrap: normal; - white-space: pre; -} - -pre .img { - margin: 5px 0; -} - -pre .img img { - background-color: #fff; - display: block; - height: auto; -} - -code a, pre a { - color: #375f84; -} - -a.sourceLine:hover { - text-decoration: none; -} - -.fl {color: #1514b5;} -.fu {color: #000000;} /* function */ -.ch,.st {color: #036a07;} /* string */ -.kw {color: #264D66;} /* keyword */ -.co {color: #888888;} /* comment */ - -.message { color: black; font-weight: bolder;} -.error { color: orange; font-weight: bolder;} -.warning { color: #6A0366; font-weight: bolder;} - -/* Clipboard --------------------------*/ - -.hasCopyButton { - position: relative; -} - -.btn-copy-ex { - position: absolute; - right: 0; - top: 0; - visibility: hidden; -} - -.hasCopyButton:hover button.btn-copy-ex { - visibility: visible; -} - -/* headroom.js ------------------------ */ - -.headroom { - will-change: transform; - transition: transform 200ms linear; -} -.headroom--pinned { - transform: translateY(0%); -} -.headroom--unpinned { - transform: translateY(-100%); -} - -/* mark.js ----------------------------*/ - -mark { - background-color: rgba(255, 255, 51, 0.5); - border-bottom: 2px solid rgba(255, 153, 51, 0.3); - padding: 1px; -} - -/* vertical spacing after htmlwidgets */ -.html-widget { - margin-bottom: 10px; -} - -/* fontawesome ------------------------ */ - -.fab { - font-family: "Font Awesome 5 Brands" !important; -} - -/* don't display links in code chunks when printing */ -/* source: https://stackoverflow.com/a/10781533 */ -@media print { - code a:link:after, code a:visited:after { - content: ""; - } -} diff --git a/docs/pkgdown.js b/docs/pkgdown.js deleted file mode 100644 index 7e7048f..0000000 --- a/docs/pkgdown.js +++ /dev/null @@ -1,108 +0,0 @@ -/* http://gregfranko.com/blog/jquery-best-practices/ */ -(function($) { - $(function() { - - $('.navbar-fixed-top').headroom(); - - $('body').css('padding-top', $('.navbar').height() + 10); - $(window).resize(function(){ - $('body').css('padding-top', $('.navbar').height() + 10); - }); - - $('[data-toggle="tooltip"]').tooltip(); - - var cur_path = paths(location.pathname); - var links = $("#navbar ul li a"); - var max_length = -1; - var pos = -1; - for (var i = 0; i < links.length; i++) { - if (links[i].getAttribute("href") === "#") - continue; - // Ignore external links - if (links[i].host !== location.host) - continue; - - var nav_path = paths(links[i].pathname); - - var length = prefix_length(nav_path, cur_path); - if (length > max_length) { - max_length = length; - pos = i; - } - } - - // Add class to parent
  • , and enclosing
  • if in dropdown - if (pos >= 0) { - var menu_anchor = $(links[pos]); - menu_anchor.parent().addClass("active"); - menu_anchor.closest("li.dropdown").addClass("active"); - } - }); - - function paths(pathname) { - var pieces = pathname.split("/"); - pieces.shift(); // always starts with / - - var end = pieces[pieces.length - 1]; - if (end === "index.html" || end === "") - pieces.pop(); - return(pieces); - } - - // Returns -1 if not found - function prefix_length(needle, haystack) { - if (needle.length > haystack.length) - return(-1); - - // Special case for length-0 haystack, since for loop won't run - if (haystack.length === 0) { - return(needle.length === 0 ? 0 : -1); - } - - for (var i = 0; i < haystack.length; i++) { - if (needle[i] != haystack[i]) - return(i); - } - - return(haystack.length); - } - - /* Clipboard --------------------------*/ - - function changeTooltipMessage(element, msg) { - var tooltipOriginalTitle=element.getAttribute('data-original-title'); - element.setAttribute('data-original-title', msg); - $(element).tooltip('show'); - element.setAttribute('data-original-title', tooltipOriginalTitle); - } - - if(ClipboardJS.isSupported()) { - $(document).ready(function() { - var copyButton = ""; - - $(".examples, div.sourceCode").addClass("hasCopyButton"); - - // Insert copy buttons: - $(copyButton).prependTo(".hasCopyButton"); - - // Initialize tooltips: - $('.btn-copy-ex').tooltip({container: 'body'}); - - // Initialize clipboard: - var clipboardBtnCopies = new ClipboardJS('[data-clipboard-copy]', { - text: function(trigger) { - return trigger.parentNode.textContent; - } - }); - - clipboardBtnCopies.on('success', function(e) { - changeTooltipMessage(e.trigger, 'Copied!'); - e.clearSelection(); - }); - - clipboardBtnCopies.on('error', function() { - changeTooltipMessage(e.trigger,'Press Ctrl+C or Command+C to copy'); - }); - }); - } -})(window.jQuery || window.$) diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml deleted file mode 100644 index 631d265..0000000 --- a/docs/pkgdown.yml +++ /dev/null @@ -1,7 +0,0 @@ -pandoc: 2.11.2 -pkgdown: 1.6.1 -pkgdown_sha: ~ -articles: - GetDFPData2-vignette-introduction: GetDFPData2-vignette-introduction.html -last_built: 2021-03-11T19:37Z - diff --git a/docs/reference/Rplot001.png b/docs/reference/Rplot001.png deleted file mode 100644 index 17a358060aed2a86950757bbd25c6f92c08c458f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1011 zcmeAS@N?(olHy`uVBq!ia0y~yV0-|=9Be?5+AI5}0x7m6Z+90U4Fo@(ch>_c&H|6f zVg?3oArNM~bhqvg0|WD9PZ!6KiaBo&GBN^{G%5UFpXcEKVvd5*5Eu=C0SJK)8A6*F U7`aXvEC5;V>FVdQ&MBb@00SN#Z2$lO diff --git a/docs/reference/clean_dfp_itr_data.html b/docs/reference/clean_dfp_itr_data.html deleted file mode 100644 index 57f2e33..0000000 --- a/docs/reference/clean_dfp_itr_data.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - -Cleans ITR/DFP table — clean_dfp_itr_data • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Cleans ITR/DFP table

    -
    - -
    clean_dfp_itr_data(df_in, file_in)
    - -

    Arguments

    - - - - - - - - - - -
    df_in

    A itr/dpf dataframe

    file_in

    path of csv file

    - -

    Value

    - -

    A Clean dataframe

    - -

    Examples

    -
    -if (FALSE) { -# no example -} - -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/download_read_dfp_zip_file.html b/docs/reference/download_read_dfp_zip_file.html deleted file mode 100644 index 6d47e24..0000000 --- a/docs/reference/download_read_dfp_zip_file.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - -Downloads and reads DFP datasets — download_read_dfp_zip_file • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Downloads and reads DFP datasets

    -
    - -
    download_read_dfp_zip_file(
    -  url_in,
    -  companies_cvm_codes,
    -  type_format,
    -  type_docs,
    -  cache_folder,
    -  clean_data,
    -  do_shiny_progress
    -)
    - -

    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')

    type_docs

    Type of financial documents. E.g. c('DRE', 'BPA'). Definitions: '*' = fetch all docs, 'BPA' = Assets (ativos), -'BPP' = Liabilities (passivo), -'DRE' = income statement (demonstrativo de resultados), -'DFC_MD' = cash flow by direct method (fluxo de caixa pelo metodo direto), -'DFC_MI' = cash flow by indirect method (fluxo de caixa pelo metodo indireto), -'DMPL' = statement of changes in equity (mutacoes do patrimonio liquido), -'DVA' = value added report (desmonstrativo de valor agregado)

    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

    -
    -if (FALSE) # 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) -
    #> Error in download_read_dfp_zip_file(url_in = my_url, companies_cvm_codes = NULL, type_format = "con", clean_data = TRUE): could not find function "download_read_dfp_zip_file"
    -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/download_read_itr_zip_file.html b/docs/reference/download_read_itr_zip_file.html deleted file mode 100644 index 0d14bd5..0000000 --- a/docs/reference/download_read_itr_zip_file.html +++ /dev/null @@ -1,221 +0,0 @@ - - - - - - - - -Downloads and reads ITR datasets — download_read_itr_zip_file • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Downloads and reads ITR datasets

    -
    - -
    download_read_itr_zip_file(
    -  url_in,
    -  companies_cvm_codes,
    -  type_docs,
    -  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_docs

    Type of financial documents. E.g. c('DRE', 'BPA'). Definitions: '*' = fetch all docs, 'BPA' = Assets (ativos), -'BPP' = Liabilities (passivo), -'DRE' = income statement (demonstrativo de resultados), -'DFC_MD' = cash flow by direct method (fluxo de caixa pelo metodo direto), -'DFC_MI' = cash flow by indirect method (fluxo de caixa pelo metodo indireto), -'DMPL' = statement of changes in equity (mutacoes do patrimonio liquido), -'DVA' = value added report (desmonstrativo de valor agregado)

    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 itr data

    - -

    Examples

    -
    -if (FALSE) # keep cran check fast -my_url <- 'http://dados.cvm.gov.br/dados/CIA_ABERTA/DOC/ITR/DADOS/itr_cia_aberta_2012.zip' -df_out <- download_read_itr_zip_file(url_in = my_url, - companies_cvm_codes = NULL, - type_docs = 'DRE', - type_format = 'con', - clean_data = TRUE) -
    #> Error in basename(url_in): object 'my_url' not found
    -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/export_xlsx.html b/docs/reference/export_xlsx.html deleted file mode 100644 index 95635a8..0000000 --- a/docs/reference/export_xlsx.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - -Export DFP/ITR data to a xlsx file — export_xlsx • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Export DFP/ITR data to a xlsx file

    -
    - -
    export_xlsx(l_dfp, f_xlsx = "GetDFPData-XLSX.xlsx")
    - -

    Arguments

    - - - - - - - - - - -
    l_dfp

    A list from get_dfp_data

    f_xlsx

    Path to xlsx file

    - -

    Value

    - -

    A dataframe with several information about B3 companies

    - -

    Examples

    -
    -if (FALSE) # keep cran check fast -df_info <- get_info_companies() -str(df_info) -
    #> Error in str(df_info): object 'df_info' not found
    -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/find_dl_size.html b/docs/reference/find_dl_size.html deleted file mode 100644 index 9538261..0000000 --- a/docs/reference/find_dl_size.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - -Find downloas size — find_dl_size • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Find downloas size

    -
    - -
    find_dl_size(url_in)
    - -

    Arguments

    - - - - - - -
    url_in

    An internet address

    - -

    Value

    - -

    size of download file

    - -

    Examples

    -
    find_dl_size('https://www.msperlin.com/blog/files/adfer-files/TOC-adfeR-ed3.pdf') -
    #> Error in find_dl_size("https://www.msperlin.com/blog/files/adfer-files/TOC-adfeR-ed3.pdf"): could not find function "find_dl_size"
    -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/find_file_size.html b/docs/reference/find_file_size.html deleted file mode 100644 index 5a102ec..0000000 --- a/docs/reference/find_file_size.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - - -Find file size — find_file_size • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Find file size

    -
    - -
    find_file_size(path)
    - -

    Arguments

    - - - - - - -
    path

    path to file

    - -

    Value

    - -

    size

    - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/fix_cnpj.html b/docs/reference/fix_cnpj.html deleted file mode 100644 index 98d2af0..0000000 --- a/docs/reference/fix_cnpj.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - -Converts cnpj from text to numeric — fix_cnpj • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Converts cnpj from text to numeric

    -
    - -
    fix_cnpj(cnpj_in)
    - -

    Arguments

    - - - - - - -
    cnpj_in

    The character (single) of cnpj

    - -

    Value

    - -

    A numeric cnpj

    - -

    Examples

    -
    -fix_cnpj('00.111.004/005') -
    #> [1] 111004005
    -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/get_contents_ftp.html b/docs/reference/get_contents_ftp.html deleted file mode 100644 index a236041..0000000 --- a/docs/reference/get_contents_ftp.html +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - - -Fetches ftp contents — get_contents_ftp • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Fetches ftp contents

    -
    - -
    get_contents_ftp(ftp_url)
    - -

    Arguments

    - - - - - - -
    ftp_url

    The url of ftp

    - -

    Value

    - -

    A dataframe with links and files

    - -

    Examples

    -
    if (FALSE) # keep cran fast -df_ftp <- get_contents_ftp('http://dados.cvm.gov.br/dados/CIA_ABERTA/DOC/DFP/DRE/DADOS/') - -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/get_dfp_data.html b/docs/reference/get_dfp_data.html deleted file mode 100644 index b76d95d..0000000 --- a/docs/reference/get_dfp_data.html +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - -Downloads and reads DFP datasets — get_dfp_data • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    The DFP (demonstrativos financeiros padronizados) is the annual reporting system of companies -traded at B3. This function will access the CVM ftp and parse all available files according to user -choices

    -
    - -
    get_dfp_data(
    -  companies_cvm_codes = NULL,
    -  first_year = 2010,
    -  last_year = lubridate::year(Sys.Date()),
    -  type_docs = c("BPA", "BPP", "DRE"),
    -  type_format = c("con", "ind"),
    -  clean_data = TRUE,
    -  use_memoise = FALSE,
    -  cache_folder = "gdfpd2_cache",
    -  do_shiny_progress = FALSE
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    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

    type_docs

    Type of financial documents. E.g. c('DRE', 'BPA'). Definitions: '*' = fetch all docs, 'BPA' = Assets (ativos), -'BPP' = Liabilities (passivo), -'DRE' = income statement (demonstrativo de resultados), -'DFC_MD' = cash flow by direct method (fluxo de caixa pelo metodo direto), -'DFC_MI' = cash flow by indirect method (fluxo de caixa pelo metodo indireto), -'DMPL' = statement of changes in equity (mutacoes do patrimonio liquido), -'DVA' = value added report (desmonstrativo de valor agregado)

    type_format

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

    clean_data

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

    use_memoise

    Use memoise caching? If no (default), the function will read all .csv files. If yes, will use package -memoise for caching results (execution speed increases significantly)

    cache_folder

    Path of cache folder to keep memoise and zip files

    - -

    Value

    - -

    A list of tibbles, separated by column GRUPO_DFP

    - -

    Examples

    -
    if (FALSE) { -df_dfp <- get_dfp_data() -} -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/get_dfp_docs.html b/docs/reference/get_dfp_docs.html deleted file mode 100644 index d74442f..0000000 --- a/docs/reference/get_dfp_docs.html +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - - - -Get data from dfp docs — get_dfp_docs • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Get data from dfp docs

    -
    - -
    get_dfp_docs(
    -  companies_cvm_codes,
    -  type_docs,
    -  type_format,
    -  first_year,
    -  last_year,
    -  clean_data,
    -  use_memoise,
    -  cache_folder
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    companies_cvm_codes

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

    type_docs

    Type of financial documents. E.g. c('DRE', 'BPA'). Definitions: '*' = fetch all docs, 'BPA' = Assets (ativos), -'BPP' = Liabilities (passivo), -'DRE' = income statement (demonstrativo de resultados), -'DFC_MD' = cash flow by direct method (fluxo de caixa pelo metodo direto), -'DFC_MI' = cash flow by indirect method (fluxo de caixa pelo metodo indireto), -'DMPL' = statement of changes in equity (mutacoes do patrimonio liquido), -'DVA' = value added report (desmonstrativo de valor agregado)

    type_format

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

    first_year

    First year of selected data

    last_year

    Last year of selected data

    clean_data

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

    use_memoise

    Use memoise caching? If no (default), the function will read all .csv files. If yes, will use package -memoise for caching results (execution speed increases significantly)

    cache_folder

    Path of cache folder to keep memoise and zip files

    - -

    Value

    - -

    A dataframe

    - -

    Examples

    -
    if (FALSE) { -# no example -} -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/get_info_companies.html b/docs/reference/get_info_companies.html deleted file mode 100644 index 69f0186..0000000 --- a/docs/reference/get_info_companies.html +++ /dev/null @@ -1,186 +0,0 @@ - - - - - - - - -Returns a up to date table with information about B3 companies — get_info_companies • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    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 = "gdfpd2_cache")
    - -

    Arguments

    - - - - - - -
    cache_folder

    Path of cache folder to keep memoise and zip files

    - -

    Value

    - -

    A dataframe with several information about B3 companies

    - -

    Examples

    -
    -if (FALSE) # keep cran check fast -df_info <- get_info_companies() -str(df_info) -
    #> Error in str(df_info): object 'df_info' not found
    -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/get_itr_data.html b/docs/reference/get_itr_data.html deleted file mode 100644 index 348f56e..0000000 --- a/docs/reference/get_itr_data.html +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - -Downloads and reads ITR datasets — get_itr_data • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    The ITR (informacoes trimestrais) is the quarterly reporting system of companies -traded at B3. This function will access the CVM ftp and parse all available files according to user -choices

    -
    - -
    get_itr_data(
    -  companies_cvm_codes = NULL,
    -  first_year = 2010,
    -  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 = "gdfpd2_cache"
    -)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    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

    type_docs

    Type of financial documents. E.g. c('DRE', 'BPA'). Definitions: '*' = fetch all docs, 'BPA' = Assets (ativos), -'BPP' = Liabilities (passivo), -'DRE' = income statement (demonstrativo de resultados), -'DFC_MD' = cash flow by direct method (fluxo de caixa pelo metodo direto), -'DFC_MI' = cash flow by indirect method (fluxo de caixa pelo metodo indireto), -'DMPL' = statement of changes in equity (mutacoes do patrimonio liquido), -'DVA' = value added report (desmonstrativo de valor agregado)

    type_format

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

    individual_dre_quarters

    Should the function calculate single quarters for companies: TRUE (default) or FALSE. -This option only applies for the DRE. Be aware that the original data only includes accumulated quarters.

    clean_data

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

    use_memoise

    Use memoise caching? If no (default), the function will read all .csv files. If yes, will use package -memoise for caching results (execution speed increases significantly)

    cache_folder

    Path of cache folder to keep memoise and zip files

    - -

    Value

    - -

    A list of tibbles, separated by column GRUPO_DFP

    - -

    Examples

    -
    -if (FALSE) # dontrun: keep cran check fast -df_itr <- get_itr_data() # fetches all available datasets - -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/index.html b/docs/reference/index.html deleted file mode 100644 index 06585ef..0000000 --- a/docs/reference/index.html +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - - -Function reference • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -

    All functions

    -

    -
    -

    clean_dfp_itr_data()

    -

    Cleans ITR/DFP table

    -

    download_read_dfp_zip_file()

    -

    Downloads and reads DFP datasets

    -

    download_read_itr_zip_file()

    -

    Downloads and reads ITR datasets

    -

    export_xlsx()

    -

    Export DFP/ITR data to a xlsx file

    -

    find_dl_size()

    -

    Find downloas size

    -

    find_file_size()

    -

    Find file size

    -

    fix_cnpj()

    -

    Converts cnpj from text to numeric

    -

    get_contents_ftp()

    -

    Fetches ftp contents

    -

    get_dfp_data()

    -

    Downloads and reads DFP datasets

    -

    get_dfp_docs()

    -

    Get data from dfp docs

    -

    get_info_companies()

    -

    Returns a up to date table with information about B3 companies

    -

    get_itr_data()

    -

    Downloads and reads ITR datasets

    -

    my_download_file()

    -

    Downloads files from the internet

    -

    read_dfp_csv()

    -

    Reads DFP csv file

    -

    read_itr_csv()

    -

    Reads ITR csv file

    -

    search_company()

    -

    Helps users search for a company

    -

    select_responsible_beverage()

    -

    Makes sure people dont drink at afternoon

    -
    - - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/my_download_file.html b/docs/reference/my_download_file.html deleted file mode 100644 index 921d890..0000000 --- a/docs/reference/my_download_file.html +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - - - -Downloads files from the internet — my_download_file • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    This function will make k attempts of download and use different download options according to operating system.

    -
    - -
    my_download_file(dl_link, dest_file, max_dl_tries = 10, be_quiet = TRUE)
    - -

    Arguments

    - - - - - - - - - - - - - - - - - - -
    dl_link

    Link to file

    dest_file

    Local file destination

    max_dl_tries

    Maximum number of attempts

    be_quiet

    Be quiet?

    - -

    Value

    - -

    Status (TRUE = OK)

    - -

    Examples

    -
    -my_url <- paste0('http://www.rad.cvm.gov.br/enetconsulta/', - 'frmDownloadDocumento.aspx?CodigoInstituicao=2', - '&NumeroSequencialDocumento=46133') - -if (FALSE) # keep CHECK fast -dl_status <- my_download_file(my_url, 'tempfile.zip', 10) - -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/pipe.html b/docs/reference/pipe.html deleted file mode 100644 index 5122ba6..0000000 --- a/docs/reference/pipe.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - -Pipe operator — %>% • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    See magrittr::%>% for details.

    -
    - -
    lhs %>% rhs
    - - - -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/read_dfp_csv.html b/docs/reference/read_dfp_csv.html deleted file mode 100644 index 1fd58b1..0000000 --- a/docs/reference/read_dfp_csv.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - -Reads DFP csv file — read_dfp_csv • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Reads DFP csv file

    -
    - -
    read_dfp_csv(file_in, clean_data)
    - -

    Arguments

    - - - - - - - - - - -
    file_in

    path of csv file

    clean_data

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

    - -

    Value

    - -

    A dataframe

    - -

    Examples

    -
    -if (FALSE) { -# no example -} - -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/read_itr_csv.html b/docs/reference/read_itr_csv.html deleted file mode 100644 index aa3e366..0000000 --- a/docs/reference/read_itr_csv.html +++ /dev/null @@ -1,188 +0,0 @@ - - - - - - - - -Reads ITR csv file — read_itr_csv • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Reads ITR csv file

    -
    - -
    read_itr_csv(file_in, clean_data)
    - -

    Arguments

    - - - - - - - - - - -
    file_in

    path of csv file

    clean_data

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

    - -

    Value

    - -

    A dataframe

    - -

    Examples

    -
    -if (FALSE) { -# no example -} - -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/search_company.html b/docs/reference/search_company.html deleted file mode 100644 index 7b87a4c..0000000 --- a/docs/reference/search_company.html +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - -Helps users search for a company — search_company • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Helps users search for a company

    -
    - -
    search_company(char_to_search, cache_folder = "gcvmd_cache")
    - -

    Arguments

    - - - - - - - - - - -
    char_to_search

    Character for partial matching

    cache_folder

    Path of cache folder to keep memoise and zip files

    - -

    Value

    - -

    A dataframe with companies

    - -

    Examples

    -
    -if (FALSE) # dontrun: keep cran check fast -df <- search_company('petrobras') - -
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/docs/reference/select_responsible_beverage.html b/docs/reference/select_responsible_beverage.html deleted file mode 100644 index 4fe0660..0000000 --- a/docs/reference/select_responsible_beverage.html +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - - - -Makes sure people dont drink at afternoon — select_responsible_beverage • GetDFPData2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - -
    - -
    -
    - - -
    -

    Makes sure people dont drink at afternoon

    -
    - -
    select_responsible_beverage()
    - - -

    Value

    - -

    A responsible drink

    - -

    Examples

    -
    print(select_responsible_beverage()) -
    #> [1] "english tea"
    -
    - -
    - - -
    - - -
    -

    Site built with pkgdown 1.6.1.

    -
    - -
    -
    - - - - - - - - diff --git a/man/download_read_itr_zip_file.Rd b/man/download_read_itr_zip_file.Rd index fcde89a..711016f 100644 --- a/man/download_read_itr_zip_file.Rd +++ b/man/download_read_itr_zip_file.Rd @@ -9,7 +9,7 @@ download_read_itr_zip_file( companies_cvm_codes, type_docs, type_format, - cache_folder = "gcvmd_cache", + cache_folder, clean_data ) } diff --git a/man/export_xlsx.Rd b/man/export_xlsx.Rd index 2dd7d41..f589af0 100644 --- a/man/export_xlsx.Rd +++ b/man/export_xlsx.Rd @@ -7,7 +7,7 @@ export_xlsx(l_dfp, f_xlsx = "GetDFPData-XLSX.xlsx") } \arguments{ -\item{l_dfp}{A list from get_dfp_data} +\item{l_dfp}{A list from get_dfp_data or get_itr_data} \item{f_xlsx}{Path to xlsx file} } diff --git a/man/get_itr_data.Rd b/man/get_itr_data.Rd index 507d9d8..92ed45d 100644 --- a/man/get_itr_data.Rd +++ b/man/get_itr_data.Rd @@ -47,6 +47,9 @@ memoise for caching results (execution speed increases significantly)} A list of tibbles, separated by column GRUPO_DFP } \description{ +**IN DEVELOPMENT and NOT EXPORTED (dont use it)**. Results dont seem right.. +} +\details{ The ITR (informacoes trimestrais) is the quarterly reporting system of companies traded at B3. This function will access the CVM ftp and parse all available files according to user choices diff --git a/man/search_company.Rd b/man/search_company.Rd index 8a28eee..969dd70 100644 --- a/man/search_company.Rd +++ b/man/search_company.Rd @@ -4,7 +4,7 @@ \alias{search_company} \title{Helps users search for a company} \usage{ -search_company(char_to_search, cache_folder = "gcvmd_cache") +search_company(char_to_search, cache_folder = "gdfpd2_cache") } \arguments{ \item{char_to_search}{Character for partial matching} diff --git a/vignettes/GetDFPData2-vignette-introduction.R b/vignettes/GetDFPData2-vignette-introduction.R deleted file mode 100644 index 86a02ce..0000000 --- a/vignettes/GetDFPData2-vignette-introduction.R +++ /dev/null @@ -1,5 +0,0 @@ -## ----------------------------------------------------------------------------- -library(GetDFPData2) - -# todo - diff --git a/vignettes/GetDFPData2-vignette-introduction.Rmd b/vignettes/GetDFPData2-vignette-introduction.Rmd index 64e23b6..b7c8170 100644 --- a/vignettes/GetDFPData2-vignette-introduction.Rmd +++ b/vignettes/GetDFPData2-vignette-introduction.Rmd @@ -1,17 +1,69 @@ --- -title: "Using GetDFPData2 to import financial documents from B3" +title: "Using GetDFPData2 to import Annual Reports from B3" author: "Marcelo Perlin" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > - %\VignetteIndexEntry{Using GetDFPData to import financial documents from B3} + %\VignetteIndexEntry{"Using GetDFPData2 to import Annual Reports from B3"} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- +```{r, include=FALSE} +knitr::opts_chunk$set(eval=FALSE) +``` + + +`GetDFPData2` is the second and backwards incompatible version of `GetDPFData`, a R package for downloading annual financial reports from B3, the Brazilian financial exchange. Unlike its first iteration, `GetDFPData2` imports data from a database of csv files from [CVM](http://dados.cvm.gov.br/dados/CIA_ABERTA/), which makes it execute much faster but, the output is slightly different. + +A shiny app -- web interface -- is also available at [https://www.msperlin.com/shiny/GetDFPData2/](https://www.msperlin.com/shiny/GetDFPData2/). + + +# Installation + +```{r, eval=FALSE} +# only in github, soon in CRAN +devtools::install_github('msperlin/GetDFPData2') +``` + +```{r, eval=FALSE} +# not in CRAN, install from github +devtools::install_github('msperlin/GetFREData') +``` + +# Examples of Usage + +## Information about available companies + ```{r} library(GetDFPData2) -# todo +# information about companies +df_info <- get_info_companies(tempdir()) +print(df_info ) +``` + +## Searching for companies + +```{r} +search_company('grendene', cache_folder = tempdir()) ``` +## Downloading Financial Reports + +```{r, message=FALSE} +library(GetDFPData2) + +# downloading DFP data +l_dfp <- get_dfp_data(companies_cvm_codes = 19615, + use_memoise = FALSE, + clean_data = TRUE, + cache_folder = tempdir(), # use local folder in live code + type_docs = c('DRE'), + type_format = 'con', + first_year = 2019, + last_year = 2020) + +str(l_dfp) + +``` diff --git a/vignettes/GetDFPData2-vignette-introduction.html b/vignettes/GetDFPData2-vignette-introduction.html deleted file mode 100644 index 7465399..0000000 --- a/vignettes/GetDFPData2-vignette-introduction.html +++ /dev/null @@ -1,167 +0,0 @@ - - - - - - - - - - - - - - - - -Using GetDFPData2 to import financial documents from B3 - - - - - - - - - - - - - - - - - - - - - - - - - -

    Using GetDFPData2 to import financial documents from B3

    -

    Marcelo Perlin

    -

    2021-03-11

    - - - -
    library(GetDFPData2)
    -
    -# todo
    - - - - - - - - - - -