potr_download_all: Download files of the 'Portal da Transparencia'

Description Usage Arguments Details Examples

View source: R/potr_download_all.R


This function can be used to download all the files from a data set of the 'Portal da Transparencia' of Brazil - http://www.portaltransparencia.gov.br.


potr_download_all(opendata, destfile, filename, limited_to, ...)



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.


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 formatdate
1 Auxilio Emergencial auxilio-emergencial yyyymm
2 Bolsa familia pagamentos bolsa-familia-pagamentos yyyymm
3 Bolsa familia saques bolsa-familia-saques yyyymm
4 Benefício de Prestação Continuada bpc yyyymm
5 Garantia safra garantia-safra yyyymm
6 Erradicacao do trabalho infantil PETI peti yyyymm
7 Seguro defeso pescador artesanal seguro-defeso yyyymm
8 Cartao pagamento compras centralizadas cpcc yyyymm
9 Cartao pagamento da defesa civil CPDC cpdc yyyymm
10 Cartao pagamento governo federal CPGF cpgf yyyymm
11 Favorecidos PJ favorecidos-pj yyyymm
12 Convenios convenios yyyymmdd
13 Documentos empenho, liquidacao e pagamento despesas yyyymmdd
14 Execucao da despesa despesas-execucao yyyymm
15 Recursos transferidos transferencias yyyymm
16 Recebimento de recursos por favorecido despesas-favorecidos yyyymm
17 Emendas parlamentares emendas-parlamentares UNICO
18 Imoveis funcionais imoveis-funcionais-md yyyymmdd
19 Imoveis funcionais imoveis-funcionais-mre yyyymmdd
20 Imoveis funcionais imoveis-funcionais-pr yyyymmdd
21 Imoveis funcionais imoveis-funcionais-spu yyyymmdd
22 Contratacoes compras yyyymm
23 Licitacoes licitacoes yyyymm
24 Orcamento da despesa orcamento-despesa yyyy
25 Execucao da receita receitas yyyy
26 Empresas inidoneas e suspensas ceis yyyymmdd
27 Entidades sem fins lucrativos impedidas cepim yyyymmdd
28 Empresas punidas cnep yyyymmdd
29 Acordos de Leniencia acordos-leniencia yyyymmdd
30 Servidores militares ate 2019 servidores-militares yyyymm
31 Servidores civis ate 2019 servidores-civis yyyymm
32 Cadastro de expulsoes da administracao federal CEAF ceaf yyyymmdd
33 Pessoas expostas politicamente pep yyyymm
34 Viagens a servico viagens yyyy


potr_download_all(opendata = 22, reference = 2021)
potr_download_all(opendata = 22, reference = 2021, destfile = "~/")
potr_download_all(opendata = 22, reference = 2021, destfile = "~/", filename = "compras")
potr_download_all(opendata = "22", reference = "2021")
potr_download_all(opendata = "22", reference = "2021", destfile = "~/")
potr_download_all(opendata = "22", reference = "2021", destfile = "~/", filename = "compras")
potr_download_all(opendata = "compras", reference = "2021")
potr_download_all(opendata = "compras", reference = 2021, destfile = "~/")
potr_download_all(opendata = "compras", reference = 2021, destfile = "~/", filename = "compras")

pompylio/portransp documentation built on Aug. 30, 2021, 1:23 p.m.