Created
September 15, 2016 02:04
-
-
Save StevenMMortimer/61ca2c184ebaf59015097d4d9107194a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
options(stringsAsFactors = FALSE) | |
library(rjson) | |
library(RDSTK) | |
street2coordinates <- function (address, session = getCurlHandle()) | |
{ | |
api <- paste(getOption("RDSTK_api_base"), "/street2coordinates/", | |
sep = "") | |
get.addy <- getURL(paste(api, URLencode(address), sep = ""), | |
curl = session) | |
result <- ldply(rjson::fromJSON(get.addy), data.frame) | |
names(result)[1] <- "full.address" | |
return(result) | |
} | |
# this is the address of Slover Library | |
slover_address <- '235 E Plume St, Norfolk, VA 23510' | |
street2coordinates(slover_address) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment