Retrieves budgetary accounts data (classes 5 and 6) from the Accounting Balances Matrix (MSC).
Usage
get_msc_orcamentaria(
id_ente,
an_referencia,
me_referencia,
co_tipo_matriz,
classe_conta,
id_tv,
use_cache = TRUE,
verbose = FALSE,
page_size = NULL,
max_rows = Inf
)
get_msc_budget(entity_id, year, month, matrix_type, account_class,
value_type, use_cache = TRUE, verbose = FALSE,
page_size = NULL, max_rows = Inf)Arguments
- id_ente
Integer. IBGE code of the entity. Required.
- an_referencia
Integer. Reference year. Required.
- me_referencia
Integer. Reference month (1-12). Required.
- co_tipo_matriz
Character. Matrix type:
"MSCC"(monthly aggregate) or"MSCE"(annual closing). Required.- classe_conta
Integer. Account class:
5or6. Required.- id_tv
Character. Value type:
"beginning_balance","ending_balance", or"period_change". Required.- use_cache
Logical. If
TRUE(default), uses an in-memory cache.- verbose
Logical. If
TRUE, prints the full API URL being called. Useful for debugging or testing in a browser. Defaults togetOption("tesouror.verbose", FALSE).- page_size
Integer or
NULL. Number of rows per API page. IfNULL(default), uses the API server default (5000 for SICONFI/SADIPEM).- max_rows
Numeric. Maximum number of rows to return. Defaults to
Inf(all rows). Useful for quick tests with large datasets (e.g.,max_rows = 100).- entity_id
Integer. IBGE code of the entity. Required. Maps to
id_ente.- year
Integer. Reference year. Required. Maps to
an_referencia.- month
Integer. Reference month (1-12). Required. Maps to
me_referencia.- matrix_type
Character. Matrix type:
"MSCC"(monthly aggregate) or"MSCE"(annual closing). Required. Maps toco_tipo_matriz.- account_class
Integer. Account class:
5or6. Required. Maps toclasse_conta.- value_type
Character. Value type:
"beginning_balance","ending_balance", or"period_change". Required. Maps toid_tv.
Value
A tibble with MSC budgetary account data.
See also
Other SICONFI:
get_anexos(),
get_dca(),
get_entes(),
get_extrato(),
get_msc_controle(),
get_msc_patrimonial(),
get_rgf(),
get_rreo()