Monthly Archives: June 2014

Reading chamber debates

MyParliament now includes debates for the Commons and the Lords!

A sample debate


Following on from our work of the last sprint, this past fortnight we’ve been working on exposing the transcripts of debates from the data we’ve captured. There are currently on the parliament website a couple of ways to review Hansard. The rolling page, which exists whenever the house is sitting, and then the historical pages where you can review content from pretty much any date in the past.

Our sprint goal was look at ways at creating functionality that extends beyond what is currently on parliament’s website, to build a common look and feel for the content regardless of the date, and to enhance the work we have already done to make divisions and contributions searchable by linking directly from search results to the debate where the result happened. We also wanted to experiment with the UI and see if we could bring something a little closer to a “chat” type interface to a debate transcript.

You can now browse debates from May 2013 for the Commons and the Lords using the calendar picker (same one as we’ve used elsewhere on the site), days with content will be highlighted for ease of use. Once a day has been chosen, a list of all the debates that happened on that date will be shown and from there it is simply a case of clicking to have a read. When reading a debate we have permalinks for every contribution, and when searching for divisions or contributions via options from the menu, results will link you straight to the pertinent section of the debate.

If all this wasn’t enough, we’ve made some tweaks to our previous work as well – you can now search freely for both divisions and contributions with no restrictions on date ranges. To enable this we have built pagination onto the search result pages and enhanced our API to also support skip and take on the results. We’ve improved our date picker to make it easier for you to navigate the site too.

Our next sprint, which will likely be the last one on this for a little while, will bring some better searching of debates and divisions, some data visualisations and hopefully a little bit of fun with video…

Member voting and contributions

Over the past few sprints we have been looking at ways we can show some more information about members, using data we already have and by adding some value to the content produced by the Hansard team to expose the huge amount of information they produce in some different formats.

So we’ve come up with the Members Data Portal. At the moment this is somewhere between an alpha and a beta, but we want to share it now as if we keep waiting for something we are totally happy with we’ll likely end up never deploying. The data is not official or 100% accurate (yet) but its a good start point I hope you’ll agree.

The first set of information we are exposing is the memberships of both the Commons and the Lords. This allows you to review how the make-up of parliament has changed over time. This data is sourced from the Members Data Platform and makes interesting reading in terms of not only majorities, but also how the gender balance has changed over time as well.

Right now there is no parliamentary data service that offers easily searchable results of divisions in the Commons (but we do have for the Lords and it’s getting better), and as our MPs are representing all of us, it seemed as good a place as any to try to expose in an easily searchable format how MPs have been voting.

We have created a couple of different takes on this data. Firstly you can review divisions for any given day. At this time only divisions that took place in the chamber are available to search (deferred divisions are recorded differently and we haven’t tackled that just yet). On the calendar control you will see certain days shaded. These are days with divisions recorded. Click through to review what divisions happened, what they were about (we link to bill information where we’ve been able to work it out!), who voted and how.

A second take on this data is how a specific member has voted, this tool allows you to choose a member (find yours using our MP finder tool) and review how they have voted in divisions over a set time period. Hit the all divisions checkbox to see the divisions that an MP did not vote in, now there are any number of reasons this could have happened, but it is interesting to see when it did.

Both of the above are also available for the House of Lords, although this does exist elsewhere we want to do more with debate outputs in future so this seemed a useful thing to do in passing.

Finally (and maybe most excitingly) we have created a tool to enable full text searching of contributions for both the Commons and the Lords, essentially who said what and when. Simply choose a member, or maybe search all members, enter a search term and away you go. This makes it very easy to find out who is talking about the key issues of the day. Results are ranked by relevancy to help you find what you are looking for.

We have captured data from the start of the last session (8th May 2013), that is 90,000 contributions at the time of writing. Due to the size of the data set, right now we are restricting all queries to a maximum of 3 months of data at a time, but will soon add paging to the results enabling you to scour all the data in one go.

Coming soon… outputting the content of debates in a more modern way and linking to them from divisions and contributions to help give more context to what has been happening, we want to do some data visualisations around what we’ve captured, and we will expose the underlying data service that powers our portal to anyone who is interested.

UPDATE (3/6) : The data service is now available here