revgeocode | R Documentation |
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()
.
revgeocode(
location,
output = c("address", "all"),
force = FALSE,
urlonly = FALSE,
override_limit = FALSE,
ext = "com",
inject = "",
...
)
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 |
top level domain extension (e.g. "com", "co.nz") |
inject |
character string to add to the url |
... |
... |
a character(1) address or a list (the parsed json output from Google)
David Kahle david@kahle.io
https://developers.google.com/maps/documentation/geocoding/
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.