Description Usage Arguments Details Value See Also Examples
takes an address and returns the coordinates of that point
1 | coordinateGetter(address, key)
|
address |
physical address. Works best in this format: 13 Elm Street, Amityville, State, Country. It's most important to get the two last points correct, so either City, Country, or State, Country (since that will give us decent granularity to find the nearest airport) |
key |
To access the openstreetmap API you need a valid API key. You can get it for free at https://developer.mapquest.com |
since we are using the free api with geocode, the matching is approximate, but good enough for our purposes.
returns a data frame of the address, its latitude and its longitude
1 2 3 4 5 6 7 8 9 | ## Not run:
if(interactive()){
library(purrr);library(magrittr)
addresses <- c("9th Street, Troy, NY, USA", "The Mall, Solan, Himachal Pradesh, India")
purrr::map_dfr(addresses, ~coordinateGetter(.))
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.