potr_download_last: Download the last files of the 'Portal da Transparencia'

Description Usage Arguments Details Examples


This function can be used to download the latest data set from the 'Transparency Portal' of Brazil - http://www.portaltransparencia.gov.br.


potr_download_last(opendata, destfile, filename, numref_ignore,
  download.file.mode, ...)



A character or numeric that indicates a dataset selected for download. See valid options in 'Details'.


A character string with the name where the downloaded file is saved. If missing, the file will be saved to the current directory.


File name to dataset. By default, the file name is the title of 'opendata' with the 'reference' and '.zip' extension.


Intenger or numeric. Number of references that will not be considered from the last file that will be downloaded.


The mode with which to write the file. If download.file.mode is not found and the operating system is windows, it will use the "wb".


Others arguments of the download.file function.


The function downloads files available in the repository of transparency portal - website of the federal government of Brazil on public transparency, with budgetary data and government management. The data disclosed in the Portal come from various sources of government information. See http://www.portaltransparencia.gov.br/.

The function arguments are specifications about the data set to be downloaded. 'opendata' is related to the content of the data, 'destfile' to the location to be saved and 'filename' is the name of the file to be saved. Other '...' arguments are related to the download.file function of the 'utils' package.

It is suggested that the values for '...' be reported only if the default setting does not work. See download.file for more information about these arguments and proxy settings.

Valid options for 'opendata' argument:

id description opendata
1 Bolsa familia pagamentos bolsa-familia-pagamentos
2 Bolsa familia saques bolsa-familia-saques
3 Erradicacao do trabalho infantil PETI peti
4 Garantia safra garantia-safra
5 Seguro defeso pescador artesanal seguro-defeso
6 Cartao pagamento compras centralizadas cpcc
7 Cartao pagamento da defesa civil CPDC cpdc
8 Cartao pagamento governo federal CPGF cpgf
9 Convenios convenios
10 Documentos empenho, liquidacao e pagamento despesas
11 Execucao da despesa despesas-execucao
12 Recursos transferidos transferencias
13 Imoveis funcionais imoveis-funcionais_md
14 Imoveis funcionais imoveis-funcionais_mre
15 Imoveis funcionais imoveis-funcionais_pr
16 Imoveis funcionais imoveis-funcionais_spu
17 Contratacoes compras
18 Licitacoes licitacoes
19 Orcamento da despesa orcamento-despesa
20 Execucao da receita receitas
21 Empresas inidoneas e suspensas ceis
22 Empresas punidas cnep
23 Entidades sem fins lucrativos impedidas cepim
24 Cadastro de expulsoes da administracao federal CEAF ceaf
25 Dirigentes de empresas dirigentes
26 Servidores civis do executivo federal servidores_civis
27 Servidores militares do executivo federal servidores_militares
28 Viagens a servico viagens


potr_download_last(opendata = 19)
potr_download_last(opendata = 19, destfile = "~/")
potr_download_last(opendata = 19, destfile = "~/", filename = "orcamento")
potr_download_last(opendata = "19")
potr_download_last(opendata = "19", destfile = "~/")
potr_download_last(opendata = "19", destfile = "~/", filename = "orcamento")
potr_download_last(opendata = "orcamento-despesa")
potr_download_last(opendata = "orcamento-despesa", destfile = "~/")
potr_download_last(opendata = "orcamento-despesa", destfile = "~/", filename = "orcamento")
potr_download_last(opendata = "orcamento-despesa", destfile = "~/", numref_ignore = 1)

pompylio/portransp documentation built on Aug. 2, 2019, 8:42 a.m.