Geocodes (finds latitude and longitude of) a 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
.
geocode(location, output = c("latlon", "latlona", "more", "all"),
source = c("google", "dsk"), force = ifelse(source == "dsk", FALSE,
TRUE), urlonly = FALSE, override_limit = FALSE,
nameType = c("long", "short"), ext = "com", inject = "", ...)mutate_geocode(data, location, ...)
geocodeQueryCheck()
If output
is "latlon", "latlona", or "more", a tibble (classed
data frame). If "all", a list.
a character vector of street addresses or place names (e.g. "1600 pennsylvania avenue, washington dc" or "Baylor University")
amount of output, "latlon", "latlona", "more", or "all"
"google" for Google (note: "dsk" is defunct)
force online query, even if cached (previously downloaded)
return only the url?
override the current query rate
in some cases, Google returns both a long name and a short name. this parameter allows the user to specify which to grab.
top level domain (e.g. "com", "co.nz"); helpful for non-US users
character string to add to the url or named character vector of key-value pairs to be injected (e.g. c("a" = "b") get converted to "a=b" and appended to the query)
...
a data frame or equivalent
David Kahle david.kahle@gmail.com