
I found this quote in Brian Sooy's Blog
"Design consists of creating things for clients who may not know what they want, until they see what you've done, then they know exactly what they want, but it's not what you did."
In this project, I play the dual roles of both the developer and the user. As a user, I had high demands and expectations, for what the script should do! As the developer, I need to be more wary of the infinite loops that my code could get into! When I triumphantly managed to parse the XML from www.weather.com, and moved on to the next milestone, I realized that the XML that I parsed was utterly useless and I provided me only the current weather! Here is the link to a sample RSS feed (for La Jolla). What I need is hourly forecast and weather.com can only provide that in a dynamic wepage (link). I would then have to perform a series of getElementById() and compare the strings to the times I want. This becomes very complicated as the html elements I need do not have IDs.
An alternative source (provided by Kelly) is Weather.gov. This provides an Experimental National Digital Forecast Database XML, that can provide hourly information (in three hour blocks).
The request/response process is made possible by the NDFD XML Simple Object Access Protocol (SOAP) server. The server is updated hourly. Hitch: One needs to provide the latitude and longitude co-ordinates of the location (not zipcode, not city name!). Fortunately for us, Geocode provides the latitude and longitude co-ordinates given the zipcode or city name.NDFD XML contains forecasts for any combination of the following meteorological parameters, including Max/Min Temperature, 3 hourly Temperature etc. The NDFDgen() function is accessed by Client to retrieve the parameters and it requires some user supplied input such as Latitude, Longitude, Start and End-Time. However when I tested the function, it returned weather information for a date in 1970!
The National Weather Service has also announced that it would provide Rss feeds (making life easier for everyone!), but as luck would have it, it would be released on June 6th 2006, two days before our presentation!!
So now, I aim to spend a few more caffeine-stimuated hours tonight fixing this situation and hope that by dawn, I can provide and inter-connect between gCal supplied date and time information and weather.gov database. If this gets to work then I guess I'd just have to go to bed!
No comments:
Post a Comment