get_brazil_region_code()
returns a vector with the Brazilian Institute
of Geography and Statistics (IBGE) codes for
Brazilian regions.
Arguments
- x
(optional) A
character
vector containing the names of Brazilian regions, states, or federal units. IfNULL
, returns a named vector with all Brazilian region codes (default:NULL
).
Value
An integer
vector with the IBGE codes of
Brazilian regions.
Details
The data from this function is based on data from the Brazilian Institute of Geography and Statistics (IBGE, n.d.).
References
Instituto Brasileiro de Geografia e Estatística. (n.d.). Território [Territory] [Dataset]. SIDRA. https://sidra.ibge.gov.br/territorio
See also
Other Brazil functions:
get_brazil_fu()
,
get_brazil_municipality()
,
get_brazil_municipality_code()
,
get_brazil_region()
,
get_brazil_state()
,
get_brazil_state_by_utc()
,
get_brazil_state_capital()
,
get_brazil_state_code()
,
get_brazil_state_latitude()
,
get_brazil_state_longitude()
,
render_brazil_address()
Examples
get_brazil_region_code()
#> North Northeast Southeast South Central-West
#> 1 2 3 4 5
get_brazil_region_code("north")
#> [1] 1
#> [1] 1 # Expected
get_brazil_region_code(c("north", "central-west"))
#> [1] 1 5
#> [1] 1 5 # Expected
get_brazil_region_code("sao paulo")
#> [1] 3
#> [1] 3 # Expected
get_brazil_region_code("sp")
#> [1] 3
#> [1] 3 # Expected