March 24, 2006
Student Affairs Weather Data
I just saw the new Student Affairs weather applet at http://studentaffairs.case.edu/living/resources/weather/.
Things like this are no good to me unless there is XML available.
Well,
Query http://studentaffairs.case.edu/living/resources/weather/wdlconfig.xml to get an XML document of the config for the weather applet. It takes a parameter, "nocache" whose value appears to be the current UNIX timestamp out to two decimal places. This config will provide some insight into how things operate.
To get the actual data, query http://studentaffairs.case.edu/living/resources/weather/clientraw.aspx. This document also takes the "nocache" paramater and the value is also the UNIX timestamp.
The later link is the one that actually returns the data. The data is formatted as a string with spaces separating the data values. There are no labels to describe what field belongs to what, but it shouldn't be that difficult to decipher. It might be possible to open up the flash applet in an editor and see how it processes the data return. Why XML was not used to transfer data, I do not know.
Other links of interest are http://studentaffairs.case.edu/living/resources/weather/clientrawextra.aspx and http://studentaffairs.case.edu/living/resources/weather/clientrawdaily.aspx. Both also take the "nocache" attribute.
This is a really cool applet. For $25, I am not complaining. Still, XML would have been so nice. Oh well.
By the way, the data in the table on the bottom actually comes from the Weather Channel's SOAP api. However, Wade Commons' real-time data is invaluable. I must have it.
Trackback
You can ping this entry by using http://blog.case.edu/gps10/mt-tb.cgi/6812 .
Comments
WELL! This must be what happens when you get mentioned in Case Daily.
The weather station (mounted on Wade) is actually part of The Village at 115 project and is there to collect weather data that we can correlate with energy usage data coming from the village later.
We pull live data from the weather station every five minutes and record the data in a database for future study. (The live data is available in a number of formats, including XML, but I'm not going to publish the URL because the thing wouldn't be happy with a zillion people hitting it, but I'll consider individual requests.)
We created the exports required to run the flash widget, which I have to agree was a great deal for only $25. These are text files that were only formatted for use by that flash, and have no other general purpose.
Now we DO want to provide more general access to this data, either by expanding the number of graphs, providing export capability, or by providing an XML feed. The question is, what should that feed look like??
Joel
How about just providing a proxy for the raw XML from the device that caches the documents for a while, so actual hits to the device would be limited to every 5 or 10 minutes or something. There's probably no need (at first anyway) to transform the output.
Joel, if you send me the direct XML feed, I can put up a script on webservices.case.edu that is basically a proxy with caching support. I will set it up to hit your file at most every N minutes. Just let me know how you want it set up.