View source: R/google_geocode.R
google_geocode | R Documentation |
The Google Maps API is not open-source, therefore check the licensing conditions for usage conditions (https://developers.google.com/maps/terms). Users of this function must use the geocoded data to display on a Google Map.
google_geocode(input, source = "google", wkt = FALSE, verbose = TRUE)
input |
The input to transform to latitude and longitude pairs. |
source |
What API should |
wkt |
Should the return be a vector of WKT (well known text)? This is useful for when transforming a data frame. |
verbose |
Should the functions give messages? |
google_geocode
is a wrapper for ggmap::geocode
with some simple
enhancements to clean the output and avoid messages to the console. Other
address elements such as postcodes can also be transformed successfully.
Data frame or character vector.
Stuart K. Grange
## Not run:
# Return data frame
google_geocode("bath abbey")
# Only a vector without messages
google_geocode("york minster", verbose = FALSE, wkt = TRUE))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.