Skip to content

Scripts to validate and count votes for the Soc RSE Trustee Elections

License

Notifications You must be signed in to change notification settings

socrse/election-2019-scripts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SocRSE Trustee Elections Reporting

Robert Haines and Mark Turner

Validate and count votes for the SocRSE Trustee Elections.

Setup

Clone the repo:

$ git clone https://github.com/socrse/election-2019-scripts.git

To run this report you need ruby and rubygems. On Ubuntu these are both in the ruby package:

$ sudo apt-get install ruby

Then install bundler and get the dependencies:

$ gem install bundler
$ bundle install

Creating the election report

This script takes a list of society members and voters, and produces a report containing the result of the election. The default report shows full detail, including the numbers of votes cast for each candidate. A redacted report can also be generated, which just shows who is elected and who is not. The script validates the votes against the list of members, and then counts the number of votes for each candidate.

The full report also includes details of any invalid votes received; the redacted report simply shows numbers of invalid votes.

Usage

Run the script, providing the correct inputs. To create a full report, simply:

$ ./report <csv members file> <csv voters file>

Add the -r or --redact flag to create a redacted report. You can get full details of all report options by using the -h, -? or --help flags.

The reports can be turned into PDF format using pandoc:

$ pandoc report.md -o report.pdf
$ pandoc report-redacted.md -o report-redacted.pdf

You can also use rake to build the PDF reports:

$ rake pdf

If you name the members file members.csv, and the voters file votes.csv, then you can run the whole process within rake:

$ rake

See the Rakefile for more details.

About

Scripts to validate and count votes for the Soc RSE Trustee Elections

Resources

License

Stars

Watchers

Forks