[PD] worldwide weather forecast into PD

altern altern2 at gmail.com
Thu Jul 3 12:58:33 CEST 2008


here there is the scripts to get weather data from the net (and more). 
The scripts can be used from python (using the scripts.py file) or from 
PD thanks to pyext external. There are several objects provided.

One to get local and external IP addresses of the computer, another one 
to get images from google (nothing to do with weather really), then two 
to get weather data from yahoo weather and BBC weather websites, and one 
to get geoInfo (city, country, lat, long ...).

The BBC one is a bit more complex and i guess most likely to fail if 
they change the web layout, i am parsing the HTML to get the data. The 
one on yahoo relies on their XML data structure totally and i dont think 
they will change this so often.

However, the nice thing about the BBC one is that it tries to guess 
where the computer is using the geoinfo, but this is might not work all 
times. On the one hand, the system might not guess where you are 
located, on the other hand the city or area you are in might not have 
bbc weather data.

any ideas or contributions are welcome.


B. Bogart(e)k dio:
> Hey there,
> Are you using the data for a performance or installation?
> I used live weather data (from an APRS packet radio gateway) parsed from
> a website.
> It was the worst mistake I made.
> The installation ran for a couple years but had four problems:
> 1. The format of the webpage changed, I rewrote it.
> 2. The power went down.
> 3. The power went down again.
> 4. The website went down.
> Now I know not to depend on any external infrastructure.
> Using your own weather station would be very stable (they are not as
> expensive as they sound). Or perhaps there is some more stable way to
> get at the APRS data than a website.
> APRS is nice because there are hundreds of weather stations all over the
> world, are interlinked by packet radio network. The problem in my case
> was the internet gateway.
> .b.
> altern wrote:
>> hi
>> anyone knows of an online worldwide forecast service? I am developing 
>> some python scripts with Pyext external that retrieve different type of 
>> data from the net into PD.
>> At the moment i have been using yahoo weather, this is quite handy 
>> because they have RSS feed that can be easily manipulated from python 
>> and returned into PD.
>> Currently i have scripts that tell me the external IP of my computer and 
>>   another one that uses the IP to retrieve geolocation data (lat, long, 
>> nearby city, country ), using this i think i should be able to ask yahoo 
>> for weather data of an specific city and country and from there access 
>> the RSS.
>> However I think there are some copyright issues with yahoo weather. I 
>> read a notice in the HTML source of yahoo weather saying that this data 
>> is not to be used without permission
>> " ...You are prohibited from using or repurposing this data in any way 
>> without express written consent from Yahoo! ..."
>> I guess i could pretend i did not see the notice but maybe there is some 
>> worldwide forecast service that would allow me to use the data?
>> thanks
>> enrike
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list

-------------- next part --------------
A non-text attachment was scrubbed...
Name: netutils.zip
Type: application/zip
Size: 6450 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20080703/d6ab54e0/attachment.zip>

More information about the Pd-list mailing list