Finnish Parliament votings API

Parliament voting data visualized and published as a RESTful API.

Results of the votings by the Finnish Parliament are available from the Parliament website, but they are difficult to find and read. It is especially tedious to find out what a particular parliament member has voted, because the results are divided accross hunderds of pages. Linking to individual voting is also impossible, because the website uses temporary addresses which expire after few days.

To make things easier, I built an unofficial RESTful API, which publishes the voting data in machine-readable XML-format. This API can be used as a data-source for new applications (examples below).

API Manual

Data is fetched from the Parliament website by semi-automatic screen scraper. The API currently contains data from about 500 votings. Data is not checked thoroughly, so it can contain errors (but none found so far).

Manual

Identifiers for the votings are formatted like a{votingnumber}_{sessionnumber}-{year}. Other data comes from the Parliament website as is in unmodified form.

List of all votings

http://www.biomi.org/eduskunta/

Data about a voting

http://www.biomi.org/eduskunta/?haku=aanestys&id={äänestyksen tunniste}

Example: http://www.biomi.org/eduskunta/?haku=aanestys&id=a3_15-2010

Data about a parliament member

http://www.biomi.org/eduskunta/?haku=edustaja&id={sukunimi etunimi}

Examples: http://www.biomi.org/eduskunta/?haku=edustaja&id=Lind%E9n%20Suvi and

http://www.biomi.org/eduskunta/?haku=edustaja&id=Hyss%E4l%E4%20Liisa

Spaces and special characters are replaced with corresponding thee-character codes.

Votings with a keyword

http://www.biomi.org/eduskunta/?haku=sanahaku&id={keyword}

Example: http://www.biomi.org/eduskunta/?haku=sanahaku&id=luonnon

This returns data from those votings (no more than 20), which headers contain the keyword. Spaces and special characters are replaced with corresponding thee-character codes.

Applications

These are the visualizations and tools I have built on top of the API (In Finnish only):

  1. Votings
    1. Each voting has a page, which shows how members and parties have voted. Top-right box shows the total result by parties with one glimpse.
      Example: changes to the copyright law, the so called “Lex Karpela”
  2. Parliament members
    1. Each member has a page, which lists all her/his votings.
      Example: Jyrki Kasvi
  3. Voting analyzing machine lets you compare your opinions to those of the parliament members. The machine finds the best and worst matching parliament members according to your answers.

Key to colors:

  • green = yes
  • red = no
  • blue = empty vote
  • gray = not present

Applications Elsewhere

Other applications which use the API:

Twitter and Facebook feeds of the votings

New votings added to the API are displayed as Twitter and Facebook feeds.
By Ilkka Pirttimaa

Vaalilupausarkisto

Archive of what parliament members have promised before elections and have they kept their promises after being elected. Voting data comes fom my Parliament API. Voting visualizations have been influenced by my visualizations. Beta-version, launched in February 2011.
By Raimo Muurinen et al

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>