mysociety/alaveteli — pull request #1044 by mhl (2013-08-15 12:11:07+00:00)
Title: Add graphs for public body statistics

This adds a `/body_statistics` page which displays graphs like this:

![Screenshot of graphs](http://firefly.ukcod.org.uk/~mark/graphs-example.png)

Currently this page isn't linked to from anywhere - I'd like to try it out on the live site privately before making it public. My reservations about this are:

* It's too slow to calculate these aggregates on the fly, so there's a rake task to add the summary statistics to new columns on `public_bodies`. It might be better to have a separate public body statistics table with a one-to-one relationship with public_body just to keep them separate.
* It could be made easier to override for different installations, but I hope it's OK for a first iteration.