<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/new-package-getitrdata/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://msperlin.github.io/2017-09-29-_Package-GetITRData/"> R and Finance</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<p> Downloading Quarterly Financial Reports from Bovespa – </p>
<p>Financial statements of companies traded at B3 (formerly Bovespa), the<br>
Brazilian stock exchange, are available in its<br>
<a rel="nofollow" href="http://www.bmfbovespa.com.br/" target="_blank">website</a>. Accessing the data for a<br>
single company is straightforwardd. In the website one can find a simple<br>
interface for accessing this dataset. An example is given<br>
<a rel="nofollow" href="https://www.rad.cvm.gov.br/ENETCONSULTA/frmGerenciaPaginaFRE.aspx?NumeroSequencialDocumento=67775&CodigoTipoInstituicao=2" target="_blank">here</a>.<br>
However, gathering and organizing the data for a large scale research,<br>
with many companies and many quarters, is painful. Quarterly reports<br>
must be downloaded or copied individually and later aggregated. Changes<br>
in the accounting format thoughout time can make this process slow,<br>
unreliable and irreproducible.</p>
<p>Package <code>GetITRData</code> provides a R interface to all financial statements<br>
available in the website. It not only downloads the data but also<br>
organizes it in a tabular format and allows the use of inflation<br>
indexes. Users can simply select companies and a time period to download<br>
all available data. Several information about current companies, such as<br>
sector and available quarters are also at reach. The main purpose of the<br>
package is to make it easy to access quarterly financial statements in<br>
large scale research, facilitating the reproducibility of corporate<br>
finance studies with Bovespa data.</p>
<h1>Installation</h1>
<p>The package is available in CRAN (release version) and in Github<br>
(development version). You can install any of those with the following<br>
code:</p>
<div>
<pre><code># Release version in CRAN 
install.packages('GetITRData') 

# Development version in Github
devtools::install\_github('msperlin/GetITRData') 
</code></pre>
</div>
<h1>How to use <code>GetITRData</code></h1>
<p>The starting point of <code>GetITRData</code> is to find the official names of<br>
companies in Bovespa. Function <code>gitrd.search.company</code> serves this<br>
purpose. Given a string (text), it will search for a partial matches in<br>
companies names. As an example, let’s find the <em>official</em> name of<br>
Petrobras, one of the largest companies in Brazil:</p>
<div>
<pre><code>library(GetITRData)

gitrd.search.company('petrobras')

## 
## Reading info file from github
## Found 24012 lines for 603 companies  [Actives =  457  Inactives =  146 ]
## Last file update:  2017-09-19
## 
## Found 1 companies:
## PETROBRAS | situation = ATIVO | first date = 1998-09-30 | last date - 2017-06-30
</code></pre>
</div>
<p>Its official name in Bovespa records is PETROBRAS. Data for quarterly<br>
statements is available from 1998 to 2017. The situation of the company,<br>
active or canceled, is also given. This helps verifying the availability<br>
of data.</p>
<p>The content of all available quarterly statements can be accessed with<br>
function <code>gitrd.get.info.companies</code>. It will read and parse a .csv file<br>
from my <a rel="nofollow" href="https://github.com/msperlin/GetITRData_auxiliary" target="_blank">github<br>
repository</a>. This will<br>
be periodically updated for new quarterly statements. Let’s try it out:</p>
<div>
<pre><code>df.info &lt;- gitrd.get.info.companies()

## 
## Reading info file from github
## Found 24012 lines for 603 companies  [Actives =  457  Inactives =  146 ]
## Last file update:  2017-09-19

str(df.info)

## Classes 'tbl_df', 'tbl' and 'data.frame':    24012 obs. of  10 variables:
##  $ id.company  : int  16330 16330 16330 16330 16330 16330 16330 16330 16330 16330 ...
##  $ name.company: chr  &quot;521 PARTICIPAÇÕES S/A&quot; &quot;521 PARTICIPAÇÕES S/A&quot; &quot;521 PARTICIPAÇÕES S/A&quot; &quot;521 PARTICIPAÇÕES S/A&quot; ...
##  $ main.sector : chr  NA NA NA NA ...
##  $ sub.sector  : chr  NA NA NA NA ...
##  $ segment     : chr  NA NA NA NA ...
##  $ id.file     : int  47368 42591 40601 37569 32706 30654 27521 22269 20368 17649 ...
##  $ dl.link     : chr  &quot;http://www.rad.cvm.gov.br/enetconsulta/frmDownloadDocumento.aspx?CodigoInstituicao=2&amp;NumeroSequencialDocumento=47368&quot; &quot;http://www.rad.cvm.gov.br/enetconsulta/frmDownloadDocumento.aspx?CodigoInstituicao=2&amp;NumeroSequencialDocumento=42591&quot; &quot;http://www.rad.cvm.gov.br/enetconsulta/frmDownloadDocumento.aspx?CodigoInstituicao=2&amp;NumeroSequencialDocumento=40601&quot; &quot;http://www.rad.cvm.gov.br/enetconsulta/frmDownloadDocumento.aspx?CodigoInstituicao=2&amp;NumeroSequencialDocumento=37569&quot; ...
##  $ id.date     : Date, format: &quot;2015-03-31&quot; &quot;2014-09-30&quot; ...
##  $ id.type     : chr  &quot;after 2011&quot; &quot;after 2011&quot; &quot;after 2011&quot; &quot;after 2011&quot; ...
##  $ situation   : chr  &quot;ATIVO&quot; &quot;ATIVO&quot; &quot;ATIVO&quot; &quot;ATIVO&quot; ...
</code></pre>
</div>
<p>This file includes several information that are gathered from Bovespa:<br>
names of companies, sectors, dates quarterly statements and, most<br>
importantly, the links to download the files. The resulting dataframe<br>
can be used to filter and gather information for large scale research<br>
such as downloading financial data for a specific sector.</p>
<h2>Downloading financial information for ONE company</h2>
<p>All you need to download financial data with <code>GetITRData</code> are the<br>
official names of companies, which can be found with<br>
<code>gitrd.search.company</code>, the desired starting and ending dates and the<br>
type of financial information (individual or consolidated). Let’s try it<br>
for PETROBRAS:</p>
<div>
<pre><code>name.companies &lt;- 'PETROBRAS'
first.date &lt;- '2005-01-01'
last.date  &lt;- '2006-01-01'
type.statements &lt;- 'individual'

df.reports &lt;- gitrd.GetITRData(name.companies = name.companies, 
                               first.date = first.date,
                               last.date = last.date,
                               type.info = type.statements)

## 
## Reading info file from github
## Found 24012 lines for 603 companies  [Actives =  457  Inactives =  146 ]
## Last file update:  2017-09-19
## 
## Downloading data for 1 companies
## Type of financial statements: individual
## First Date: 2005-01-01
## Laste Date: 2006-01-01
## Inflation index: none
## 
## Downloading none data using BETS Done
## 
## 
## WARNING: For quarters before 2009, the cash flow statements are not available
## 
## Starting processing stage:
## PETROBRAS
##  Available quarters: 2005-09-30  2005-06-30  2005-03-31
## 
## 
## Processing PETROBRAS, Quarter = 2005-09-30   Downloading | Reading file
## Processing PETROBRAS, Quarter = 2005-06-30   Downloading | Reading file
## Processing PETROBRAS, Quarter = 2005-03-31   Downloading | Reading file

## Warning in max.default(structure(numeric(0), class = &quot;Date&quot;), na.rm =
## FALSE): no non-missing arguments to max; returning -Inf
</code></pre>
</div>
<p>The resulting object is a <code>tibble</code>, a data.frame type of object that<br>
allows for list columns. Let’s have a look in its content:</p>
<div>
<pre><code>str(df.reports)

## Classes 'tbl_df', 'tbl' and 'data.frame':    1 obs. of  10 variables:
##  $ company.name: chr &quot;PETROBRAS&quot;
##  $ company.code: int 9512
##  $ type.info   : chr &quot;individual&quot;
##  $ min.date    : Date, format: &quot;2005-03-31&quot;
##  $ max.date    : Date, format: &quot;2005-09-30&quot;
##  $ n.quarters  : int 3
##  $ assets      :List of 1
##   ..$ :Classes 'tbl_df', 'tbl' and 'data.frame': 191 obs. of  5 variables:
##   .. ..$ acc.number  : chr  &quot;1&quot; &quot;1.01&quot; &quot;1.01.01&quot; &quot;1.01.01.01&quot; ...
##   .. ..$ acc.desc    : chr  &quot;Ativo Total&quot; &quot;Ativo Circulante&quot; &quot;Disponibilidades&quot; &quot;Caixa e Bancos&quot; ...
##   .. ..$ acc.value   : int  147026464 41052623 15146496 1498194 13648302 9450575 3488650 4955111 1090180 -83366 ...
##   .. ..$ ref.date    : Date, format: &quot;2005-09-30&quot; ...
##   .. ..$ company.name: chr  &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; ...
##  $ liabilities :List of 1
##   ..$ :Classes 'tbl_df', 'tbl' and 'data.frame': 160 obs. of  5 variables:
##   .. ..$ acc.number  : chr  &quot;2&quot; &quot;2.01&quot; &quot;2.01.01&quot; &quot;2.01.01.01&quot; ...
##   .. ..$ acc.desc    : chr  &quot;Passivo Total&quot; &quot;Passivo Circulante&quot; &quot;Empréstimos e Financiamentos&quot; &quot;Financiamentos&quot; ...
##   .. ..$ acc.value   : int  147026464 44603494 1154258 1039841 114417 0 5205735 7429086 1156875 935603 ...
##   .. ..$ ref.date    : Date, format: &quot;2005-09-30&quot; ...
##   .. ..$ company.name: chr  &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; ...
##  $ income      :List of 1
##   ..$ :Classes 'tbl_df', 'tbl' and 'data.frame': 100 obs. of  5 variables:
##   .. ..$ acc.number  : chr  &quot;3.01&quot; &quot;3.02&quot; &quot;3.03&quot; &quot;3.04&quot; ...
##   .. ..$ acc.desc    : chr  &quot;Receita Bruta de Vendas e/ou Serviços&quot; &quot;Deduções da Receita Bruta&quot; &quot;Receita Líquida de Vendas e/ou Serviços&quot; &quot;Custo de Bens e/ou Serviços Vendidos&quot; ...
##   .. ..$ acc.value   : int  37870949 -9778549 28092400 -15030559 13061841 -4270217 -1221668 -895230 -899 -894331 ...
##   .. ..$ ref.date    : Date, format: &quot;2005-09-30&quot; ...
##   .. ..$ company.name: chr  &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; ...
##  $ df.cashflow :List of 1
##   ..$ :'data.frame': 0 obs. of  5 variables:
##   .. ..$ acc.desc    : Named list()
##   .. ..$ acc.value   : logi 
##   .. ..$ acc.number  : chr 
##   .. ..$ company.name: chr 
##   .. ..$ ref.date    :Class 'Date'  num(0) 
##   .. ..- attr(*, &quot;na.action&quot;)=Class 'omit'  Named int [1:3] 1 2 3
##   .. .. .. ..- attr(*, &quot;names&quot;)= chr [1:3] &quot;1&quot; &quot;2&quot; &quot;3&quot;
</code></pre>
</div>
<p>Object <code>df.reports</code> only has one row since we only asked for data of one<br>
company. The number of rows increases with the number of companies, as<br>
we will soon learn with the next example. All financial statements for<br>
the different quarters are available within <code>df.reports</code>. For example,<br>
the income statements for all desired quarters of PETROBRAS are:</p>
<div>
<pre><code>df.income.long &lt;- df.reports$income[[1]]

str(df.income.long)

## Classes 'tbl_df', 'tbl' and 'data.frame':    100 obs. of  5 variables:
##  $ acc.number  : chr  &quot;3.01&quot; &quot;3.02&quot; &quot;3.03&quot; &quot;3.04&quot; ...
##  $ acc.desc    : chr  &quot;Receita Bruta de Vendas e/ou Serviços&quot; &quot;Deduções da Receita Bruta&quot; &quot;Receita Líquida de Vendas e/ou Serviços&quot; &quot;Custo de Bens e/ou Serviços Vendidos&quot; ...
##  $ acc.value   : int  37870949 -9778549 28092400 -15030559 13061841 -4270217 -1221668 -895230 -899 -894331 ...
##  $ ref.date    : Date, format: &quot;2005-09-30&quot; &quot;2005-09-30&quot; ...
##  $ company.name: chr  &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; &quot;PETROBRAS&quot; ...
</code></pre>
</div>
<p>The resulting dataframe is in the long format, ready for processing. In<br>
the long format, financial statements of different quarters are stacked.<br>
In the wide format, we have the columns as dates and rows as account names/ids. If you want the wide<br>
format, which I believe is most common in financial analysis, you can<br>
use function <code>gitrd.convert.to.wide</code>. See an example next:</p>
<div>
<pre><code>df.income.wide &lt;- gitrd.convert.to.wide(df.income.long)

knitr::kable(df.income.wide )
</code></pre>
</div>
<table>
<thead>
<tr>
<th align="left">acc.number</th>
<th align="left">acc.desc</th>
<th align="left">company.name</th>
<th align="right">2005-03-31</th>
<th align="right">2005-06-30</th>
<th align="right">2005-09-30</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left">3.01</td>
<td align="left">Receita Bruta de Vendas e/ou Serviços</td>
<td align="left">PETROBRAS</td>
<td align="right">31355183</td>
<td align="right">35425584</td>
<td align="right">37870949</td>
</tr>
<tr>
<td align="left">3.02</td>
<td align="left">Deduções da Receita Bruta</td>
<td align="left">PETROBRAS</td>
<td align="right">-8788723</td>
<td align="right">-9321322</td>
<td align="right">-9778549</td>
</tr>
<tr>
<td align="left">3.03</td>
<td align="left">Receita Líquida de Vendas e/ou Serviços</td>
<td align="left">PETROBRAS</td>
<td align="right">22566460</td>
<td align="right">26104262</td>
<td align="right">28092400</td>
</tr>
<tr>
<td align="left">3.04</td>
<td align="left">Custo de Bens e/ou Serviços Vendidos</td>
<td align="left">PETROBRAS</td>
<td align="right">-12052044</td>
<td align="right">-14530594</td>
<td align="right">-15030559</td>
</tr>
<tr>
<td align="left">3.05</td>
<td align="left">Resultado Bruto</td>
<td align="left">PETROBRAS</td>
<td align="right">10514416</td>
<td align="right">11573668</td>
<td align="right">13061841</td>
</tr>
<tr>
<td align="left">3.06</td>
<td align="left">Despesas/Receitas Operacionais</td>
<td align="left">PETROBRAS</td>
<td align="right">-2869703</td>
<td align="right">-5249799</td>
<td align="right">-4270217</td>
</tr>
<tr>
<td align="left">3.06.01</td>
<td align="left">Com Vendas</td>
<td align="left">PETROBRAS</td>
<td align="right">-858170</td>
<td align="right">-820899</td>
<td align="right">-1221668</td>
</tr>
<tr>
<td align="left">3.06.02</td>
<td align="left">Gerais e Administrativas</td>
<td align="left">PETROBRAS</td>
<td align="right">-768830</td>
<td align="right">-880185</td>
<td align="right">-895230</td>
</tr>
<tr>
<td align="left">3.06.02.01</td>
<td align="left">Honor.Diretoria e Cons. Administração</td>
<td align="left">PETROBRAS</td>
<td align="right">-984</td>
<td align="right">-886</td>
<td align="right">-899</td>
</tr>
<tr>
<td align="left">3.06.02.02</td>
<td align="left">De Administração</td>
<td align="left">PETROBRAS</td>
<td align="right">-767846</td>
<td align="right">-879299</td>
<td align="right">-894331</td>
</tr>
<tr>
<td align="left">3.06.03</td>
<td align="left">Financeiras</td>
<td align="left">PETROBRAS</td>
<td align="right">-53787</td>
<td align="right">-480281</td>
<td align="right">-282706</td>
</tr>
<tr>
<td align="left">3.06.03.01</td>
<td align="left">Receitas Financeiras</td>
<td align="left">PETROBRAS</td>
<td align="right">525452</td>
<td align="right">106753</td>
<td align="right">272290</td>
</tr>
<tr>
<td align="left">3.06.03.02</td>
<td align="left">Despesas Financeiras</td>
<td align="left">PETROBRAS</td>
<td align="right">-579239</td>
<td align="right">-587034</td>
<td align="right">-554996</td>
</tr>
<tr>
<td align="left">3.06.04</td>
<td align="left">Outras Receitas Operacionais</td>
<td align="left">PETROBRAS</td>
<td align="right">0</td>
<td align="right">0</td>
<td align="right">0</td>
</tr>
<tr>
<td align="left">3.06.05</td>
<td align="left">Outras Despesas Operacionais</td>
<td align="left">PETROBRAS</td>
<td align="right">-2104923</td>
<td align="right">-3155693</td>
<td align="right">-1956858</td>
</tr>
<tr>
<td align="left">3.06.05.01</td>
<td align="left">Custos Explot.p/Extração Petróleo/Gás</td>
<td align="left">PETROBRAS</td>
<td align="right">-107010</td>
<td align="right">-101527</td>
<td align="right">-334116</td>
</tr>
<tr>
<td align="left">3.06.05.02</td>
<td align="left">Custo c/ Pesq. Desenv. Tecnológico</td>
<td align="left">PETROBRAS</td>
<td align="right">-192741</td>
<td align="right">-221813</td>
<td align="right">-247456</td>
</tr>
<tr>
<td align="left">3.06.05.03</td>
<td align="left">Tributárias</td>
<td align="left">PETROBRAS</td>
<td align="right">-185581</td>
<td align="right">-290086</td>
<td align="right">-114519</td>
</tr>
<tr>
<td align="left">3.06.05.04</td>
<td align="left">Variações Monetárias e Cambiais Líquidas</td>
<td align="left">PETROBRAS</td>
<td align="right">-117821</td>
<td align="right">-921626</td>
<td align="right">-401757</td>
</tr>
<tr>
<td align="left">3.06.05.05</td>
<td align="left">Outras Despesas/Receitas Oper. Liquidas</td>
<td align="left">PETROBRAS</td>
<td align="right">-1501770</td>
<td align="right">-1620641</td>
<td align="right">-859010</td>
</tr>
<tr>
<td align="left">3.06.06</td>
<td align="left">Resultado da Equivalência Patrimonial</td>
<td align="left">PETROBRAS</td>
<td align="right">916007</td>
<td align="right">87259</td>
<td align="right">86245</td>
</tr>
<tr>
<td align="left">3.07</td>
<td align="left">Resultado Operacional</td>
<td align="left">PETROBRAS</td>
<td align="right">7644713</td>
<td align="right">6323869</td>
<td align="right">8791624</td>
</tr>
<tr>
<td align="left">3.08</td>
<td align="left">Resultado Não Operacional</td>
<td align="left">PETROBRAS</td>
<td align="right">-151498</td>
<td align="right">-64670</td>
<td align="right">1064</td>
</tr>
<tr>
<td align="left">3.08.01</td>
<td align="left">Receitas</td>
<td align="left">PETROBRAS</td>
<td align="right">1256</td>
<td align="right">8805</td>
<td align="right">450552</td>
</tr>
<tr>
<td align="left">3.08.02</td>
<td align="left">Despesas</td>
<td align="left">PETROBRAS</td>
<td align="right">-152754</td>
<td align="right">-73475</td>
<td align="right">-449488</td>
</tr>
<tr>
<td align="left">3.09</td>
<td align="left">Resultado Antes Tributação/Participações</td>
<td align="left">PETROBRAS</td>
<td align="right">7493215</td>
<td align="right">6259199</td>
<td align="right">8792688</td>
</tr>
<tr>
<td align="left">3.10</td>
<td align="left">Provisão para IR e Contribuição Social</td>
<td align="left">PETROBRAS</td>
<td align="right">-1847762</td>
<td align="right">-1151342</td>
<td align="right">-3002751</td>
</tr>
<tr>
<td align="left">3.11</td>
<td align="left">IR Diferido</td>
<td align="left">PETROBRAS</td>
<td align="right">-538132</td>
<td align="right">-408725</td>
<td align="right">-111709</td>
</tr>
<tr>
<td align="left">3.12</td>
<td align="left">Participações/Contribuições Estatutárias</td>
<td align="left">PETROBRAS</td>
<td align="right">0</td>
<td align="right">0</td>
<td align="right">0</td>
</tr>
<tr>
<td align="left">3.12.01</td>
<td align="left">Participações</td>
<td align="left">PETROBRAS</td>
<td align="right">0</td>
<td align="right">0</td>
<td align="right">0</td>
</tr>
<tr>
<td align="left">3.12.01.01</td>
<td align="left">Partic. de Empregados e administradores</td>
<td align="left">PETROBRAS</td>
<td align="right">0</td>
<td align="right">NA</td>
<td align="right">NA</td>
</tr>
<tr>
<td align="left">3.12.02</td>
<td align="left">Contribuições</td>
<td align="left">PETROBRAS</td>
<td align="right">0</td>
<td align="right">0</td>
<td align="right">0</td>
</tr>
<tr>
<td align="left">3.13</td>
<td align="left">Reversão dos Juros sobre Capital Próprio</td>
<td align="left">PETROBRAS</td>
<td align="right">0</td>
<td align="right">0</td>
<td align="right">0</td>
</tr>
<tr>
<td align="left">3.15</td>
<td align="left">Lucro/Prejuízo do Período</td>
<td align="left">PETROBRAS</td>
<td align="right">5107321</td>
<td align="right">4699132</td>
<td align="right">5678228</td>
</tr>
</tbody>
</table>
<h2>Downloading financial information for SEVERAL companies</h2>
<p>If you are doing serious research, it is likely that you need financial<br>
statements for more than one company. Package <code>GetITRData</code> is specially<br>
designed for handling large scale download of data. Let’s build a case<br>
with 5 randomly selected companies:</p>
<div>
<pre><code>set.seed(5)
my.companies &lt;- sample(unique(df.info$name.company), 5)

first.date &lt;- '2005-01-01'
last.date  &lt;- '2006-01-01'
type.statements &lt;- 'individual'

df.reports &lt;- gitrd.GetITRData(name.companies = my.companies, 
                                  first.date = first.date,
                                  last.date = last.date,
                                  type.info = type.statements)

## 
## Reading info file from github
## Found 24012 lines for 603 companies  [Actives =  457  Inactives =  146 ]
## Last file update:  2017-09-19
## 
## Downloading data for 5 companies
## Type of financial statements: individual individual  individual  individual  individual
## First Date: 2005-01-01
## Laste Date: 2006-01-01
## Inflation index: none
## 
## Downloading none data using BETS Done
## 
## 
## WARNING: Cant find available dates for BV LEASING
## WARNING: For quarters before 2009, the cash flow statements are not available
## 
## Starting processing stage:
## BANESTES S/A
##  Available quarters: 2005-09-30  2005-06-30  2005-03-31
## CIA. IGUAÇU DE CAFÉ SOLÚVEL
##  Available quarters: 2005-09-30  2005-06-30  2005-03-31
## MUNDIAL
##  Available quarters: 2005-09-30  2005-06-30  2005-03-31
## TELEMAR PARTICIPAÇÔES S.A
##  Available quarters: 2005-09-30  2005-06-30  2005-03-31
## 
## 
## Processing BANESTES S/A, Quarter = 2005-09-30    Downloading | Reading file
## Processing BANESTES S/A, Quarter = 2005-06-30    Downloading | Reading file
## Processing BANESTES S/A, Quarter = 2005-03-31    Downloading | Reading file

## Warning in max.default(structure(numeric(0), class = &quot;Date&quot;), na.rm =
## FALSE): no non-missing arguments to max; returning -Inf

## 
## Processing CIA. IGUAÇU DE CAFÉ SOLÚVEL, Quarter = 2005-09-30 Downloading | Reading file
## Processing CIA. IGUAÇU DE CAFÉ SOLÚVEL, Quarter = 2005-06-30 Downloading | Reading file
## Processing CIA. IGUAÇU DE CAFÉ SOLÚVEL, Quarter = 2005-03-31 Downloading | Reading file

## Warning in max.default(structure(numeric(0), class = &quot;Date&quot;), na.rm =
## FALSE): no non-missing arguments to max; returning -Inf

## 
## Processing MUNDIAL, Quarter = 2005-09-30 Downloading | Reading file
## Processing MUNDIAL, Quarter = 2005-06-30 Downloading | Reading file
## Processing MUNDIAL, Quarter = 2005-03-31 Downloading | Reading file

## Warning in max.default(structure(numeric(0), class = &quot;Date&quot;), na.rm =
## FALSE): no non-missing arguments to max; returning -Inf

## 
## Processing TELEMAR PARTICIPAÇÔES S.A, Quarter = 2005-09-30   Downloading | Reading file
## Processing TELEMAR PARTICIPAÇÔES S.A, Quarter = 2005-06-30   Downloading | Reading file
## Processing TELEMAR PARTICIPAÇÔES S.A, Quarter = 2005-03-31   Downloading | Reading file

## Warning in max.default(structure(numeric(0), class = &quot;Date&quot;), na.rm =
## FALSE): no non-missing arguments to max; returning -Inf
</code></pre>
</div>
<p>And now we can check the resulting <code>tibble</code>:</p>
<div>
<pre><code>head(df.reports )

## # A tibble: 4 x 10
##                  company.name company.code  type.info   min.date
##                         </code></pre></div>