Local weather by way of America, land of the free weather data
A flash weather module
How to get good local European weather data for free
After the rss/flash app that was meant to track breaking (war-) news in 2003, now in the year that broke all weather records (2006) I wanted to be able to track local weather. I'll probably be doing the anchorman next.
I was looking for a simple xml data feed which would have local current temperatures and a few days' forecast. Very disappointingly, the obvious source for the Netherlands (the KNMI) only has commercial services available that were way out of my league. Then there is a ready-made flash app from Germany which is free - but I just wanted the plain xml data and fröbel something in Flash myself.
Turns out the only free xml data feed for Europe is from America... where they feel weather info is in the public domain. In Europe, forecasts are seen as a commercial service - and thus the data must be paid for as well...
So the KNMI sends their data to The Weather Channel in the States, and I get my local KNMI data and forecast for free from across the pond. In fact, weather.com makes it a cinch to develop apps with their service, with an implementation guide and SDK for download at their site. And wonderful data too, with sunrise and sunset times and moon phases and whatnot!



Icons of American weather
Weather.com not only produces data feeds for any place you'd care to get weather data for, they also provide an SDK complete with icon set to use with the data feed.
Now there's the rub. Dutch weather is wet or sunny; English weather can be foggy, gloomy or drizzly; but American weather apparently has "DUST" and "SMOKE" and "HAZE" as possible condition - the icons say so. Also, in checking the received data against the current situation, it seemed to me that what is *really hot* to us, is nothing special in the States :-)
I felt our temperate clime was kinda boring and flat-looking when translated into American icons.
The solution to this lossy translation is to look at what you need and roll your own. Now the "hazy" condition still shows some sun, there is a much broader range of cloud - sizes going from a tiny wisp as a high cloud layer before the sun, to just an edge of sun behind a rain cloud, up to the big thunder "warships". In this way the icons felt much more at home with our local situation.
Flash as the front end
And not using those standard gif icons had another advantage as well. Using Flash as the xml reader I was able to combine two separate data items in one image: the background of the weather icon (1) gets its colour from the temperature (2). The same combination thing could be done with the moon phases data. Instead of using the static full moon icon on a cloudless night, I combined a moon in current phase with the weather icon on top and a dark night sky in the background. Now the only thing lacking is to have actual morning- and evening glow at the proper times :-) It's not for lack of data...
showing moon phase and early nightfall in winter
Update - now also showing storm warnings for wind speeds over 80 km/h:
(also note the darker night sky when the moon is dark)
storm warning with gusts over 100 km/h
Of course, Flash won't read the weather.com feed directly; it will not read cross-domain xml data. The well-known way to solve this is by using a so-called local proxy: the Flash asks for a file from the same server as where it's hosted, and this file (the local proxy) asks for the data on the remote server, which it then passes on to the Flash.
External Interface: get the weather into the conversation
And best of all, Flash gives me the opportunity to use its External Interface and let other flash objects on the page know about the current weather.
I could trigger a conversation in the chat app with a remark about the temperatures, just like you'd do in real life. I'm looking forward to be implementing that in the next conversation app release.
The weather - making use of a data service
RSS Newsreader - flash app
Self service chat - experiments in synthetic conversation
warmest day in July 2006
warmest day in Januari 2007
very wet days in August 2006
just a cold and foggy day in December
...and storm warning with gusts over 100 km/h in Januari
wetter.rtl.de in German
www.bbc.co.uk/weather - BBC's icons, 5-day forecast and RSS feeds

