interp 1.0.C This is a project that returns interpolated temperature and humidity values for a specific latitude and longitude within the US. It works by finding a few weather stations that are nearby the desired input latitude and longitude, creating distance-weighted averages between the nearest station and the other stations that account for how far away the point of inquiry is, then averaging all of the results together. This data is interpolated, and as weather can be pretty local, the further one gets from the nearest station, the more likely that the values developed here may differ significantly from the actual fact. Still, this enables one to make an inquiry, and within the limits of what measurements are taken by the National Weather Service, it'll give you a reasonably likely idea of conditions at points other than the weather stations themselves, which is to say, the other 99.99999999% of the USA. :) To use this, there are three phases; the first is to go get a text file which lists all the weather stations. I found the file at... http://weather.noaa.gov/data/nsd_bbsss.txt ...and put that in the local directory named NOAA.txt. Then run interp.py, which will in turn create a file called "us_nws.txt" which is a more useful list, being shorter (US sites only) and also containing decimal-ized latitude and longitude values. Once you have this file, you can run "demo.py" which will do the work of taking the latitude and longitude in question (from demo.conf) and get you the interpolated data against the nearest stations. To learn how it works, see the Python (.py) files; I've tried to comment sufficiently so the process is understandable. Every once in a while, you'd want to refresh the files, as it is possible that there will be new weather stations added, or some stations may be shut down. The XML data only changes about once an hour, according to notes in the XML itself. Consequently, you should not attempt to fetch an interpolation more than once an hour -- it's just a waste of bandwidth. Be a good client, and only use what you need to. This project was built and tested under Python 2.5.1, running under OS X 10.5.8. You can reasonably expect it to work in any modern linux environment as well. It does depend upon various Unix/linux characteristics, such as the availability of a /tmp directory (though only when diagnostics are on), so it probably won't work under Windows. Ben AKA "fyngyrz" http://fyngyrz.com/ July 2nd, 2010 Versions: ================================================================= 1.0.C == July 3rd, 2010 -- More comments -- Output station list drops HI, AK, GU, PR (see demo.conf) -- Output station list fixes description case -- Output diag file path is in .conf file for OS compatibility -- Output graph now includes lat/long lines, better aspect control -- Output graph now includes station and interpolated results 1.0.B == July 2nd, 2010 -- More diagnostics -- More comments -- readme file is versioned -- demo.py will generate graph of result if PIL is installed 1.0.A == July 2nd, 2010 -- Original release version