googleway (version 2.7.1)

google_speedLimits: Speed Limits

Description

Returns the posted speed limit for a given road segment. In the case of road segments with variable speed limits, the default speed limit for the segment is returned. The speed limits service is only available to Google Maps API Premium Plan customers with an Asset Tracking license.

Usage

google_speedLimits(df_path = NULL, lat = NULL, lon = NULL,
  placeIds = NULL, units = c("KPH", "MPH"), simplify = TRUE,
  curl_proxy = NULL, key = get_api_key("roads"))

Arguments

df_path

data.frame with at least two columns specifying the latitude & longitude coordinates, with a maximum of 100 pairs of coordinates.

lat

string specifying the latitude column

lon

string specifying the longitude column

placeIds

vector of Place IDs of the road segments. Place IDs are returned in response to google_snapToRoads and google_nearestRoads reqeusts. You can pass up to 100 placeIds at a time

units

Whether to return speed limits in kilometers or miles per hour

simplify

logical - TRUE indicates the returned JSON will be coerced into a list. FALSE indicates the returend JSON will be returned as a string

curl_proxy

a curl proxy object

key

string A valid Google Developers Places API key