View source: R/transferencias.R
| get_tc_municipios | R Documentation |
Retrieves the dictionary of municipalities and their numeric codes.
Use these codes in the p_municipio / municipality parameter of
other functions.
get_tc_municipios(
p_nome = NULL,
p_uf = NULL,
use_cache = TRUE,
verbose = FALSE
)
get_tc_municipalities(name = NULL, state_code = NULL,
use_cache = TRUE, verbose = FALSE)
p_nome |
Character. Partial municipality name for searching (e.g.,
|
p_uf |
Numeric or character. State code from |
use_cache |
Logical. If |
verbose |
Logical. If |
name |
Character. Partial municipality name for searching (e.g.,
|
state_code |
Numeric or character. State code from
|
These are internal Treasury codes, not IBGE codes.
Filter by state using the numeric code from get_tc_estados().
get_tc_municipalities() is an English alias.
A tibble with municipality data including
codigo, codigo_uf, and nome.
Other Transferencias:
get_tc_estados(),
get_tc_por_estados(),
get_tc_por_estados_detalhe(),
get_tc_por_municipio(),
get_tc_por_municipio_detalhe(),
get_tc_transferencias()
Other Transferencias dictionaries:
get_tc_estados(),
get_tc_transferencias()
## Not run:
# Step 1: find the state code (Treasury code, NOT IBGE)
estados <- get_tc_estados()
pe_code <- estados$codigo[estados$nome == "Pernambuco"]
# Step 2: list municipalities for that state
municipios <- get_tc_municipios(p_uf = pe_code)
# Or search by partial name
recife <- get_tc_municipios(p_nome = "Recife")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.