| normalizar_codigo_ibge | R Documentation |
Validates current territorial identifiers against the bundled IBGE reference. Municipality inputs may use the full seven-digit IBGE code or the six-digit form commonly returned by DATASUS. State and region inputs may also use abbreviations or full names.
normalizar_codigo_ibge(
codigo,
nivel = c("municipio", "uf", "regiao"),
formato = NULL,
desconhecido = c("erro", "na", "manter")
)
codigo |
Vector of territorial identifiers. |
nivel |
Territorial level: '"municipio"', '"uf"' or '"regiao"'. |
formato |
Output format. Municipalities support '"ibge"' (seven digits) and '"datasus"' (six digits). States and regions additionally support '"sigla"' and '"nome"'. |
desconhecido |
How to handle unknown values: '"erro"', '"na"' or '"manter"'. |
A character vector with the same length as 'codigo'.
normalizar_codigo_ibge(c("500270", "5003702"))
normalizar_codigo_ibge(c("MS", "Mato Grosso do Sul"), "uf", "ibge")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.