Update on GetDFPData tables — 2019’s DFP and FRE data

[This article was first published on R on msperlin, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

After battling B3’s website for days, I finally managed to gather a master table for all corporate data. I’m happy to report that the 2019’s data is now included in GetDFPData, the CRAN package and shiny interface. This includes new financial statements and company’s FRE data.

I also want to use this update to formally thank everyone that made a donation in the shiny website. Your donation is not only helping paying for the bills of the server but increasing my motivation for working further in this project.

As for R code with then new dataset, let’s give it a try:

library(GetDFPData)
library(tidyverse)
## ── Attaching packages ───────────────────────────────────────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ ggplot2 3.3.0     ✓ purrr   0.3.4
## ✓ tibble  3.0.0     ✓ dplyr   0.8.5
## ✓ tidyr   1.0.2     ✓ stringr 1.4.0
## ✓ readr   1.3.1     ✓ forcats 0.5.0
## ── Conflicts ──────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()
name.companies <- c('PETRÓLEO BRASILEIRO  S.A.  - PETROBRAS')

first.date <- '2017-01-01'
last.date <- '2020-01-01'
inflation.index <- 'IPCA'

df.reports <- gdfpd.GetDFPData(name.companies = name.companies,
                               first.date = first.date,
                               last.date = last.date)
## Found cache file. Loading data..
## 
## Downloading data for 1 companies
## First Date: 2017-01-01
## Laste Date: 2020-01-01
## Inflation index: dollar
## 
## Downloading inflation data
##  Caching inflation RDATA into tempdir()  Done
## 
## Inputs looking good! Starting download of files:
## 
## PETRÓLEO BRASILEIRO  S.A.  - PETROBRAS
##  Available periods: 2017-12-31   2018-12-31  2019-12-31
## 
## 
## Processing 9512 - PETRÓLEO BRASILEIRO  S.A.  - PETROBRAS
##  Finding info from Bovespa
##      Found BOV cache file
##  Processing 9512 - PETRÓLEO BRASILEIRO  S.A.  - PETROBRAS | date 2017-12-31
##      Acessing DFP data | Found DFP cache file
##      Acessing FRE data | Found FRE cache file
##      Acessing FCA data | Found FCA cache file
##  Processing 9512 - PETRÓLEO BRASILEIRO  S.A.  - PETROBRAS | date 2018-12-31
##      Acessing DFP data | Found DFP cache file
##      Acessing FRE data | Found FRE cache file
##      Acessing FCA data | Found FCA cache file
##  Processing 9512 - PETRÓLEO BRASILEIRO  S.A.  - PETROBRAS | date 2019-12-31
##      Acessing DFP data | Found DFP cache file
##      Acessing FRE data | No FRE file available..
##      Acessing FCA data | No FCA file available..
glimpse(df.reports)
## Rows: 1
## Columns: 46
## $ company.name                      "PETRÓLEO BRASILEIRO  S.A.  - PETROB…
## $ company.code                      9512
## $ cnpj                              "33000167000101"
## $ date.company.constitution         1953-10-03
## $ date.cvm.registration             1977-07-20
## $ company.tickers                   "PETR3;PETR4"
## $ min.date                          2017-12-31
## $ max.date                          2019-12-31
## $ n.periods                         3
## $ company.segment                   "Corporate Governance - Level 2"
## $ current.stockholders              []
## $ current.stock.composition         []
## $ history.files                     []
## $ fr.assets                         []
## $ fr.liabilities                    []
## $ fr.income                         []
## $ fr.cashflow                       []
## $ fr.value                          []
## $ fr.assets.consolidated            []
## $ fr.liabilities.consolidated       []
## $ fr.income.consolidated            []
## $ fr.cashflow.consolidated          []
## $ fr.value.consolidated             []
## $ fr.auditing.report                []
## $ history.dividends                 []
## $ history.stockholders              []
## $ history.capital.issues            []
## $ history.mkt.value                 []
## $ history.capital.increases         []
## $ history.capital.reductions        []
## $ history.stock.repurchases         []
## $ history.other.stock.events        []
## $ history.compensation              []
## $ history.compensation.summary      []
## $ history.transactions.related      []
## $ history.debt.composition          []
## $ history.governance.listings       []
## $ history.board.composition         []
## $ history.committee.composition     []
## $ history.family.relations          []
## $ history.family.related.companies  []
## $ history.auditing                  []
## $ history.responsible.docs          []
## $ history.stocks.details            []
## $ history.dividends.details         []
## $ history.intangible                []

To leave a comment for the author, please follow the link and comment on their blog: R on msperlin.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)