<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>VoteUK &#8211; Updates &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/2010/02/voteuk-updates/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Fri, 14 Feb 2025 08:38:14 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>VoteUK &#8211; Updates &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[VoteUK - Updates]]></title>
		<link>https://shkspr.mobi/blog/2010/02/voteuk-updates/</link>
					<comments>https://shkspr.mobi/blog/2010/02/voteuk-updates/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Sun, 14 Feb 2010 16:03:09 +0000</pubDate>
				<category><![CDATA[voteuk]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[vote]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=1633</guid>

					<description><![CDATA[After the tragic death of Ernest Marples, I&#039;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 …]]></description>
										<content:encoded><![CDATA[<p>After the tragic death of <a href="https://web.archive.org/web/20140208154955/http://ernestmarples.com/blog/2009/10/amazing/">Ernest Marples</a>, 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.</p>

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

<p>The API call <a href="http://www.theyworkforyou.com/api/docs/getConstituency">getConstituency</a> now has a future parameter.&nbsp; Adding future=1 to the call will return the constituency the Postcode will be in for the 2010 General Election.</p>

<p>I've also made use of TWFY's <a href="http://www.theyworkforyou.com/api/docs/getMP">getMP</a> API call.&nbsp; It returns enough detail about the current MP to be useful - including a photo.</p>

<p>So, a valid postcode will get you something like this:</p>

<p></p><div id="attachment_1634" style="width: 330px" class="wp-caption aligncenter"><img aria-describedby="caption-attachment-1634" class="size-full wp-image-1634" title="MP Photo" src="https://shkspr.mobi/blog/wp-content/uploads/2010/02/device.png" alt="MP Photo" width="320" height="480"><p id="caption-attachment-1634" class="wp-caption-text">MP Photo</p></div><p></p>

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

<p>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.</p>

<p>Secondly, because we don't know the height and width of the image, we can't put the height and width attributes in the &lt;img&gt; tag.&nbsp; 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.</p>

<p>To mitigate this issue, I'm using <a href="https://web.archive.org/web/20100124112510/http://tinysrc.net/?wpmp_switcher=desktop">http://tinysrc.mobi/</a> - it will automatically shrink the picture to fit the phone.&nbsp; This doesn't help with the page reflow issue though.</p>

<p>As for geo-locating Postcodes - I suggest you <a href="https://web.archive.org/web/20101011235747/http://osconsultation.ernestmarples.com/">respond to Ordnance Survey's consultation</a> and / or lobby your MP.</p>

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

<p>So, VoteUK lives on.&nbsp; Next steps are to make sure that all the <a href="http://www.whatdotheyknow.com/request/postcodes_within_constituency_bo">data I got from the Electoral Commission</a> is valid and build a framework for volunteers to enter their local candidate details.</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=1633&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2010/02/voteuk-updates/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
