Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for Stats for the WDTK Transparency Report 2021 - 1 #921

Closed
sallytay opened this issue Nov 9, 2021 · 4 comments
Closed

Request for Stats for the WDTK Transparency Report 2021 - 1 #921

sallytay opened this issue Nov 9, 2021 · 4 comments
Assignees

Comments

@sallytay
Copy link
Contributor

sallytay commented Nov 9, 2021

Is is possible to get stats from the site for the below; for the time period: 1 November 2020 - 31 October 2021

Total Number of requests flagged for administrator attention

Then broken down for these reasons:
Contains defamatory material
Not a valid request
Request for personal information
Contains personal information
Vexatious

Deadlines are:
The annual report is scheduled to go out on 16 December
Design is scheduled to be completed by 9 December
Ideally this means that copy should be ready by 2 December

Linked to:
#910

Sally

@garethrees
Copy link
Member

from_date = Time.zone.parse('2020-11-01').at_beginning_of_day
to_date = Time.zone.parse('2021-10-31').at_end_of_day
period = from_date..to_date

report_events =
  InfoRequestEvent.
    where(event_type: 'report_request').
    where(created_at: period)

# Total number
report_events.count
# => 768


# Events grouped by report reason
report_events.each_with_object(Hash.new(0)) do |event, memo|
  reason = event.params[:reason]
  memo[reason] += 1
end
# => { "Other"                            => 287,
# =>   "Contains personal information"    => 143,
# =>   "Contains defamatory material"     => 51,
# =>   "Request for personal information" => 85,
# =>   "Vexatious"                        => 94,
# =>   "Not a valid request"              => 108 }

@garethrees
Copy link
Member

Note that this is total number of report events – a request may be reported multiple times. Will circle back to this if we have time later.

@sallytay
Copy link
Contributor Author

Added to the draft report as provided

@sallytay
Copy link
Contributor Author

The published Transparency report can be found https://www.mysociety.org/2021/12/16/whatdotheyknow-transparency-report/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants