getGeoCode function

geocoding utility

geocoding utility

Geocode your data using, R, JSON and OSM or Google Maps' Geocoding APIs

getGeoCode(gcStr, API = c("osm", "google")[1], JSON = FALSE, verbose = 0)

Arguments

Returns

returns lat/lon for address

Author(s)

Markus Loecher

Examples

if (0){ getGeoCode("1600 Amphitheatre Parkway, Mountain View, CA") getGeoCode("Brooklyn") #You can run this on the entire column of a data frame or a data table: DF = cbind.data.frame(address=c("Berlin,Germany", "Princeton,NJ", "cadillac+mountain+acadia+national+park"), lat = NA, lon = NA) DF <- with(DF, data.frame(address, t(sapply(DF$address, getGeoCode)))) }