Geocodes addresses using the HERE 'Geocoding & Search API' API.
geocode(address, alternatives = FALSE, sf = TRUE, url_only = FALSE)
character, addresses to geocode.
boolean, return also alternative results (
boolean, return an
boolean, only return the generated URLs (
sf = TRUE, an
sf object, containing the position coordinates
geocoded addresses as geometry list column and the access coordinates as
well-known text (WKT).
sf = FALSE, a
data.frame containing the coordinates of the
geocoded addresses as
According to the Geocoding and Search API Reference, the access coordinates are "[c]oordinates of the place you are navigating to (for example, driving or walking). This is a point on a road or in a parking lot." The position coordinates are "[t]he coordinates (latitude, longitude) of a pin on a map corresponding to the searched place."
# Provide an API Key for a HERE project set_key("<YOUR API KEY>") locs <- geocode(address = poi$city, url_only = TRUE)