Skip to content
CSS Ruby
Branch: gh-pages
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
_bin
_data
_includes
_layouts
images
issue
javascripts
party
person
stylesheets
.gitignore
CNAME
Gemfile
Gemfile.lock
README.md
_config.yml
about.md
index.html
issues.html
params.json
parties.html
parties.json
people.html

README.md

Stance Viewer for the UK

Summary

Show how UK MPs and Parties voted on Issues.

Background

Knowing how politicians voted on individual motions generally isn't particularly useful. What most people really want to know is how a person, or political grouping, voted on all motions relating to a particular issue.

Stancer is a tool that lets you store lists of individual motions making up an Issue, along with how strongly they should contribute to it, and then see clearly how any person, party, or any kind of grouping voted on that issue.

Stancer-UK is a version of this working on UK vote data. It's built on GitHub Pages, and can be viewed at http://ukvotes.discomposer.com/

Details

  1. We take voting data and Policy positions from Public Whip and TheyWorkForYou, transform the underlying motion data into Popolo vote format, and access that via the VoteIt API. The code for doing all that can be found in the voteit-data-pw repo.

  2. Have your Stancer generate static issues.json, mpstances.json, and partystances.json, and copy these into the _data directory. (Note that currently Jekyll requires that you also rename these as .yaml files rather than .json!)

  3. Generate stub pages for parties, people, and issues. Jekyll requires a minimal template for each file you want to display, even if that will be calculated entirely from _data. You can create these files using:

    • ruby _bin/generate_mp_pages.rb
    • ruby _bin/generate_party_pages.rb
    • ruby _bin/generate_issue_pages.rb

DIY

If you want to do your own version of this, feel free to dig into everything here and see how far you get (most of the logic is in the layouts), but you'll probably be better contacting me — at least until I write up a lot more detail of how all the parts hang together.

VoteIt and Popolo should cope well with lots of very different voting scenarios, but the Stancer is currently very UK specific. Splitting out a more generic component is a high priority.

More details on it all can be found at http://discomposer.com/stancer/

You can’t perform that action at this time.