[R-sig-Geo] lat/lon to timezone

Barry Rowlingson b.rowlingson at lancaster.ac.uk
Fri Oct 10 12:45:17 CEST 2008


2008/9/25 John Callahan <john.callahan at udel.edu>:
> That's a handy little script to have, and learn from.  Geonames.org also
> hosts web services for finding the elevation, nearby populated places,
> nearby Wikipedia entries, some reverse geocoding, and a few more.
> (http://www.geonames.org/export/web-services.html)   Thanks for posting the
> script!

 I've almost finished writing a package to enable R queries to all the
geonames.org web services. I've applied for a project on R-forge for
it so that should go through later today.

 Most of the functions are one-liners anyway, being just a json call
and a wrapper to return a data frame. So soon you'll all be able to
know what kind of day we're having here:

> GNweather(north=55,east=-2,south=53,west=-3)
            clouds weatherCondition
1 scattered clouds              n/a
2       few clouds              n/a
3       few clouds              n/a
4       few clouds              n/a
                                               observation windDirection ICAO
1  EGNR 100850Z 20013G24KT 120V270 9999 SCT035 18/11 Q1023           200 EGNR
2       EGCC 100920Z 18011KT 9999 FEW030 14/08 Q1024 NOSIG           180 EGCC
3 EGNC 100920Z 23023KT 8000 RADZ FEW011 BKN015 16/14 Q1017           230 EGNC
4             EGGP 100920Z 21015KT 9999 FEW033 17/09 Q1023           210 EGGP
        lng temperature dewPoint windSpeed humidity        stationName
1 -2.966667          18       11        13       63           Hawarden
2 -2.266667          14        8        11       67 Manchester Airport
3 -2.950000          16       14        23       87           Carlisle
4 -2.850000          17        9        15       59 Liverpool Airport
             datetime      lat hectoPascAltimeter
1 2008-10-10 10:50:00 53.16667               1023
2 2008-10-10 11:20:00 53.35000               1024
3 2008-10-10 11:20:00 54.91667               1017
4 2008-10-10 11:20:00 53.31667               1023

Barry




More information about the R-sig-Geo mailing list