get_brazil_state_longitude() returns a vector with the longitude of
Brazilian state capitals.
Arguments
- x
(optional) An
atomicvector containing the names of Brazilian states or federal units. Municipality and state codes are also supported. IfNULL, returns a vector with all state longitudes (default:NULL).
Value
A character vector with the longitude of
Brazilian state capitals.
Details
The data from this function is based on Google's Geocoding API gathered via
the tidygeocoder R package.
See also
Other Brazil functions:
get_brazil_fu(),
get_brazil_municipality(),
get_brazil_municipality_code(),
get_brazil_municipality_coords(),
get_brazil_municipality_latitude(),
get_brazil_municipality_longitude(),
get_brazil_region(),
get_brazil_region_code(),
get_brazil_state(),
get_brazil_state_by_utc(),
get_brazil_state_capital(),
get_brazil_state_code(),
get_brazil_state_latitude(),
render_brazil_address()
Examples
get_brazil_state_longitude()
#> Acre Alagoas Amapá Amazonas
#> -67.82208 -35.73393 -51.05696 -59.98250
#> Bahia Ceará Distrito Federal Espírito Santo
#> -38.48128 -38.52180 -47.88232 -40.33767
#> Goiás Maranhão Mato Grosso Mato Grosso do Sul
#> -49.25327 -44.29639 -56.09913 -54.61629
#> Minas Gerais Pará Paraíba Paraná
#> -43.94509 -48.46825 -34.88203 -49.27127
#> Pernambuco Piauí Rio de Janeiro Rio Grande do Norte
#> -34.88482 -42.80496 -43.20937 -35.20809
#> Rio Grande do Sul Rondônia Roraima Santa Catarina
#> -51.23038 -63.87354 -60.67196 -48.54961
#> São Paulo Sergipe Tocantins
#> -46.63338 -37.07747 -48.33364
get_brazil_state_longitude("sp")
#> [1] -46.63338
#> [1] -46.63338 # Expected
get_brazil_state_longitude("sao paulo")
#> [1] -46.63338
#> [1] -46.63338 # Expected
get_brazil_state_longitude(35) # State of São Paulo
#> [1] -46.63338
#> [1] -46.63338 # Expected
get_brazil_state_longitude(3550308) # Municipality of São Paulo
#> [1] -46.63338
#> [1] -46.63338 # Expected
get_brazil_state_longitude(35503081) # >7 digits
#> [1] NA
#> [1] NA # Expected
get_brazil_state_longitude(3912345) # Non-existent state code
#> [1] NA
#> [1] NA # Expected
