Database Reference
In-Depth Information
Figure1-7.Natural Earth data
US National Weather Service
There are other weather APIs available through Yahoo! and Weather Underground , but the NWS
is the only organization to ofer one without signiicant restrictions on commercial and mobile
usage. It only covers the United States, unfortunately. The NWS ofers a REST/XML interface,
and it doesn't require any authentication or registration, though it does ask that you cache results
for any point for an hour, since that's the update frequency of its data.
You can access either current conditions or forecasts for up to a week ahead, and you can search
by city, zip code, or latitude/longitude coordinates. If you're interested in bulk sets of longer-term
historical data on weather, the University of Nebraska has a great guide available . Some of the
information stretches back thousands of years, thanks to tree rings:
curl "http://www.weather.gov/forecasts/xml/sample_products/browser_interface/\
ndfdXMLclient.php?lat=38.99&lon=-77.01&product=time-series&\
begin=2004-01-01T00:00:00&end=2013-04-20T00:00:00&maxt=maxt&mint=mint"
<?xml version="1.0"?>
<dwml version="1.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://www.nws.noaa.gov/forecasts/xml/DWMLgen/schema/DWML.xsd">
<head>
...
</head>
<data>
<location>
<location-key>point1</location-key>
<point latitude="38.99" longitude="-77.01"/>
</location>
Search WWH ::




Custom Search