<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by East End Chavista on Medium]]></title>
        <description><![CDATA[Stories by East End Chavista on Medium]]></description>
        <link>https://medium.com/@w.heath91?source=rss-966cf8ea4f81------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*oHtzaOdi6lw_DjGdd5WRNA.jpeg</url>
            <title>Stories by East End Chavista on Medium</title>
            <link>https://medium.com/@w.heath91?source=rss-966cf8ea4f81------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 09:11:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@w.heath91/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[East London Analytica 1: Commonalities in the Commons]]></title>
            <link>https://medium.com/@w.heath91/east-london-analytica-1-commonalities-in-the-commons-99d8c48718be?source=rss-966cf8ea4f81------2</link>
            <guid isPermaLink="false">https://medium.com/p/99d8c48718be</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[politics]]></category>
            <category><![CDATA[elections]]></category>
            <category><![CDATA[data-engineering]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[East End Chavista]]></dc:creator>
            <pubDate>Sun, 12 Jan 2020 16:28:11 GMT</pubDate>
            <atom:updated>2020-01-12T16:28:11.319Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Using my data know-how in the 2019 UK General Election</strong></h4><p>Being a decidedly passive person, when the general election was announced I had already come to terms with the fact that I would not be out door-knocking and leaflet dropping. However, much like Liam Neeson in Taken, I did have a particular set of skills that I might be able to put to work to reach prospective voters in a different way.</p><p>As a bit of a politics nerd, I hold a long-term ambition to create a tool that allows you to compare different MP’s voting records. There are a few reasons for this, the main one being that there sometimes exists a cavernous gulf between an MP’s rhetoric and their actual voting record when inside parliament. This tool could serve as a way of keeping MP’s honest and of keeping voters better informed.</p><p>While assessing the feasibility of such a tool, I discovered that Parliament has an API that allows you to scrape the House of Commons’ division voting data. A division in the house occurs when there is enough opposition to a question posed by the speaker that they are unable to establish a clear answer. This then results in an arcane and extremely British process whereby MPs are sent off to two different rooms: the “yes” room and the “no” room. The amount of people in each room is then recorded and the highest total in their respective rooms wins the debate.</p><p>I decided that I’d use this data to measure MP similarity. Once I scraped all of this data, I should be able to answer the question: “When there is a disagreement in the house — how likely is a chosen MP to agree with another chosen MP?”.</p><p>This is not a perfect method of measuring MP similarity. For example, if someone votes against the government often on relatively unimportant legislation, but always votes with the government on the bigger issues, then the result returned may overstate the level of their opposition. However, given the simplicity of this method and that these issues fade into the background when looking at higher profile MPs (given that they vote on most things) I decided to press on and conduct a review once I had some numbers.</p><p>I set to work writing a basic scraper in Python that used urllib and Pandas that would pull the data I needed from <a href="http://lda.data.parliament.uk/commonsdivisions">Parliament’s Data API</a>. First, I’d grab the top level divisions data, which looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*Tfllj-lJdsKaZaJBf6eddA.png" /></figure><p>This would all be loaded into a Pandas dataframe in one line of code. I’d then begin looping through the “uri” column and using its row value to scrape the more detailed individual MP voting data. However, due to a strange looking implementation of REST architecture, this “uri” value is actually an invalid link. Unfortunately, this means you’re required to extract the numerical value on the end of the “uri” and use that as a key to append to the following link: <a href="http://lda.data.parliament.uk/commonsdivisions/id/">http://lda.data.parliament.uk/commonsdivisions/id/</a></p><p>Once I’d figured that out, I then scraped the individual voting data. Which looked like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*rJGcwM0F3ZfRweEsmRzWtg.png" /></figure><p>I now had all the information I needed to construct my data set! It’s worth noting here that the choice of file I made to download these sources in was CSV. I had a number of API related issues when trying other formats. However, this did end up working in my favour as the CSV files were denormalised and therefore a lot quicker to process. There was no need to worry about how fields linked up with one another. The obvious trade-off we’re making here is for disk space as well as RAM, but fortunately the data set we’re dealing with is around 1.5GB in its entirety.</p><p>Now that I had the data, I wanted to do some investigations and needed a test case. Given Jo Swinson’s recent election to the leadership of the Liberal Democrats, she seemed to be a great fit. A relatively long sitting and prominent MP, the new leader could make all the statements to the press she wished on her intentions, but when it came to her actual voting record — what would we find?</p><p>My intention here, in agile terms, was to create a <a href="https://en.wikipedia.org/wiki/Spike_(software_development)">spike</a>. I wanted something quick and dirty to establish whether the methodology I’d come up with was feasible or not. I also needed to decide who else I was going to use as a comparison point. I decided that, given Swinson was a party leader, I’d compare her to the other major party leaders and see who she most aligned with — beginning with Theresa May. Given their three years of diametric opposition on Brexit I had assumed that this would highlight a substantial level of disagreement.</p><p>I wrote an algorithm that loaded all of the division voting data into one dataframe. I took a slice of this dataframe, where the voting MP’s name was “Jo Swinson” to represent her voting record. I then took a separate slice for Theresa May and joined the two together where they had both voted on the same topic.</p><p>I could then calculate the two metrics I needed: the amount of times they agreed and the amount of times they disagreed. I also opted to add another metric here called “Weighted Voting Score”. This was a score that summed the agreement/disagreement metrics but also assigned extra weight to represent how full the house was at the time of each vote. This was a way of giving greater credence to votes on important issues.</p><p>For example, if Theresa May voted for a park bench to be named after Stanley Kubrick but Jo Swinson disagreed and nobody else in the commons cared enough to turn up for the vote, then the metrics look like this:</p><pre>╔═══════════════════════╦════════╗<br>║        Metric         ║ Total  ║<br>╠═══════════════════════╬════════╣<br>║ Agreement Score       ║      0 ║<br>║ Disagreement Score    ║      1 ║<br>║ Weighted Voting Score ║ -1.003 ║<br>╚═══════════════════════╩════════╝</pre><p>If they disagreed on a piece of legislation in a full house of commons (with 646 voting members), then the scores would look like this:</p><pre>╔═══════════════════════╦════════╗<br>║        Metric         ║ Total  ║<br>╠═══════════════════════╬════════╣<br>║ Agreement Score       ║      0 ║<br>║ Disagreement Score    ║      1 ║<br>║ Weighted Voting Score ║     -2 ║<br>╚═══════════════════════╩════════╝</pre><p>This gives us a fairer representation and a better insight into their voting record than the raw figures.</p><p>After running these calculations, I was astonished to find that Jo Swinson and Theresa May had far more in common than I had first imagined. Despite being completely opposed to one another for three years on Brexit, I got the following scores:</p><pre>╔═══════════════════════╦════════╗<br>║        Metric         ║ Total  ║<br>╠═══════════════════════╬════════╣<br>║ Agreement Score       ║    912 ║ <br>║ Disagreement Score    ║    291 ║<br>║ Weighted Voting Score ║   1085 ║<br>╚═══════════════════════╩════════╝</pre><p>I then compared her to another significant party leader, Jeremy Corbyn:</p><pre>╔═══════════════════════╦════════╗<br>║        Metric         ║ Total  ║<br>╠═══════════════════════╬════════╣<br>║ Agreement Score       ║    382 ║ <br>║ Disagreement Score    ║    970 ║<br>║ Weighted Voting Score ║  -1070 ║<br>╚═══════════════════════╩════════╝</pre><p>This is when I paused to establish what exactly was going on here. I was unaware of Jo Swinson prior to starting this project but after some reading I established that she played an enthusiastic role in the coalition government of 2010. Strange then that she should be coming out as anti-austerity now. Overcome with righteous indignation, it was at this point that my project took a diversion. My investigative spike had now morphed into a campaign against the re-election of Jo Swinson.</p><p>Stay tuned for part 2 where I begin my surprisingly successful campaign, step into the murky world of Twitter and cobble together my first website.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99d8c48718be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Regressive and Separatist Party?]]></title>
            <link>https://medium.com/@w.heath91/the-regressive-and-separatist-party-b314bd9e462d?source=rss-966cf8ea4f81------2</link>
            <guid isPermaLink="false">https://medium.com/p/b314bd9e462d</guid>
            <dc:creator><![CDATA[East End Chavista]]></dc:creator>
            <pubDate>Thu, 20 Jun 2019 09:23:26 GMT</pubDate>
            <atom:updated>2019-06-20T09:23:26.628Z</atom:updated>
            <content:encoded><![CDATA[<p>Membership of the Conservative Party stood at 124,000 in March 2018, but has since swelled to more than 160,000. This is a tremendous surge of 29% and few doubt that it is being driven by anger over the party’s complete inability to deliver Brexit despite this being a clear manifesto pledge. So important was the pledge, that the word &quot;Brexit&quot; appears in the first page of Theresa May’s manifesto 5 times! Her outright failure to deliver has led to her resignation and triggered a leadership contest.<br><br>For those unfamiliar with the process, the Tory leadership selection methodology consists of continual rounds of voting by MPs wherein the least supported candidates are eliminated one by one. The remaining two are then voted for by the party members. The current front runner by far in this contest is Boris Johnson, who continues to rack up backers with each passing round. Though notoriously inconsistent in his views, Boris is the only candidate to solidly commit to our October 31st leaving date come what may. This has led to enthusiastic backing from hard Brexiteer MPs. Under Boris Johnson’s current proposals, if there’s no deal with the European Union by October 31st then there will be a no deal Brexit.<br><br>However, given that the membership have the final say, it’s worth paying attention to a newly commissioned YouGov poll regarding their feelings on Brexit to gain a clearer picture of what will win their backing and where our country will likely be heading under our new PM.<br><br>According to YouGov, the membership would rather: oversee the dissolution of the United Kingdom, significantly damage the UK economy and destroy their own party rather than not deliver Brexit. In fact, it appears the only thing that they’d let temper their Brexit ambitions is stopping Jeremy Corbyn getting into Number 10. Though deeply saddening, this is wholly unsurprising when you consider the sort of messaging that has been emanating from Conservative party headquarters as well as the right wing press in recent years. There are two fairly standard examples below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*hblnRcdxPogJsLgiuYswXg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*wFbmtTBJ3JdZ-Eyl6P0HFA.jpeg" /></figure><p>We have been treated to relentless smears and lies regarding the leader of the opposition: asserting that he is a threat to national security, that he is an anti-semite and a friend of terrorist organisations. Just the other night we were made to listen to an unhinged outburst from leadership hopeful Michael Gove, stating that Corbyn cares more about the Iranian regime than he does the British working classes. This will surely come as a shock to Corbyn, who proudly identifies as a democratic socialist.<br><br>As well as the hysterical fear mongering around the leader of the opposition, we have had an equally insane normalisation of what most sensible commentators regard as the nuclear option (a.k.a &quot;No Deal&quot;). We have heard the slogan &quot;no deal is better than a bad deal&quot; more times than I can count. If you belong to the right wing, you’d be forgiven for coming away with the impression that tearing up all of our current free trade agreements that we’ve spent countless hours negotiating was a perfectly sound idea and even a clever negotiating tactic.<br><br>It is amidst this utterly toxic environment that the rest of the country is now strapped to a radicalised Tory membership and its &quot;no deal&quot; suicide vest. The only candidate willing to talk them down, Rory Stewart, was eliminated just last night. As a result, we’re now in the unenviable position where Gove (an original leave campaigner) and Hunt, (a former health secretary who presided over nurses going on strike) are seen by the rest of the country as our least worst options.<br><br>In lieu of the membership having a change of heart, we are safe to assume that Boris Johnson will be our next Prime Minister as our most committed Brexiteer and he will be under tremendous pressure from his party to stick to his statements regarding our October 31st leave date.</p><p>Source: <a href="https://yougov.co.uk/topics/politics/articles-reports/2019/06/18/most-conservative-members-would-see-party-destroye">https://yougov.co.uk/topics/politics/articles-reports/2019/06/18/most-conservative-members-would-see-party-destroye</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b314bd9e462d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>