Description Usage Arguments Details Examples
View source: R/potr_download.R
This function can be used to download a dataset from the 'Portal da Transparencia' of Brazil - http://www.portaltransparencia.gov.br.
1 | potr_download(opendata, reference, destfile, filename, ...)
|
opendata |
A character or numeric that indicates a dataset selected for download. See valid options in 'Details'. |
reference |
A character string or numeric input thats indicates a date reference to download. Valid date which may be 'yyyy' for year, 'mm' for month, 'dd' day or the join of these (yyyymm, yyyymmdd). See valid options in 'Details'. |
destfile |
A character string with the name where the downloaded file is saved. If missing, the file will be saved to the current directory. |
filename |
File name to dataset. By default, the file name is the title of 'opendata' with the 'reference' and '.zip' extension. |
... |
Others arguments of the |
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, 'reference' to the date of availability of the file in the portal, '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' and 'reference' arguments:
#' 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 |
1 2 3 4 5 6 7 8 9 | potr_download(opendata = 22, reference = 2021)
potr_download(opendata = 22, reference = 2021, destfile = "~/")
potr_download(opendata = 22, reference = 2021, destfile = "~/", filename = "compras")
potr_download(opendata = "22", reference = "2021")
potr_download(opendata = "22", reference = "2021", destfile = "~/")
potr_download(opendata = "22", reference = "2021", destfile = "~/", filename = "compras")
potr_download(opendata = "compras", reference = "2021")
potr_download(opendata = "compras", reference = 2021, destfile = "~/")
potr_download(opendata = "compras", reference = 2021, destfile = "~/", filename = "compras")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.