Skip to content
R package that provides an interface to the HERE REST APIs: Geocoder API, Routing API, Traffic API and Destination Weather API. Locations and routes are returned as 'sf' objects.
R
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Improve coverage Nov 17, 2019
data-raw
data New package example data POIs and AOIs Oct 9, 2019
docs Update documentation and package site Nov 17, 2019
inst/figure Logo created by hexSticker Oct 28, 2019
man
pkgdown Update package site Nov 13, 2019
tests Improve coverage Nov 17, 2019
vignettes Update documentation, NEWS, README and DESCRIPTION Nov 15, 2019
.Rbuildignore Travis CI and codecovr added Oct 28, 2019
.gitignore Handle empty responses Oct 11, 2019
.travis.yml Travis CI and codecovr added Oct 28, 2019
DESCRIPTION Update documentation, NEWS, README and DESCRIPTION Nov 15, 2019
LICENSE.md Update licence Oct 9, 2019
NAMESPACE
NEWS.md Update documentation and package site Nov 17, 2019
README.md Update documentation, NEWS, README and DESCRIPTION Nov 15, 2019
codecov.yml Travis CI and codecovr added Oct 28, 2019
hereR.Rproj Update function documentation Oct 9, 2019

README.md

hereR

CRAN status CRAN downloads Travis build status Codecov test coverage

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")
You can’t perform that action at this time.