Package: tesouror 0.3.0

Andre Leite

tesouror: Access Brazilian National Treasury Open Data APIs

Provides a unified interface to access open data from the Brazilian National Treasury ('Tesouro Nacional') and related government APIs. Covers six data sources: 'SICONFI' <https://apidatalake.tesouro.gov.br/docs/siconfi/> for fiscal reports ('RREO', 'RGF', 'DCA', 'MSC') and entity information; 'CUSTOS' <https://apidatalake.tesouro.gov.br/docs/custos/> for federal government cost data; 'SADIPEM' <https://apidatalake.tesouro.gov.br/docs/sadipem/> for public debt and credit operations; 'Transferencias Constitucionais' <https://apiapex.tesouro.gov.br/aria/v1/transferencias_constitucionais/docs> for constitutional transfers to states and municipalities; 'SIORG' <https://estruturaorganizacional.dados.gov.br> for federal organizational structure; and 'SIOPE' ('FNDE'/'MEC') for education spending data. Features automatic pagination, in-memory caching, retry logic, and tidy output.

Authors:Andre Leite [aut, cre], Marcos Wasilew [aut], Hugo Vasconcelos [aut], Carlos Amorim [aut], Diogo Bezerra [aut], Tiago Pereira [aut], Fernando Barbalho [aut]

tesouror_0.3.0.tar.gz
tesouror_0.3.0.zip(r-4.7)tesouror_0.3.0.zip(r-4.6)tesouror_0.3.0.zip(r-4.5)
tesouror_0.3.0.tgz(r-4.6-any)tesouror_0.3.0.tgz(r-4.5-any)
tesouror_0.3.0.tar.gz(r-4.7-any)tesouror_0.3.0.tar.gz(r-4.6-any)
tesouror_0.3.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
tesouror/json (API)

# Install 'tesouror' in R:
install.packages('tesouror', repos = c('https://strategicprojects.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/strategicprojects/tesouror/issues

Pkgdown/docs site:https://strategicprojects.github.io

On CRAN:

Conda:

5.56 score 1 scripts 266 downloads 102 exports 31 dependencies

Last updated from:511c3b3641. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK145
source / vignettesOK197
linux-release-x86_64OK150
macos-release-arm64OK118
macos-oldrel-arm64OK105
windows-develOK95
windows-releaseOK101
windows-oldrelOK96
wasm-releaseOK132

Exports:get_anexosget_annexesget_annual_accountsget_annual_accounts_for_stateget_annual_accounts_municipalitiesget_annual_accounts_ufsget_budget_reportget_budget_report_for_stateget_budget_report_municipalitiesget_budget_report_ufsget_costs_active_staffget_costs_depreciationget_costs_otherget_costs_pensionersget_costs_retired_staffget_costs_transfersget_credit_exchange_rateget_credit_payment_scheduleget_credit_release_scheduleget_custos_demaisget_custos_depreciacaoget_custos_pensionistasget_custos_pessoal_ativoget_custos_pessoal_inativoget_custos_transferenciasget_dcaget_dca_for_stateget_dca_municipiosget_dca_ufsget_debt_capacityget_debt_payment_scheduleget_debt_requestsget_delivery_statusget_entesget_entitiesget_extratoget_fiscal_reportget_fiscal_report_for_stateget_fiscal_report_municipalitiesget_fiscal_report_ufsget_msc_budgetget_msc_controlget_msc_controleget_msc_equityget_msc_orcamentariaget_msc_patrimonialget_opc_cronograma_liberacoesget_opc_cronograma_pagamentosget_opc_taxa_cambioget_pvlget_pvl_statusget_pvl_tramitacaoget_res_cdpget_res_cronograma_pagamentosget_rgfget_rgf_for_stateget_rgf_municipiosget_rgf_ufsget_rreoget_rreo_for_stateget_rreo_municipiosget_rreo_ufsget_siope_compensationget_siope_dados_geraisget_siope_despesasget_siope_despesas_funcaoget_siope_expensesget_siope_expenses_by_functionget_siope_general_dataget_siope_indicadoresget_siope_indicatorsget_siope_info_complementaresget_siope_officialsget_siope_receitasget_siope_remuneracaoget_siope_responsaveisget_siope_revenuesget_siope_supplementaryget_siorg_estruturaget_siorg_organizationsget_siorg_orgaosget_siorg_structureget_siorg_unidadeget_siorg_unitget_tc_by_municipalityget_tc_by_municipality_detailget_tc_by_stateget_tc_by_state_detailget_tc_estadosget_tc_municipalitiesget_tc_municipiosget_tc_por_estadosget_tc_por_estados_detalheget_tc_por_municipioget_tc_por_municipio_detalheget_tc_statesget_tc_transfer_typesget_tc_transferenciasrreo_layoutrreo_normalize_columnstesouror_clear_cachetidy_rreo

Dependencies:askpassclicpp11curldplyrgenericsgluehmshttr2janitorlifecyclelubridatemagrittropensslpillarpkgconfigpurrrR6rappdirsrlangsnakecasestringistringrsystibbletidyrtidyselecttimechangeutf8vctrswithr

Getting started with tesouror
Overview | Installation | Quick examples | Caching | Bilingual interface | Debugging with verbose | Controlling page size | Column names | API Reference | SICONFI — Fiscal Reports | CUSTOS — Federal Government Costs | SADIPEM — Public Debt | Transferências Constitucionais | SIORG — Organizational Structure | SIOPE — Education Spending | Common features (all APIs)

Last update: 2026-06-25
Started: 2026-03-26

RREO longitudinal — handling layout drift across years
The problem: RREO labels drift across years | The bundled layout reference | Step 1 — Normalize column labels | Step 2 — Tidy by topic | Multi-regime in one call | Adding new topics | See also

Last update: 2026-06-25
Started: 2026-05-02

SICONFI API – Fiscal data
About | Available functions | Parameter mapping | Examples | Entity lookup | RREO – Budget Execution | RGF – Fiscal Management | DCA – Annual Accounts | MSC – Accounting Balances Matrix

Last update: 2026-06-25
Started: 2026-03-26

SIOPE API – Education spending data
About | Available functions | Required parameters | Period mapping | Performance tip: use filter to reduce downloads | Filtering by entity type (tipo / type) | Filtering by municipality | OData filter syntax | Selecting specific columns | Sorting results | Compensation data with filters | Examples | Quick test with max_rows | Combining states | How the OData URL works

Last update: 2026-06-25
Started: 2026-03-26

Transferências Constitucionais para Municípios de Pernambuco
Introdução | Pacotes | 1. Obtendo os dados | 2. Categorização das transferências | 3. Preparação dos dados geográficos | 4. Paleta e tema | 5. Composição e séries históricas | 5.1 Composição anual por categoria | 5.2 Séries mensais das principais categorias | 5.3 Top 10 municípios por volume absoluto | 6. Análise per capita | 6.1 Top 10 e Bottom 10 per capita | 6.2 Evolução per capita ao longo do tempo | 6.3 Mapas: absoluto vs per capita | 6.4 Mapa de referência: Regiões de Desenvolvimento | 7. Análise por Região de Desenvolvimento | 7.1 Série temporal por RD | 7.2 Composição por categoria dentro de cada RD | 7.3 Per capita por RD | 7.4 Evolução per capita por RD | 7.5 Mapa per capita por RD | 8. Mapas por categoria de transferência | Considerações finais | Próximos passos | Referências

Last update: 2026-05-04
Started: 2026-03-30

CUSTOS API – Federal government costs
About | Performance warning | Available functions | Parameter mapping | Examples | Response columns

Last update: 2026-05-02
Started: 2026-03-26

SADIPEM API – Public debt & credit operations
About | Available functions | Typical workflow | PVL processing status | Parameter mapping | get_pvl() / get_debt_requests() | Detail functions

Last update: 2026-03-26
Started: 2026-03-26

SIORG – Organizational Structure
Overview | Looking up organization codes | Step 1: List top-level organizations (N1) | Step 2: Browse sub-units (N2, N3) | Step 3: Use in CUSTOS queries | Step 4: Get details of a single unit | Functions | Parameter mapping | get_siorg_orgaos() / get_siorg_organizations() | get_siorg_estrutura() / get_siorg_structure() | SIORG codes in CUSTOS | Response columns

Last update: 2026-03-26
Started: 2026-03-26

Transferências Constitucionais API
About | Available functions | Examples | Step 1: Lookup codes | State-level transfers | Municipality-level transfers | Parameter mapping

Last update: 2026-03-26
Started: 2026-03-26

Readme and manuals

Help Manual

Help pageTopics
Get report appendix reference tableget_anexos get_annexes
Get other cost dataget_costs_other get_custos_demais
Get depreciation cost dataget_costs_depreciation get_custos_depreciacao
Get pensioner cost dataget_costs_pensioners get_custos_pensionistas
Get active staff cost dataget_costs_active_staff get_custos_pessoal_ativo
Get retired staff cost dataget_costs_retired_staff get_custos_pessoal_inativo
Get transfer cost dataget_costs_transfers get_custos_transferencias
Get DCA data for all municipalities of a Brazilian stateget_annual_accounts_municipalities get_dca_municipios
Get annual accounts data (DCA) for a single entityget_annual_accounts_ufs get_dca_ufs
Get list of Brazilian government entitiesget_entes get_entities
Get delivery status extractget_delivery_status get_extrato
Get MSC control accounts dataget_msc_control get_msc_controle
Get MSC budgetary accounts dataget_msc_budget get_msc_orcamentaria
Get MSC equity/asset accounts dataget_msc_equity get_msc_patrimonial
Get credit operation release scheduleget_credit_release_schedule get_opc_cronograma_liberacoes
Get credit operation payment scheduleget_credit_payment_schedule get_opc_cronograma_pagamentos
Get credit operation exchange rate dataget_credit_exchange_rate get_opc_taxa_cambio
Get public debt verification requests (PVL)get_debt_requests get_pvl
Get PVL processing status (approved non-credit operations)get_pvl_status get_pvl_tramitacao
Get debt capacity result (CDP)get_debt_capacity get_res_cdp
Get debt payment schedule resultget_debt_payment_schedule get_res_cronograma_pagamentos
Get RGF data for all municipalities of a Brazilian stateget_fiscal_report_municipalities get_rgf_municipios
Get Fiscal Management Report data (RGF) for a single entityget_fiscal_report_ufs get_rgf_ufs
Get RREO data for all municipalities of a Brazilian stateget_budget_report_municipalities get_rreo_municipios
Get Budget Execution Summary Report data (RREO) for a single entityget_budget_report_ufs get_rreo_ufs
Get SIOPE general dataget_siope_dados_gerais get_siope_general_data
Get SIOPE education expenses dataget_siope_despesas get_siope_expenses
Get SIOPE expenses by education functionget_siope_despesas_funcao get_siope_expenses_by_function
Get SIOPE education indicatorsget_siope_indicadores get_siope_indicators
Get SIOPE supplementary informationget_siope_info_complementares get_siope_supplementary
Get SIOPE education revenue dataget_siope_receitas get_siope_revenues
Get SIOPE staff compensation dataget_siope_compensation get_siope_remuneracao
Get SIOPE officials/responsible persons dataget_siope_officials get_siope_responsaveis
Get organizational structure from SIORGget_siorg_estrutura get_siorg_structure
Get federal organizations from SIORGget_siorg_organizations get_siorg_orgaos
Get details of a single SIORG unitget_siorg_unidade get_siorg_unit
Get state dictionaryget_tc_estados get_tc_states
Get municipality dictionaryget_tc_municipalities get_tc_municipios
Get constitutional transfers by stateget_tc_by_state get_tc_por_estados
Get detailed constitutional transfers by stateget_tc_by_state_detail get_tc_por_estados_detalhe
Get constitutional transfers by municipalityget_tc_by_municipality get_tc_por_municipio
Get detailed constitutional transfers by municipalityget_tc_by_municipality_detail get_tc_por_municipio_detalhe
Get transfer type dictionaryget_tc_transferencias get_tc_transfer_types
Return the bundled RREO layout reference tablerreo_layout
Normalize the 'coluna' field of a RREO tibble across yearsrreo_normalize_columns
Clear the tesouror in-memory cachetesouror_clear_cache
Tidy a RREO tibble by topic, reconciling layout drift across yearstidy_rreo