Skip to content

hitecherik/how-many-votes

Repository files navigation

How Many Votes?

Tells you how many votes you have based on your (or another) UK constituency. Try it out here.

Uses turnout and electorate figures from the 2017 General Election (data).

Installation

Before running for the first time, the SQLite3 database should be created and populated. The easiest way to do this is using SQLite3 batch mode:

$ sqlite3 -batch constituencies.db < constituencies.sql

If you decide to name the database something other than constituencies.db or locate it somewhere other than the project's root directory, make sure to update its path in lib/database.js.

Next, install all of the node dependencies:

$ npm install

Finally, run the server:

$ node index.js

Methodolgy

  1. I took the detailed results by constituency dataset from the House of Commons Library's full results and analysis of the 2017 UK General Election.
  2. I took the average turnout accross all 650 constituencies, and worked out, from that, the average percentage of the vote that a voter in the average constituency had.
  3. I compared this figure to the actual percentage of the vote that a voter in each constituency had to see how far away the values were from each other.

Licence

Copyright (c) Alexander Nielsen, 2018. Licenced under MIT licence.

About

How many votes do you have in the UK?

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •