hi
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.
enrike
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:
The format of the webpage changed, I rewrote it.
The power went down.
The power went down again.
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@iem.at mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list