At work I play around with plotting interest levels for both our prospective students and our applicants. I have numerous scripts that I run that plot high school locations, zip code locations, individual address locations, etc. I recently was searching around for a county line map based on what you are able to do with your geocache finds (see here).
Well, I don’t format the data I pull from work into a GPX so that wouldn’t really work and I wanted to automate the process w/o having to play around with curl… So I located the shape files available from the 2000 Census and used an OSS utility to convert shape files to KML (used with Google Earth).
This OSS shp2kml utility was a bit cumbersome and I didn’t feel like having to futz around with installing Java at work, etc. I instead found another utility that does shp2kml and used that with great success.
After I got a decent KML out of the utility, I tried to load it into Google Maps via the search bar but found out that it was entirely too large to load in that way. I zipped the KML, creating a KMZ and then it was small enough to load (see here for an example — it can take a while to load and may require you to zoom or reload to see properly).
Next I needed to figure out how to use it with the Google Maps API. There are some undocumented API features that you can access in order to play the KMZ overlay on top of other points. It took me a little while but I did end up figuring it out.
The result can be seen here. This *will* take a while to load as there are 100s of points to plot for MN and WI.

I’m still trying to work out a way to modify the KML/KMZ directly to change the color of the counties based on the interest levels inside each. Unfortunately the XML is ugly and I don’t feel like playing around with it much anymore. If anyone has an easy solution (xmlstarlet didn’t get it done for me — too cryptic of an interface) that can be done on the Linux commandline, please let me know :)