VoteUK - Updates

by @edent | # # # # | 4 comments

After the tragic death of Ernest Marples, I'm sorry to say that the site fell in to a bit of disrepair. With no postcode data and no new boundary data, it looked like VoteUK was going to be permanantly out of business.

Thanks - once again - to the clever-clogs at TheyWorkForYou, at least half of the problem has been solved.

The API call getConstituency now has a future parameter.  Adding future=1 to the call will return the constituency the Postcode will be in for the 2010 General Election.

I've also made use of TWFY's getMP API call.  It returns enough detail about the current MP to be useful - including a photo.

So, a valid postcode will get you something like this:

MP Photo

MP Photo

One thing to note about the photos. Each one is a different size. This gives us two small problems.

Firstly there is no guarantee of how small the photo is. Should one MP's photo be massive, that could cause a problem for the phone trying to download it. All the ones I've tried so far have been thumbnail size.

Secondly, because we don't know the height and width of the image, we can't put the height and width attributes in the <img> tag.  Not only is this poor HTML, but it will mean that rendering the page will take longer and - depending on the phone - page reflow may occur.

To mitigate this issue, I'm using http://tinysrc.mobi/ - it will automatically shrink the picture to fit the phone.  This doesn't help with the page reflow issue though.

As for geo-locating Postcodes - I suggest you respond to Ordnance Survey's consultation and / or lobby your MP.

Until there's an official source for postcode data, I've gone back to using Yahoo!'s geo-location API.  I then pass these co-ordinates on to the Google Maps API.

So, VoteUK lives on.  Next steps are to make sure that all the data I got from the Electoral Commission is valid and build a framework for volunteers to enter their local candidate details.

4 thoughts on “VoteUK - Updates

  1. Mark Goodge says:

    Regarding the postcode data you could also sign my petition:

    http://petitions.number10.gov.uk/geopostcode/

    There's a bit more about the background to it here:

    http://mark.goodge.co.uk/musings/422/locate-that-postcode/

  2. Tim Green says:

    I posted on the mySociety mailing list but I thought I'd also post here in case anyone else is interested - candidate data is being worked on by Edmund von der Burg at http://www.yournextmp.com/ , having scraped most of the candidates for the main parties already from their websites, and volunteers from Democracy Club will be hopefully filling in any missing details.

    1. Thanks Tim.
      I've sent emails to those involved - hoping I can avoid duplicating effort.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.