Learn R Programming

mapsapi (version 0.5.4)

'sf'-Compatible Interface to 'Google Maps' APIs

Description

Interface to the 'Google Maps' APIs: (1) routing directions based on the 'Directions' API, returned as 'sf' objects, either as single feature per alternative route, or a single feature per segment per alternative route; (2) travel distance or time matrices based on the 'Distance Matrix' API; (3) geocoded locations based on the 'Geocode' API, returned as 'sf' objects, either points or bounds; (4) map images using the 'Maps Static' API, returned as 'stars' objects.

Copy Link

Version

Install

install.packages('mapsapi')

Monthly Downloads

547

Version

0.5.4

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Michael Dorman

Last Published

July 21st, 2023

Functions in mapsapi (0.5.4)

response_matrix

Sample response from Google Maps Distance Matrix API
response_map

Sample response from Maps Static API (as 'stars' raster)
response_geocode

Sample response from Google Maps Geocode API
response_directions_driving

Sample response from Google Maps Directions API
response_directions_transit

Sample response from Google Maps Directions API
mp_matrix

Get distance matrix from the Google Maps Distance Matrix API
mp_map

Get static map from the Maps Static API
mp_get_matrix

Extract distance or duration *matrix* from a Google Maps Distance Matrix API response
plot.mapsapi_map

Plot static Google map
mp_get_routes

Extract *routes* from Google Maps Directions API response
mp_get_bounds

Extract geocoded *bounds* from Google Maps Geocode API response
mp_get_points

Extract geocoded points from Google Maps Geocode API response
mp_geocode

Get geocoded coordinates using the Google Maps Geocoding API
mp_get_segments

Extract *route segments* from a Google Maps Directions API response
mp_directions

Get directions from the Google Maps Directions API