| get_custos_pessoal_ativo | R Documentation |
Retrieves cost data for active federal government staff. All parameters are optional filters.
get_custos_pessoal_ativo(
ano = NULL,
mes = NULL,
natureza_juridica = NULL,
organizacao_n1 = NULL,
organizacao_n2 = NULL,
organizacao_n3 = NULL,
use_cache = TRUE,
verbose = FALSE,
page_size = 500L,
max_rows = Inf
)
get_costs_active_staff(year = NULL, month = NULL,
legal_nature = NULL, org_level1 = NULL, org_level2 = NULL,
org_level3 = NULL, use_cache = TRUE, verbose = FALSE,
page_size = 500, max_rows = Inf)
ano |
Integer. Year of the record. Optional. |
mes |
Integer. Month of the record (1-12). Optional. |
natureza_juridica |
Integer. Legal nature of the organization:
|
organizacao_n1 |
Character or integer. SIORG code for the top-level
organization (Ministry level). Use |
organizacao_n2 |
Character or integer. SIORG code for the
second-level organization. Use |
organizacao_n3 |
Character or integer. SIORG code for the
third-level organization. Use |
use_cache |
Logical. If |
verbose |
Logical. If |
page_size |
Integer. Number of rows per API page. Defaults to
|
max_rows |
Numeric. Maximum number of rows to return. Defaults
to |
year |
Integer. Year of the record. Optional. Maps to |
month |
Integer. Month of the record (1-12). Optional. Maps to
|
legal_nature |
Integer. Legal nature of the organization:
|
org_level1 |
Character or integer. SIORG code for the top-level
organization (Ministry level). Use |
org_level2 |
Character or integer. SIORG code (second level).
Use |
org_level3 |
Character or integer. SIORG code (third level).
Use |
Performance: The CUSTOS API is slow and unfiltered queries return
hundreds of thousands of rows. Always filter by organization level
(organizacao_n1 + organizacao_n2) and/or mes to get manageable
results. Use max_rows for quick tests.
get_costs_active_staff() is an English alias.
A tibble with active staff cost data.
Other CUSTOS:
get_custos_demais(),
get_custos_depreciacao(),
get_custos_pensionistas(),
get_custos_pessoal_inativo(),
get_custos_transferencias()
## Not run:
# WARNING: unfiltered queries return hundreds of thousands of rows
# and are very slow. Always filter by organization level and/or
# natureza_juridica + mes.
# Quick test: limit rows
ativos <- get_custos_pessoal_ativo(ano = 2023, mes = 6, max_rows = 100)
# Filter by ministry (N1) + entity (N2) for manageable results
# Use get_siorg_orgaos() to find SIORG codes
ativos_inep <- get_custos_pessoal_ativo(
ano = 2023,
organizacao_n1 = 244, # MEC (auto-padded to "000244")
organizacao_n2 = 249 # INEP (auto-padded to "000249")
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.