metadata: Get point location metadata.

Description Usage Arguments Details Value Examples

Description

These functions return metadata associate with a point location.

Usage

1
2
3
4
5
6
7
get_state(location, group)

get_province(location, group)

get_country(location, group)

get_coords(location, group, keep_cols = FALSE)

Arguments

location

character, a name of a location in the locs data frame. May be a vector.

group

character, the region group/set the location belongs to. If supplied, the locs data set is first filtered to group. May be a vector.

keep_cols

logical, keep all columns with get_coords. Defaults to FALSE, returning only the lon and lat columns.

Details

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.

Value

a character string, or a data frame for get_coords.

Examples

1
2
3
4
x <- "Calgary"
get_state(x)
get_country(x)
get_coords(x)

leonawicz/snaplocs documentation built on May 27, 2019, 11:59 a.m.