aboutsummaryrefslogtreecommitdiffstats
path: root/lib/tasks/stats.rake
Commit message (Collapse)AuthorAgeLines
* Quote body name in stats csv exportGareth Rees2014-08-04-2/+2
| | | | Some Public Body names contain commas (or other characters) which lead to a malformed CSV where parts of the body name are in later columns.
* Remove Total Requests from quarterly statsGareth Rees2014-05-01-6/+6
| | | | | Was confusing what the number meant; easier to just sum numbers in the quartery columns to get totals.
* Add rake tasks for James Cheshire statsGareth Rees2014-05-01-0/+55
|
* Merge branch 'rails-3-develop' of ↵Louise Crow2013-11-07-1/+5
|\ | | | | | | ssh://git.mysociety.org/data/git/public/alaveteli into rails-3-develop
| * Update the calculation of the numerator for percentage statisticsMark Longair2013-11-05-1/+5
| | | | | | | | | | | | | | | | | | We have changed the denominator of the proportion-based statistics to only include requests that are both visible and not 'awaiting_description'. This would mean, however, that the numerator could be larger than the denominator. This commit updates the calculation of those statistics to also exclude any hidden or unclassified requests.
* | Allow start and end dates to be supplied to stats:showLouise Crow2013-11-07-2/+8
|/ | | | This is in the service of #1173 and #1174.
* Reduce the memory consumption of rake stats:update_public_bodies_statsMark Longair2013-10-23-2/+3
| | | | | | | | This task was taking a huge amount of memory, even when fetching the InfoRequest objects with find_each. With an additional find_each for public bodies (10 at a time) and reducing the batch size for info requests to 200 at a time, the memory size of this rake task is kept down to about 400MB.
* Don't save a public body version when updating the stats.Louise Crow2013-09-05-1/+3
|
* Don't re-index body when updating statsLouise Crow2013-09-05-0/+1
|
* Add a verbosity flag to public body stats taskLouise Crow2013-09-05-1/+3
|
* Improve calculation of PublicBody statistics columnsMark Longair2013-08-20-18/+3
| | | | | | | | | | | | | | | | On PublicBody, we don't need to update info_requests_count because that's already done with :counter_cache. On the other hand, info_requests_successful_count and info_requests_not_held_count can't be updated easily with counter_cache (since they need conditions to be attached). Instead we update them in post_save and post_destroy, as suggested here: http://blog.douglasfshearer.com/post/17495285851/custom-counter-cache-with-conditions This also adds tests to ensure that the after_(save|destroy) callbacks are called and that they modify the counts correctly.
* Add a page with experimental statistics on public bodiesMark Longair2013-08-20-0/+36
| | | | | | | | | | | | | | | | | The statistics on the status of the requests to a particular public body are too slow to calculate on-the-fly, so this commit adds: * Extra columns on public_bodies to store counts of the successful, not held, and overdue request counts for each public body. * A rake task which should be run periodically to update the overdue request count column. If Javascript is not available, the summary statistics are shown as tables. If Javascript is available, graphs are drawn with Flot.
* Task for generating monthly volume statistics filtered by tag set.Louise Crow2012-10-04-25/+71
|
* Produce transaction stats up to and including August 2011.Robin Houston2011-08-24-2/+2
|
* Slighlty nicer formatLouise Crow2011-05-26-6/+14
|
* Adding script for generating transaction stats.Louise Crow2011-05-26-0/+40