VoteUK - Updates


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.


Share this post on…

  • Mastodon
  • Facebook
  • LinkedIn
  • BlueSky
  • Threads
  • Reddit
  • HackerNews
  • Lobsters
  • WhatsApp
  • Telegram

3 thoughts on “VoteUK - Updates”

  1. 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.

    Reply

What links here from around this blog?

What are your reckons?

All comments are moderated and may not be published immediately. Your email address will not be published.

Allowed HTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <p> <pre> <br> <img src="" alt="" title="" srcset="">