HERE_drivetime: Get drive time in hours from HERE.com Routing API

Description Usage Arguments Value

View source: R/HERE_drivetime.R

Description

HERE_drivetime is designed to take degree or radian geocoordinates, user app credentials, and some other API inputs (set to defaults). The function queries the HERE.com Routing API (https:// developer.here.com/documentation/routing/topics/what-is.html) and return the drive time from the JSON output code. This driveTime portion of the JSON is originally return in seconds. This function is designed to take an argument for the user preferred time (seconds, minutes, or hours) as a non- integer, numeric value (a number with decimals).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
HERE_drivetime(
  origin = NULL,
  destination = NULL,
  app_api = NULL,
  app_id = NULL,
  app_code = NULL,
  time_frmt = "minutes",
  type = "fastest",
  trnsprt = "car",
  trfc = "disabled",
  coord_typ = "deg",
  dev = FALSE,
  verbose = FALSE
)

Arguments

origin

a vector of length two (2); the latitude and longitude coordinates of the origin location

destination

a vector of length two (2); latitude and longitude coordinates of the destination location

app_api

a string; the user's API Key Credentials for the HERE.com JavaScript/REST (requires registration)

app_id

a string; the user's App ID for the HERE.com JavaScript/REST (requires registration)

app_code

a string; the user's App Code for the HERE.com JavaScript/REST (requires registration)

time_frmt

a string; the user's preferred time format:

  1. "hours"

  2. "minutes"

  3. "seconds"

type

a string; a method of deciding optimal travel route:

  1. "fastest"

  2. "shortest"

trnsprt

a string; a transportation method for the route:

  1. "car"

  2. "carHOV"

  3. "pedestrian"

  4. "truck"

  5. "bicycle"

trfc

a string; whether or not to factor in traffic:

  1. "disabled"

  2. "enabled"

coord_typ

a string; if the geocoordinates are in degrees or radians:

  1. "rad" (radians)

  2. "deg" (degrees)

dev

a boolean; whether to use development or production site

verbose

a boolean; TRUE to display json webaddress, FALSE to not display json webaddress

Value

the travel time as specified between two locations


wolfm4ne/gcd documentation built on Oct. 18, 2020, 10:38 p.m.