distances_mapquest: Interface with MapQuest API to geocode addresses

Description Usage Arguments Value Examples

View source: R/calculate_distance.R

Description

distances_mapquest creates and executes calls to MapQuest directions API via HTTP GET and returns the distance between two points.

Usage

1
distances_mapquest(from, to, route_type = "shortest", key)

Arguments

from

A string address

to

A string address

route_type

A string specifying the type of route. Acceptable options include "fastest", "shortest", "pedestrian", "bicycle". More information can be found here: https://developer.mapquest.com/documentation/directions-api/route/get/

key

An individual API authentication key. MapQuest provides 15,000 free monthly transactions with a non-gated account. An account can be created here: https://developer.mapquest.com/plan_purchase/steps/business_edition/business_edition_free/register

Value

A dataframe will be returned with the given addresses and their corresponding latitudes and longitudes. These are attributed to the closest street location.

Examples

1
2
distances_mapquest(from = "1555 Blake St Denver, CO 80202",
to = "2 Cedar St Newark, NJ 07102", key = Sys.getenv("MAPQUEST_API_KEY"))

chiouey/mapquestr documentation built on July 19, 2020, 8:41 p.m.