[R] Extracting results from Google Search
ECAMF
eduardomarinho at gmail.com
Tue Oct 23 15:33:28 CEST 2012
Dear list,
I have a long list of towns in Africa and would need to get their
geographical coordinates. The Google query [/TownName Country coordinates/]
works for most of the TownNames I have and give a nicely formatted Google
output (try Ingall Niger coordinates for an example). I would like to launch
a loop on the list of names I have and automatically extract the coordinates
given by Google. Does anyone knows how it can be done?
ex.
DB<-data.frame(town=c('Ingall', 'Dogondoutchi', 'Tera'),
country=rep('Niger',3))
# Get lat and lon from the Google search on :
for (i in 1:3) {
paste(DB$town[i], DB$country[i], 'coordinates', sep="")
}
Many thanks!
Eduardo.
--
View this message in context: http://r.789695.n4.nabble.com/Extracting-results-from-Google-Search-tp4647136.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list