Skip to content
Prev 2049 / 29559 Next

geocoding street addresses

On 5/6/07, Markus Loecher <loecher at eden.rutgers.edu> wrote:

            
Non-commercial terms of use or commercial with payment but if that's
ok then for US addresses:

URL <- "http://rpc.geocoder.us/service/csv?address"
addr <- "1600 Pennsylvania  Ave, Washington DC"
addr <- gsub(" ", "+", addr)
addr <- gsub(",", "%2C", addr)
tmp <- tempfile()
download.file(paste(URL, addr, sep = "="), destfile = tmp)
cn <- c("Lat", "Long", "Addr", "City", "State", "zip")
read.table(tmp, sep = ",", col.names = cn)

See web indicated web site for more info.