-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add button to audit admin UI for downloading reported results summed by jurisdiction as CSV #1894
Conversation
contest_choice_csv_headers = construct_contest_choice_csv_headers(election) | ||
csv_headers = [ | ||
"Jurisdiction", | ||
*contest_choice_csv_headers.values(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same note here as in #1893 (comment) re dictionaries being ordered
icon="download" | ||
href={`/api/election/${electionId}/batch-tallies/summed-by-jurisdiction-csv`} | ||
> | ||
Download Reported Results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Landed on the term "Reported Results" since that's what we call these results in the final audit report
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me
server/api/batch_tallies.py
Outdated
@api.route( | ||
"/election/<election_id>/batch-tallies/summed-by-jurisdiction-csv", methods=["GET"], | ||
) | ||
@restrict_access([UserType.AUDIT_ADMIN, UserType.JURISDICTION_ADMIN]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can jurisdiction admins download this file? I don't think so. So I think it makes sense to remove their access
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Copy-paste error: 931dad6
icon="download" | ||
href={`/api/election/${electionId}/batch-tallies/summed-by-jurisdiction-csv`} | ||
> | ||
Download Reported Results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me
816f360
to
931dad6
Compare
Overview
Issue link: #1867
During previous batch audits, our audit specialists have manually downloaded every jurisdiction's candidate-totals-by-batch file, summed the numbers across batches, and prepared a summary file to compare against state-published results. A very cumbersome task 😅.
This PR builds the generation of this summary file into the product.
Before audit launch
After audit launch
Sample CSV before all jurisdiction files have been uploaded
Sample CSV after all jurisdiction files have been uploaded
Some entries are still blank because Contest 2 only exists in Jurisdiction 1.
For single-contest batch audits, the headers don't include contest names.
Testing