diff options
author | Mark Longair <mhl@pobox.com> | 2013-11-04 11:06:13 +0000 |
---|---|---|
committer | Mark Longair <mhl@pobox.com> | 2013-11-05 15:47:17 +0000 |
commit | 23ca1b442493f30f07cf80bdd20f8f060464bb92 (patch) | |
tree | c249c3491d0b3ef90ddd818934d2e5383b793723 /app/models | |
parent | b16ed7188e0df7329da7c5d6c07ce16df2c0682d (diff) |
For percentage stats, exclude hidden or unclassified requests
The WDTK volunteers pointed out that it's not fair to include
hidden requests in the denominator, since they're typically hidden
for a good reason (e.g. being vexatious, spam, etc.), and we have
no information about those that are awaiting_description (i.e.
unclassified) so they should be excluded as well.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/public_body.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/public_body.rb b/app/models/public_body.rb index 7f8356dcf..ac2daf279 100644 --- a/app/models/public_body.rb +++ b/app/models/public_body.rb @@ -677,7 +677,7 @@ class PublicBody < ActiveRecord::Base # percentage. This only returns data for those public bodies with # at least 'minimum_requests' requests. def self.get_request_percentages(column, n, highest, minimum_requests) - total_column = "info_requests_count" + total_column = "info_requests_visible_classified_count" ordering = "y_value" ordering += " DESC" if highest y_value_column = "(cast(#{column} as float) / #{total_column})" |