Integrate a weather XML feed

Registered by Brian Mathis

It would be nice to integrate a weather XML feed on the server, pulling updates from http://weather.boygenius.com once an hour (script author will block IP if requests are too frequent), and then letting the clients pull that information from the server.

The signs administrator could then select weather; like one would do when selecting an image, rss, or embedded web page; and customize/insert it as a region. More info on the boygenius.com feed can be found at http://weather.boygenius.com/faq.html

Blueprint information

Status:
Complete
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
Discussion
Series goal:
None
Implementation:
Implemented
Milestone target:
milestone icon 1.7.0-beta
Started by
Dan Garner
Completed by
Dan Garner

Related branches

Sprints

Whiteboard

Alex H: That's great for US cities - especially since it says the feeds can be used for any purpose. In the past when we've looked at this, we've not been able to find a general world-wide feed that has such liberal licensing terms. Most often they're for personal or non-commercial use which rules them out for digital signage.

Stef : I'm currently working on one for Canadian cities, it's pretty custom for my city and 2 others right now. I make them print out side by side in 3 columns with the logo of the 3 cities (it is very custom to my needs). I could make one more general etc. It caches the xml files locally on the script's server so if the XML is more than X seconds old, the script gets a fresher one so it doesn't hammer the server. And it uses the data from Environment Canada which state that as long as you say the data is from them, you're fine.

It's in french too but i guess i could make an english version too. Users would have to supply their icon packs (forecastfox icons packs would work, i use one of them, problem is i could not find usage policies).

All that to say that one "integration of weather" would probably not be universal. So you'd either have to insert packs for Europe, US, Canada etc. Since there is not many "global" feed providers.

I'd be happy to help with a Canadian english/french version if there is a need and some specs given (number of cities, size of layout needed, etc.)

Look at what i use : http://www.wifivoltage.com/stuff/weather.jpg
I removed the city logos for privacy purposes. The icons are one of the forecastfox icon packs.
It could easily be modified for only one city, you find the weather code on the website, change it, etc.

~~~~~~~~~~~~~~~~

LarryK: For the US, might be better to go direct to the source, the National Weather Service
XML feeds for all cities are available: http://www.weather.gov/xml/current_obs/seek.php
Data is public domain: http://www.weather.gov/disclaimer.php

The xml feeds even include links to the current, most appropriate weather icon. See: http://www.weather.gov/xml/current_obs/weather.php
-- Those icons are public domain, so they can be used for the forecast from any source (including non-US forecasts).
Also see the forecast icons that include percentages (for use in forecast. Eg 30% chance rain): http://www.nws.noaa.gov/weather/images/fcicons/

For the current forecast, data is also available as XML feed.
Here is an html version of forecast: http://forecast.weather.gov/MapClick.php?site=OKX&llon=-74.152083&rlon=-73.767083&tlat=40.985417&blat=40.600417&smap=1&mp=1&map.x=121&map.y=133
Here is the xml version of the same forecast: http://forecast.weather.gov/MapClick.php?lat=40.78060&lon=-73.96574&FcstType=dwml

I think best would be to show icons for current conditions and some number of upcoming forecasts. The number of upcoming forecasts would be a parameter since some layouts would only have room for one icon, others would have room for more. Another option would be for a single weather icon (current conditions or a forecast) to be shown for some number of sec, then transition to the "next" icon (an upcoming forecast). That way a limited geographical area on a layout could be used to show lots of weather information.

Some additional information:
US National Weather Service XML forecast data feed information: http://www.weather.gov/xml/
Retrieving the same data via REST instead of SOAP: http://www.weather.gov/forecasts/xml/rest.php
I think the best ui for selecting the area for the forecast would be to accept either a US Zip code or lat/long for people who want something more specific.

~~~~~~~~~~~~~~~~

For anyone that is interested; I have created a sript and php file that will download the xml file from noaa once an hour and display it via a web page. Using the python client you can make the background transparent and display the local weather. Details are on my blog below.

http://www.brianmathis.net/2010/09/10/howto-get-local-weather-on-xibo/

~~~~~~~~~~~~~~~~~
Alex H:
Possible options:
http://www.worldweatheronline.com/weather-api.aspx

Free API, must carry a tagline credit to World Weather Online. API is key protected and limited to 500 req/hr. Not sure how we'd manage keys for that? Perhaps force each install to have to register with their service and push the API key as part of the XLF?

Google iGoogle API:
http://www.google.com/ig/api?weather=Brighton&hl=Fr
http://www.google.com/ig/api?weather=Brighton
http://www.webdesignlondon-tristar.co.uk/goodies/all-google-weather-api-conditions

Investigating whether we can legitimately use this. RISEVision appear to be pulling their data from here so that may set a precident?

~~~~~~~~~~~~~~~~~
iGoogle is dead now and the Google Weather API is dead.

Possible alternative is: http://www.wunderground.com/weather/api/

Requires a credit at the point of display.

Possible icon set:
http://adamwhitcroft.com/climacons/
http://www.alessioatzeni.com/meteocons/
http://www.smashingapps.com/2012/05/28/40-free-weather-collection-of-weather-forecast-icon-sets.html

RiseVision have switched to TinBu Weather. I've contacted them to see if they'd be able to provide us an XML feed for Xibo

Dan:
Implemented with forecast API and choice of weather icons / sprites

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.