Geocodes addresses using the HERE 'Geocoder' API.

geocode(address, sf = TRUE, url_only = FALSE, addresses)

Arguments

address

character, addresses to geocode.

sf

boolean, return an sf object (default = TRUE) or a data.frame?

url_only

boolean, only return the generated URLs (default = FALSE)?

addresses

character, addresses to geocode (deprecated).

Value

If sf = TRUE, an sf object, containing the position coordinates geocoded addresses as geometry list column and the access coordinates as well-known text (WKT). If sf = FALSE, a data.frame containing the coordinates of the geocoded addresses as lng, lat columns.

References

HERE Geocoder API: Geocode

Examples

# Provide an API Key for a HERE project set_key("<YOUR API KEY>") locs <- geocode(address = poi$city, url_only = TRUE)