These are the guts of a website I did some time ago to map, graph, and analyze property transactions.
As I was learning a great deal about coding while and by doing this, and it was by far the largest project I'd worked on at the time, I do not vouch for the quality of the code. The server side Perl code looks OK, although I would not take the CGI/Perl/MySQL approach were I to tackle the problem today. Unfortunately, the same cannot be said for the Javascript. It's a few thousand lines of spaghetti.
You can play with a semi-working version of the website at http://www.geogrape.net. It's missing a few database files, so maps won't generate. Pie charts and graphs will, however.
WTFPLv2.