| get_siorg_orgaos | R Documentation |
Retrieves the list of federal government organizations (organs and
entities) from the SIORG system. Use the returned SIORG codes as
organizacao_n1 / org_level1 in CUSTOS API functions like
get_custos_pessoal_ativo().
get_siorg_orgaos(
codigo_poder = NULL,
codigo_esfera = NULL,
use_cache = TRUE,
verbose = FALSE
)
get_siorg_organizations(power_code = NULL, sphere_code = NULL,
use_cache = TRUE, verbose = FALSE)
codigo_poder |
Integer. Power branch code: |
codigo_esfera |
Integer. Government sphere: |
use_cache |
Logical. If |
verbose |
Logical. If |
power_code |
Integer. Power branch: |
sphere_code |
Integer. Sphere: |
get_siorg_organizations() is an English alias.
A tibble with columns including
codigo_unidade (SIORG code — use as organizacao_n1 in CUSTOS),
codigo_unidade_pai (parent code — for navigating hierarchy),
nome, sigla, codigo_tipo_unidade ("orgao" or "entidade"),
codigo_natureza_juridica, codigo_esfera, codigo_poder.
Other SIORG:
get_siorg_estrutura(),
get_siorg_unidade()
## Not run:
# List all federal executive branch organizations
orgaos <- get_siorg_orgaos(codigo_poder = 1, codigo_esfera = 1)
# Find a specific ministry by name
mec <- orgaos[grepl("Educação", orgaos$nome), ]
mec_code <- mec$codigo_unidade[mec$sigla == "MEC"]
# Use that code in CUSTOS queries (auto-padded to "000244")
custos <- get_custos_pessoal_ativo(
ano = 2023, organizacao_n1 = mec_code
)
# Browse children: units whose parent is MEC
mec_filhos <- orgaos[orgaos$codigo_unidade_pai == mec_code, ]
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.