Description Usage Arguments Examples
Geocode a dataset on a digitalocean droplet using ggmap. Note that when using Google you are agreeing to the Google Maps API Terms of Service at https://developers.google.com/maps/terms
1 | do_ggmap_geocode(data, droplet)
|
data |
a data.frame with addresses to geocode. This data.frame should contains a column called address which will be used to geocode. |
droplet |
a droplet where ggmap is installed upon. See the examples. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
## Create a snapshot of a machine with ggmap on in order to have a starting image
ggmapimage <- do_ggmap_image(sleep = 10)
## Create a machine from the snapshot in order to use it to geocode
mymachine <- droplet_create(image = ggmapimage$id)
mymachine
## Geocode
x <- data.frame(
id = c(1, 2),
address = c("Wetstraat 16, 1000 Brussel", "57 Rue de Varenne, Paris"),
stringsAsFactors = FALSE)
latlon <- do_ggmap_geocode(data = x, droplet = mymachine)
str(latlon)
## Clean up droplet and the snapshot
droplet_delete(mymachine)
image_delete(ggmapimage)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.