Skip to content
Prev 10249 / 29559 Next

looking up country names from lat long

On Mon, Dec 6, 2010 at 1:41 PM, Josh Tewksbury <tewksjj at gmail.com> wrote:
My 'geonames' package (on CRAN) can do lookups via the geonames.org
web service:
$distance
[1] 0

$countryName
[1] "Guatemala"

$countryCode
[1] "GT"

 its being very slow at the moment though. You might have speedier responses.

 It can only look up one at a time, so you'll have to loop through
your data frame with the usual R loop/apply-type patterns.

Barry