Eduskunta PopIt

Today I’ve (finally) created a PopIt instance of all the members of the Finnish Parliament : http://eduskunta.popit.mysociety.org/

I’ve been working on this, on and off, for quite some time — partially to help drive forward the work within mySociety on the PopIt API with a real world use case; but (more practically, though rather ironically) because in VoteIt I want to be able to completely ignore all the hassles of how to store information on politicians and the political parties they represent — in its simplest form each Vote will simply be a record of how a Person (stored in PopIt) voted on a Motion on a Bill (stored in BillIt). But to be able to adequately ignore this information — or, more precisely, make it easy for other people to ignore it — I need to understand it quite deeply. However, getting to the point where I do actually understand it deeply enough has been rather painful, as I learn much better by example than by reading specifications, and there just aren’t that many good examples out there of modelling a Parliament as Popolo data.

Well, now we can add one more example to that list: the underlying data is available on Github as Popolo JSON for People and Parties.

I originally wrote spiders to fetch this information from the official Eduskunta site, but then I discovered Kansan Muisti, who make this all available over an API, which made life much easier — though that also brought a few minor difficulties of its own!1

Actually adding this data into PopIt also proved to be mildly challenging. Ideally there’d be a way of simply throwing a large chunk of JSON at it, and having it Do The Right Thing, but for now you need to add the records one by one over the API. Thankfully there’s a Ruby gem to help with that, but I managed to find two issues with that in the process of trying to upload the data.2

If I end up having to create more PopIt instances, then I suspect this import script will evolve over time into a more general version, though I’d certainly be very happy if someone else happened to create such a thing in the mean time. (I also have a variety of other thoughts on ways of making it easier to create new PopIt instances that I should get around to writing up too…)

In order for me to adequately model the Finnish Parliament3, the concept of Coalitions needed to be added to PopIt. Although I’ve already created the JSON for the last 13 years of data, I haven’t pushed it to PopIt yet. But that comes soon…

 

  1. In particular, they provide biographical information, including the full Parliamentary membership, of every recent MP, but they don’t have any Party information for parties that no longer exist — so I not only have to manually decode whether a historic Party membership is an identifier or a string, but needed to actually find my own information on some of those historic parties, including one — Alkiolainen keskustaryhmä — for which I can’t even find an English version of their name. []
  2. James, true to form, fixed both in no time at all. []
  3. or, more precisely, to allow me to answer questions in VoteIt like “At the time of this vote, which Party was this MP in, and were they in the Government Coalition?” []

Leave a Reply

Your email address will not be published. Required fields are marked *