These functions return metadata associate with a point location.
get_state(location, group) get_province(location, group) get_country(location, group) get_coords(location, group, keep_cols = FALSE)
location | character, a name of a location in the |
---|---|
group | character, the region group/set the location belongs to.
If supplied, the |
keep_cols | logical, keep all columns with |
a character string, or a data frame for get_coords
.
get_state
returns the state, province or territory of a point location.
get_country
returns the name of the country (US or Canada).
get_coords
returns the longitutde and latitude of a point location as a data frame.
x <- "Calgary" get_state(x)#> [1] "Alberta"get_country(x)#> [1] "Canada"get_coords(x)#> # A tibble: 1 x 2 #> lon lat #> <dbl> <dbl> #> 1 -114. 51.0