Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
The Internet United States Graphics Software Science

Weather Data Available in XML 198

wombatmobile writes "Wired reports the National Oceanic and Atmospheric Administration this week began providing weather data in an open access XML format. Previously, the data was technically available to the public, but in a format that's not easily deciphered. How will the free and easy availability of valuable data like this in XML affect the development of the web? One example is Tom Groves SVG weather. This type of visualization of XML data is about to fall within easy reach with nothing more than a text editor required as an authoring tool. From March 2005 SVG becomes part of the standard Mozilla/FireFox build. As an example of how web standards are supposed to work, what more could you hope to find?" We mentioned the policy change a few days ago.
This discussion has been archived. No new comments can be posted.

Weather Data Available in XML

Comments Filter:
  • by ewithrow ( 409712 ) on Sunday December 05, 2004 @07:27PM (#11003860) Homepage
  • by Anonymous Coward on Sunday December 05, 2004 @07:28PM (#11003862)
    Click on a city in your area on this site: http://www.timeanddate.com/worldclock/custom.html? continent=namerica [timeanddate.com] The page for each city lists the coordinates.
  • by FiReaNGeL ( 312636 ) <fireang3l.hotmail@com> on Sunday December 05, 2004 @07:28PM (#11003867) Homepage
    Don't miss out the wonderful WeatherFox [mozdev.org] extension for Firefox... crafteh coded this marvel after a suggestion of mine [mozillazine.org] on Mozillazine Forums. International Forecast in your statusbar. Can't beat that!
  • by Davak ( 526912 ) on Sunday December 05, 2004 @07:28PM (#11003872) Homepage
    Yeah, you are right... that's the only information I need to chunk out a quick program running off the feed.

    Speaking of the feed...here's the URL that contains the actual XML information:
    http://www.nws.noaa.gov/forecasts/xml/ [noaa.gov]


    I guess they didn't post it on the front page to decrease the slash effect.
  • by mumblestheclown ( 569987 ) on Sunday December 05, 2004 @07:29PM (#11003881)
    Meanwhile, other, shortsighted governments, including most European ones, still largely charge for basic weather information.

    This leads to two perverse situations:

    1. (small aircraft) Pilots and (small craft) boaters are put in the unfortunate place of balancing their personal safety against a few dollars in such a way that would never be tolerated if we were talking about automobiles and trains.
    2. often, european users of weather data rely on US-taxpayer funded US weather info for their own countries. of course, since the emphasis is not so much, this info and forecasts are not as detailed or thought through as those that their own governments (or hastily privatized equivalents) produce daily. It's one thing that the US is doing right.
  • by MP3Chuck ( 652277 ) on Sunday December 05, 2004 @07:32PM (#11003892) Homepage Journal
    Except that now it's ForecastFox [mozdev.org]. Apparently there was some conflict with the website www.weatherfox.com (people going to weatherfox.com looking for WeatherFox extension support 'n stuff).
  • Re:Why SOAP (Score:4, Informative)

    by aluminum boy ( 589676 ) on Sunday December 05, 2004 @07:34PM (#11003905)
    SOAP, being XML, is available via http. Anything available in SOAP can be opened / viewed as XML in most browsers.
  • by lukewarmfusion ( 726141 ) on Sunday December 05, 2004 @07:39PM (#11003931) Homepage Journal
    NOAA servers contain much more weather info than just US states and territories; my program was pulling down everything from Afghanistan to Zimbabwe. Which was good for me - the site was designed for world travelers.
  • by b00m3rang ( 682108 ) * on Sunday December 05, 2004 @07:39PM (#11003932)
    Follow these directions: http://plugindoc.mozdev.org/windows1.html [mozdev.org]

    So far all it's managed to do is make Firefox use 100% CPU, and not much else. Let me know if you have better luck.

    IE just crashes.
  • by ErichTheWebGuy ( 745925 ) on Sunday December 05, 2004 @07:44PM (#11003956) Homepage
    http://weather.gov/data/current_obs/seek.php [weather.gov]

    The URL points to the RSS versions of the XML feeds. These have actually been available for quite some time.
  • Re:Why SOAP (Score:3, Informative)

    by yelvington ( 8169 ) on Sunday December 05, 2004 @07:55PM (#11004014) Homepage
    The referenced URL provides access to quite a bit of detailed forecast information. If all you want is current weather observations, you can get that in RSS or the Weather Service's own XML format without the bothersome overhead of SOAP or WSDL. See this page:

    http://www.nws.noaa.gov/data/current_obs/seek.ph p? state=&Find=Find

  • by g_braad ( 105535 ) on Sunday December 05, 2004 @08:14PM (#11004096) Homepage
    You need to recompile Firefox yourself or download the older 0.8 release from Mozilla.org which has SVG enabled.

    http://mozilla.org/projects/svg/

    another solution is to install svgview from adobe, like the 6.0 beta 1 and coppy the plugin files found in /progra~1/common files/adobe/adobe viewer 6/plugins/np* to the plugins dir from firefox (ofcourse only on windows).

    if you want to use the mozilla implementation of SVG, recompile is the only solution for now. is there someone out there who would be willing to create this so-called 'patch'?
  • by Fishstick ( 150821 ) on Sunday December 05, 2004 @08:16PM (#11004108) Journal
    I set up a little script a long time ago to get weather data from an XML feed from the weather channel for our office webcam. It's free and was really easy to use...

    http://www.weather.com/services/xmloap.html? [weather.com]
    #!/usr/local/bin/perl -w
    require LWP::UserAgent;
    use XML::DOM;
    use CGI qw(:standard);
    # first, get the XML feed
    my $ua = LWP::UserAgent->new(env_proxy => 1, keep_alive => 1, timeout => 30);
    my $base_url="http://xoap.weather.com/weather/local/6 0143?cc=*&prod=xoap";
    my $par="&par=[removed]";
    my $key="&key=[sign up to get one]";
    $response = $ua->get("$base_url$par$key");
    die "Error while getting ", $response->request->uri,
    " -- ", $response->status_line, "\nAborting"
    unless $response->is_success;
    my %weather = %$response;
    # then, parse out the crap we want
    my $parser = XML::DOM::Parser->new();
    foreach(keys %weather){
    $xmldoc = $parser->parse($weather{$_}) if(/content/);
    }
    foreach my $cur_cond ($xmldoc->getElementsByTagName('cc')){
    $curr_cond{'lastup'} = $cur_cond->
    getElementsByTagName('lsup')->item(0)->
    getFirstChild->getNodeValue;
    $curr_cond{'obsvst'} = $cur_cond->
    getElementsByTagName('obst')->item(0)->
    getFirstChild->getNodeValue;
    $curr_cond{'temp'} = cur_cond->
    getElementsByTagName('tmp')->item(0)->
    &nb s p; getFirstChild->getNodeValue;
    $curr_cond{'chill'} = $cur_cond->
    getElementsByTagName('flik')->item(0)->
    getFirstChild->getNodeValue;
    $curr_cond{'text'} = $cur_cond->
    getElementsByTagName('t')->item(0)->
    getFirstChild->getNodeValue;
    $curr_cond{'icon'} = cur_cond->
    getElementsByTagName('icon')->item(0)->
    getFirstChild->getNodeValue;
    }
    print header;
    print start_html("nice little cgi page to display the time/weather");
    print <<EOF;
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p >
    <p><font size="-1">WebCam is located on 9th floor in Itasca<br />
    pointed out southeast window overlooking Thorndale</font></p>
    <form name="clock" onSubmit="0">
    <input type="button" name="face" size=13 value="">
    </form>
    EOF
    print end_html;


    sorry about the atrocious formating - slashcode made me take out whitespace (what is the fricking point of an ecode tag supported if you can't post a small snippet like this without removing all the whitespace!?)

  • by orangenormal ( 728999 ) on Sunday December 05, 2004 @08:31PM (#11004172)
    You can also get XML feeds from specific weather stations at http://www.nws.noaa.gov/data/current_obs/ (Not lat and long required; just the station name) Now to wait until the Canadian government does the same thing...
  • Re:Why SOAP (Score:4, Informative)

    by batkiwi ( 137781 ) on Sunday December 05, 2004 @09:00PM (#11004356)
    Because it's meant to be used by programs that do processing on the data, not simply aggregators.

    By using SOAP, I can use php/java/c++ and simply bind to their services isntead of having to roll my own weather-xml->object (or hashtable, or whatever) converter.

    This is not for you to just hit with your browser/wget/whatever to stick weather on your webpage (although you can do that, it's easy if you post the right data), it's to allow you to write your own application that does whatever it wants with the data in an easy manner.

    It's not flat xml files based on city as per your example because that wouldn't make any sense. If you read through their api's there's a lot of data you can get based on long/lat or weather station id or........
  • Re:Weather Market (Score:3, Informative)

    by iammaxus ( 683241 ) on Sunday December 05, 2004 @10:57PM (#11004974)
    I don't think the NOAA is publishing the raw data, so competing predictions would not really be possible.
  • by Anonymous Coward on Monday December 06, 2004 @06:41AM (#11006334)
    Two comments here:

    (1) In fact pilots get weather information for free in the UK.

    (2) And if pilots did have to pay, wouldn't that be right? Somebody has to pay, in order for the service to exist: why should the general taxpayer subsidise the hobbies of people who are so insanely rich that they can afford to fly aeroplanes for fun?

If you want to put yourself on the map, publish your own map.

Working...