weather
Personalized weather prediction
Submitted by CAPSLOCK2000 on 10 November, 2009 - 22:00Here's a one-liner to generate a personalized weather prediction.
Quite a fancy name for a line of pixels, but allow me to explain.
In the Netherlands there are two kinds of weather, raining and about to start raining (four if you add hail and snow). If you don't want to get wet every time you go outside you need to plan your trips. Okay, I'm exaggerating but you get the point.
While there are many nice websites, browser widgets and desktop applications dedicated to the weather most of them are not very practical. They will give you a very detailed report on the weather throughout the day for your entire region. Typically I'm just interested in the weather at my place for the next hour or two.
My simple solution is to take an animated prediction of my country, cut out a small area around my house and append all these images side to side. This gives a small rectangle that will immediately show if and when it will rain during the next three hours.
The end result is rather small, but that is the entire point. Here's an example:
| Current Prediction | ![]() |
| Fixed example | ![]() |
Black means dry, blue means rain, the darker the more rain. Every sub-image represents 10 minutes.
This is generated with the following command:
wget http://www2.buienradar.nl/forecast/nl-eu-forecast/loop.gif -O - | \ convert '-[1-99]' -crop 10x10+414+563 -alpha Off +repage +append ~/public_html/weer.png
Note that this is useless to you unless you live in Maastricht. If you live somewhere else in the Netherlands you can adjust the coordinates to point to your own city.






