Skip to contents

[Stable]

get_brazil_state() returns a vector with the names of Brazilian states.

Usage

get_brazil_state(x = NULL)

Arguments

x

(Optional) A character vector with the names of Brazilian federal units or regions. If NULL, returns all state names (Default: NULL).

Value

A character vector with the names of Brazilian states.

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

Examples

get_brazil_state()
#>  [1] "Acre"                "Alagoas"             "Amapá"              
#>  [4] "Amazonas"            "Bahia"               "Ceará"              
#>  [7] "Distrito Federal"    "Espírito Santo"      "Goiás"              
#> [10] "Maranhão"            "Mato Grosso"         "Mato Grosso do Sul" 
#> [13] "Minas Gerais"        "Pará"                "Paraíba"            
#> [16] "Paraná"              "Pernambuco"          "Piauí"              
#> [19] "Rio de Janeiro"      "Rio Grande do Norte" "Rio Grande do Sul"  
#> [22] "Rondônia"            "Roraima"             "Santa Catarina"     
#> [25] "São Paulo"           "Sergipe"             "Tocantins"          

get_brazil_state("rj")
#> [1] "Rio de Janeiro"
#> [1] "Rio de Janeiro" # Expected

get_brazil_state("southeast")
#> [1] "Espírito Santo" "Minas Gerais"   "Rio de Janeiro" "São Paulo"     
#> [1] "Espírito Santo" "Minas Gerais"   "Rio de Janeiro"
#> [4] "São Paulo"