How To Markup Up Your Election Data: General

These instructions are for marking up the HTML on a generic content management system (where each different page is just a block of HTML), rather than one designed to extract data from a database and show it in a template. They should be simple enough that any competent webmaster can follow them.

They require no knowledge of linked-data or RDFa (the name for the markup that clearly identifies the text in the HTML as data), however in following them the webmaster should begin to understand some of the core concepts behind linked data, making it easier for them to publish (and consume) other data in the future. Do please contact us if there are any problems, and when you have marked up your results.

Note we strongly recommend marking up the pages before you know the elections results, just filling in the voting figures on the day. Not only does this allow the pages to be checked it also means the candidates for the election can be exposed as data.

Don't forget to register your details with us, so we can add you to the list of councils participating in the Open Election Data project.

Glossary

Election Results landing page
This is the web page that lists all the local elections and links to detailed pages about them. Code example
Individual Election Result page
This is the web page for an election (i.e. one that happens on a particular data, e.g. May 6, 2010). It usually lists the wards for which members are being elected, with links to the ward results pages Code example
Ward Result page
This is the web page where the detailed results for a particular ward s the wards for which members are being elected, with links to the ward results pages Code example

How to mark up your election data as linked, open data

  1. Mark up the Election Results landing page using the code on the sample landing page as an example. You need to link to each election you are going to mark up as data, and annotate those links as shown
  2. Mark up those Individual Election Result pages you want to expose as linked data using the sample Individual Election Result page as an example. Although there is a focus on the May 6, 2010 local elections, it's a good idea to mark up previous council elections too, as it exposes that data too, and allows you test out the markup.
  3. Mark up the Ward Result pages using the sample Ward Result page as an example. You should do this before the election day, leaving blanks for the votes cast, as it simplifies things, allows the pages to be checked, and makes the candidate list available as linked data. If possible political parties should be uniquely identified using an URI resource (e.g. The Labour Party is identified by http://openelectiondata.org/id/parties/6). There is a list of all the official parties, together with their resource URIs on this website.
  4. Make sure the Election Results landing page is listed with LocalDirectGov in its services directory.
  5. See what the data on your pages looks like using the RDFa Parser. There's also this handy RDFa -> RDF/XML Firefox bookmarklet: RDFa it (RDF/XML)!, which you use by dragging it to your browser bookmarks bar.
  6. Email us, and we'll check your pages, and add your council to the list of those participating in the project. That's it.