Compute map distances using Google's Distance Matrix API. Note: To use
Google's Distance Matrix API, you must first enable the API in the Google
Cloud Platform Console. See ?register_google
.
mapdist(from, to, mode = c("driving", "walking", "bicycling", "transit"),
output = c("simple", "all"), urlonly = FALSE,
override_limit = FALSE, ext = "com", inject = "", ...)distQueryCheck()
a data frame (output="simple") or all of the geocoded information (output="all")
name of origin addresses in a data frame (vector accepted)
name of destination addresses in a data frame (vector accepted)
driving, bicycling, walking, or transit
amount of output
return only the url?
override the current query count (.google_distance_query_times)
domain extension (e.g. "com", "co.nz")
character string to add to the url
...
David Kahle david.kahle@gmail.com
if parameters from and to are specified as geographic coordinates, they are reverse geocoded with revgeocode. note that the google maps api limits to 2500 element queries a day.