Opening up election data

With the launch of data.gov.uk, and smaller scale open data projects from the likes of Kent, Warwickshire, Lincoln and my own council, Lichfield, everybody's waking up to the world of open data.

As well as the general election on May 6th, there are also a number of local council elections too. With this in mind it's become clear that election data needs to be open­ed up, so as well as knowing what councillor sits on what committee, people can also find out when they were elected, how many v­otes they've received, as well as things like voter turnout.

This is something I've been helping Chris Taggart (who runs OpenlyLocal.com and sits on the Local Public Data panel) help councils to do.

Chris decided that, rather than just asking councils to publish their data in a machine-readable format (such as XML, CSV or JSON), it'd be better if they could publish their data in a standard format, which was embedded into their website. This means that all council officers need to know is a bit of HTML and they can be on the road to publishing elections in an open format.

The standard Chris decided on was RDFa, which is a way of making HTML machine readable. In normal HTML, the markup just indicates content-related syntax, such as whether the content is a heading, a paragraph or a list item etc.

With RDFa, we add markup to the HTML which adds meaning to the markup, telling a machine that comes to our web page what a certain phrase or word actually is - in our case it'll be whether it's a number of votes, a person's name or their political allegiance etc. This is completely invisible to a normal user, and only comes into effect when a machine which knows it's looking for RDFa comes sniffing around.

­For example, here's what a page marked up with RDFa looks to a user:

How an RDFa marked up page looks to a user

And here's what it looks like to an RDFa parser:

RDF output of parsed RDFa page­

­When adding markup to my own site, I wanted to make it easy for non-technical officers to add election content without fiddling around with HTML, so I set about building a plugin for Jadu, so election results can be added quickly and easily (maybe even in real time in some cases).

It's now live and kicking with real data, and already Chris has used the data to show the election results on OpenlyLocal.

I've put together a quick screencast of how the system works. Hopefully you'll agree that it's pretty quick and easy:

Already, a fair few councils have started using this standard, and now SOCITM and the LGA are encouraging councils to get on board, it's likely that more councils will join the party.

The great news is that the work I've done will now be available to all Jadu customers as an easy to install, one click plugin. If you're a Jadu customer, you can expect an announcement in the next couple of days.

If you're not a Jadu customer, then there's plenty of documentation on the Open Election data website, as well as a Community of Practice on the IDeA website (login required), where you can get plenty of help and advice.

Share and Enjoy:These icons link to social bookmarking sites where readers can share and discover new web pages.

There is one response to “Opening up election data”

  1. Chris Taggart Says:

    Great stuff Stuart. Fantastic job.
    It's probably worth saying that one of the advantages of RDFa in this case (it's not always suitable), is that it allows those councils who have to hand-code their HTML (because they don't store the info in a database, can't program, or have a really poor CMS) to expose the info as data.

    It also allows those things such as Wards and Political Parties which can often be ambiguous (think there are over a dozen 'Abbey' wards around the country) to be positively identified using URIs.

Share this post

About

The official Jadu Blog (a peek inside). The musings and magic of the Jadu team and log of new web apps, customer super hero stories and mobile web marvels.

Recent posts

Archives

Tags