revgeocode: Reverse geocode

Description Usage Arguments Value Author(s) See Also Examples

Description

Reverse geocodes (looks up the address of) a longitude/latitude location using the Google Geocoding API. Note: To use Google's Geocoding API, you must first enable the API in the Google Cloud Platform Console. See ?register_google.

Usage

1
2
3
revgeocode(location, output = c("address", "all"), force = FALSE,
  urlonly = FALSE, override_limit = FALSE, ext = "com",
  inject = "", ...)

Arguments

location

a location in longitude/latitude format

output

"address" or "all"

force

force online query, even if cached (previously downloaded)

urlonly

return only the url?

override_limit

override the current query rate

ext

domain extension (e.g. "com", "co.nz")

inject

character string to add to the url

...

...

Value

a character(1) address or a list (the parsed json output from Google)

Author(s)

David Kahle david.kahle@gmail.com

See Also

http://code.google.com/apis/maps/documentation/geocoding/

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run:  requires Google API key, see ?register_google

## basic usage
########################################

( gc <- as.numeric(geocode("the white house")) )
revgeocode(gc)
str(revgeocode(gc, output = "all"), 3)


## End(Not run)

ggmap documentation built on May 1, 2019, 8:22 p.m.