Fetches RREO data for every municipality of state_uf, looping over
get_rreo() with fault tolerance: if an individual municipality call fails
after all retries, the failure is recorded and the loop continues. Failed
calls are returned in attr(result, "failed").
get_rreo_for_state(
state_uf,
an_exercicio,
nr_periodo,
co_tipo_demonstrativo,
no_anexo,
include_capital = TRUE,
on_error = c("warn", "stop", "silent"),
use_cache = TRUE,
verbose = FALSE,
page_size = NULL,
max_rows = Inf
)get_budget_report_for_state(state_uf, fiscal_year, period,
report_type, appendix, include_capital = TRUE,
on_error = c("warn", "stop", "silent"),
use_cache = TRUE, verbose = FALSE,
page_size = NULL, max_rows = Inf)
A tibble with RREO rows for all successful
municipalities. If any call failed, has an attribute "failed" (tibble
with iteration, id, error).
Character. Two-letter UF code (e.g., "PE", "ES").
Required.
Integer. Fiscal year. Required.
Integer. Bimester (1-6). Required.
Character. "RREO" or "RREO Simplificado".
Required.
Character. Appendix name (e.g., "RREO-Anexo 01").
Required.
Logical. Include the state capital? Defaults to TRUE.
Character. One of "warn" (default — log and continue),
"stop" (abort on first failure), or "silent" (record but no message).
Logical. If TRUE (default), uses the in-memory cache.
Logical. If TRUE, prints the full API URL for each call.
Integer or NULL. Rows per API page.
Numeric. Maximum rows per municipality call.
Integer. Fiscal year. Required. Maps to
an_exercicio.
Integer. Bimester (1-6). Required. Maps to nr_periodo.
Character. "RREO" or "RREO Simplificado".
Required. Maps to co_tipo_demonstrativo.
Character. Appendix name. Required. Maps to no_anexo.
This is the recommended way to assemble a state-wide panel: it handles pagination per municipality, uses the cache, and surfaces partial failures instead of aborting on the first error (see SICONFI behaviour for entities that have not yet homologated a given report).
get_budget_report_for_state() is an English-parameter alias.
Other SICONFI:
get_anexos(),
get_dca(),
get_dca_for_state(),
get_entes(),
get_extrato(),
get_msc_controle(),
get_msc_orcamentaria(),
get_msc_patrimonial(),
get_rgf(),
get_rgf_for_state(),
get_rreo()
if (FALSE) {
rreo_es <- get_rreo_for_state(
state_uf = "ES", an_exercicio = 2021, nr_periodo = 6,
co_tipo_demonstrativo = "RREO", no_anexo = "RREO-Anexo 01"
)
attr(rreo_es, "failed")
}
Run the code above in your browser using DataLab