Learn R Programming

⚠️There's a newer version (1.1.0) of this package.Take me there.

hereR

R interface to the HERE REST APIs: (1) geocode and autocomplete addresses or reverse geocode POIs using the Geocoder API; (2) routing directions, travel distance or time matrices and isolines using the Routing API; (3) real-time traffic flow and incident information from the Traffic API; (4) weather forecasts, reports on current weather conditions and astronomical information at a specific location from the Destination Weather API.

Locations, routes and isolines are returned as sf objects and tables as data.table objects.

Installation

You can install the released version of hereR from CRAN with:

install.packages("hereR")

... or install the development version from GitHub with:

devtools::install_github("munterfinger/hereR")

Application credentials

In order to use the functionality of the hereR package, application credentials (APP ID and APP CODE) for a HERE project of type REST & XYZ HUB API/CLI have to be provided. These credentials will be set for the current R session and will be used to authenticate in the reqeusts to the HERE REST APIs. To set the credentials, please use:

library(hereR)

set_auth(
  app_id = "<YOUR APP ID>",
  app_code = "<YOUR APP CODE>"
)

No login yet? Get your free login here: developer.here.com

Examples

  • Geocode addresses:locs <- geocode(addresses = c("Schweighofstrasse 190, Zürich, Schweiz", "Hardstrasse 48, Zürich, Schweiz"))
  • Autocomplete addresses:suggestions <- autocomplete(addresses = c("Schweighofstrasse", "Hardstrasse"))
  • Reverse geocode POIs:addresses <- reverse_geocode(poi = locs)
  • Construct a route between points:routes <- route(start = locs_start, destination = locs_dest, mode = "car")
  • Create a route matrix between points:route_matrix <- route_matrix(start = locs, mode = "car")
  • Request weather observations at specific locations:observations <- weather(poi = locs, product = "observation")
  • Request weather forecast at specific locations:forecast <- weather(poi = locs, product = "forecast_hourly")
  • Request astronomical information at specific locations:astronomy <- weather(poi = locs, product = "forecast_astronomy")
  • Request weather alerts at specific locations:alerts <- weather(poi = locs, product = "alerts")
  • Get real-time traffic flow in a specific area:flow <- traffic(aoi = area, product = "flow")
  • Get traffic incidents in a specific area:incidents <- traffic(aoi = area, product = "incidents")

Copy Link

Version

Install

install.packages('hereR')

Monthly Downloads

654

Version

0.2.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Merlin Unterfinger

Last Published

December 16th, 2019

Functions in hereR (0.2.1)

geocode

HERE Geocoder API: Geocode
isoline

HERE Routing API: Isoline
traffic

HERE Traffic API: Flow and Incidents
reverse_geocode

HERE Geocoder API: Reverse Geocode
unset_auth

Remove HERE Application Credentials
route_matrix

HERE Routing API: Route Matrix
weather

HERE Destination Weather API: Observations, Forecast, Astronomy and Alerts
unset_proxy

Remove Proxy Configuration
route

HERE Routing API: Route
aoi

Example AOIs
poi

Example POIs
autocomplete

HERE Geocoder API: Autocomplete
set_auth

HERE Application Credentials
set_proxy

Proxy Configuration