reverseGeocode: Get the address associated with a pair of coordinates

Description Usage Arguments Details Value Examples

View source: R/reverseGeocode.R

Description

Get the address associated with a pair of coordinates using the Google Maps API

Usage

1
reverseGeocode(crd, result = 1)

Arguments

crd

Input coordinates vector (longitude and latitude).

result

Which search result to use. The default is the first result.

pause.time

Amount of time in seconds to wait after a request (if performing multiple requests in a loop).

Details

By default the function returns the first result from the search. This can be checked for accuracy by looking at the address.compoents result. If this is incorrect, the second result can be tried using result = 2

Value

address

The resulting address.

address.components

A data.frame with the various components of the address.

Examples

1
  reverseGeocode(c(-73.98691, 40.75546))

walshc/GoogleMapsAPI documentation built on May 3, 2019, 11:50 p.m.