Rewired State - UK Parliament 2012

This weekend, I went to Rewired State's Parliament hackday. I teamed up with amazing front end designer Max Bye and statistician par excellence John Sandall to create a data visualisation of Parliament's Demographics.

Are the houses representative of the people in terms of gender diversity? Are the Labour Party younger than the Conservatives? Are the parties in the Lords particularly dissimilar?

You can play with the hack at http://shkspr.mobi/parliamentdemographics.tk/ or watch a video demonstration.

  • Each bubble represents a political party
  • The size of the bubble represents how many members they have
  • The Y-Axis (Vertical) represents the average age of MPs / Lords
  • The X-Axis (horizontal) represents how gender balanced the parties are

(As you can tell, the hack was heavily inspired by Hans Rosling)

Data

A quick word about the data we used.

The (beta) APIs had some reasonably good documentation - although the examples could have been better. It seemed to assume that a user was already intimately familiar with the (sometimes arcane) principles of Parliament.

It also only spat out XML, so that needed to be converted to JSON.

The main issue we had was with the quality of the data. Let's look at two examples.

First, Linda Perham (picked solely because she's a mate of my mum!)

{
  "FullTitle": "Linda Perham MP",
  "DateOfBirth": "1947-06-29T00:00:00",
  "DateOfDeath": {
    "-xsi:nil": "true",
  },
  "Gender": "F",
  "Party": {
    "-Id": "15",
    "#text": "Labour"
  },
  "House": "Commons",
  "MemberFrom": "Ilford North",
  "HouseStartDate": "1997-05-01T00:00:00",
  "HouseEndDate": "2005-05-05T00:00:00",
  "CurrentStatus": {
    "-IsActive": "False",
    "StartDate": {
      "-xsi:nil": "true",
    }
  }
},

That's pretty comprehensive. We can see when she joined, left, her age, that she's still alive, and who she represents.

Now, let's take George Galloway who has had an... interesting... Parliamentary career.

{
  "FullTitle": "Mr George Galloway MP",
  "DateOfBirth": "1954-08-16T00:00:00",
  "DateOfDeath": {
    "-xsi:nil": "true",
  },
  "Gender": "M",
  "Party": {
    "-Id": "26",
    "#text": "Respect"
  },
  "House": "Commons",
  "MemberFrom": "Bradford West",
  "HouseStartDate": "2012-03-30T00:00:00",
  "HouseEndDate": {
    "-xsi:nil": "true",
  },
  "CurrentStatus": {
    "-Id": "0",
    "-IsActive": "True",
    "Name": "Current Member",
    "StartDate": "2007-10-31T00:00:00"
  }
},

All we have is his current status. It doesn't mention his previous life as a Labour MP, nor does it mention that he was the Respect MP of Bethnal Green in 2005.

For MPs who have subsequently gone to the House of Lords, the data is also unhelpful.

Betty Boothroyd was a Labour MP (for two different constituencies), then became The Speaker of the House of Commons, then went to the House of Lords. This is all the information we have on her.

{
  "FullTitle": "The Rt Hon. the Baroness Boothroyd OM",
  "DateOfBirth": "1929-10-08T00:00:00",
  "DateOfDeath": {
    "-xsi:nil": "true",
  },
  "Gender": "F",
  "Party": {
    "-Id": "6",
    "#text": "Crossbench"
  },
  "House": "Lords",
  "MemberFrom": "Life peer",
  "HouseStartDate": "2001-01-15T00:00:00",
  "HouseEndDate": {
    "-xsi:nil": "true",
  },
  "CurrentStatus": {
    "-Id": "0",
    "-IsActive": "True",
    "Name": "Current Member",
    "StartDate": "2001-01-15T00:00:00"
  }
}

There's also a significant lack of historical data. There are some Lords & MPs in the dataset who were in Parliament in the 1940s - but only a few. It would be great to have a comprehensive record of, say, the last 100 years.

There needs to be a better representation of when a member has "changed" - whether that's affiliation, leaving and then returning, being elevated, changing constituency, or even gender. (Although, as far as I'm aware, there have been no Trans MPs. Nor any MPs with non ASCII characters in their name.)

The data represents a very monochromatic view of the world.

For examining broad trends, it was sufficient for a hackday. We had tried scraping Wikipedia to get full details of every election, but that was a bit beyond us (over 1000 people for every election, plus by-elections, for the last 50 years.)

What We Found

I was particularly surprised by how little gender diversity there is. 50% of the population is female, yet the Labour Party have roughly 33% women MPs. Caroline Lucas is the sole (female) representative of the Green Party - which doesn't quite balance out the entirely male Bishops in the House of Lords.

In our data, you can see the big jump after the 1997 election - where the number female MPs doubled.

Labour are consistently older than the Tories. That was completely against my expectations.

So, play with the hack and see what you notice.

Thanks

As well as my amazing team mates Max Bye and John Sandall, I must thank the team from Rewired State; they put on a storming hackathon. There was plenty of interesting data, a good mix of people, healthy food and drink (as well as the obligatory pizza).

While it would have been lovely to hold the event in Parliament - I appreciate that a hoard of geeks turning up with a panoply of dodgy electronics may not have best pleased the Serjeant-at-Arms. So The Hub Westminster was a fine substitute.

Special mention to Alex Blandford who was very helpful at explaining the data and helping us navigate through the peculiarities of the system.

Finally, massive thanks to the Speaker for this fine certificate.
rewired state 2012 certificate


What Do You Reckon?