Showing posts with label referendum. Show all posts
Showing posts with label referendum. Show all posts

Thursday, 19 January 2017

Can Y Cardi re-released for President Dukat inaugurization

President Dukat is inaugurized today. The Dukat-Brunt team encourage all citizens of the galaxy to celebrate with this new version of Can Y Cardi (The Cardi Song).









Earth's political crisis continues after the planet voted to leave the United Federation of Planets in a recent referendum.

The Prime Minister of Earth, Tresera June still maintains that the planet will not only press ahead with plans to leave the Federation, but leave the UFP single market. The Romulan government is expecting this may give an opportunity to bring an end to trade sanctions imposed by the Federation after the Romulan annexation of two star systems in the Neutral Zone. This could even lead to the legalisation of Romulan Ale on Earth. However this would mean a hard border with Mars and its dependent asteroid colonies which will be remaining in the Federation, and the possibility of another independence referendum on Luna.

Sunday, 8 January 2017

Dead Parrot - Python in Python



# -*- coding: utf-8 -*-
import sys, time
import imp
imp.reload(sys)
if sys.version_info[0] < 3:
    sys.setdefaultencoding('utf-8')

class Parrot:
    def __init__(self, name):
        """
        initialise Parrot object    
        """
        print("Initialising parrot")
        self.latin = "psitticus"
        self.name = name
        self.isalive = True
        self.latin = self.latin + " {n}".format(n=name.lower()+"us")
        
    def dispatch(self):
        print("dispatching parrot")
        self.isalive = False
        
    def printName(self):
        print("This parrot's name is {n}.".format(n=self.name))
        print("Latin: {l}".format(l=self.latin))
        
    def checkAlive(self):
        if self.isalive:
            print("This parrot is healthy.")
        else:
            print("This is an ex-parrot, it has ceased to be.")
            
if __name__ == "__main__":
    if sys.version_info[0] < 3:
        pname = raw_input("What is the parrot's name? ")
    else:
        pname = input("What is the parrot's name? ")
    parrot = Parrot(pname)
    parrot.printName()
    parrot.checkAlive()
    time.sleep(3)
    parrot.dispatch()
    time.sleep(1)
    parrot.checkAlive()

For more EU referendum humour see my previous posts:
Gul Dukat wins galactic presidential election and
Federation Membership referendum.

Saturday, 12 November 2016

Gul Dukat wins 2374 Galactic Presidential election with Brunt as VP

Campaign poster showing Gul Dukat and Brunt. Background from APOD by Rogelio Bernal Andreo.
The shock victory of Gul Dukat and Liquidator Brunt in the galactic presidential election has left the Federation wondering if Earth will reconsider plans to leave the Federation following the referendum in which the population narrowly voted to do so.
Although it is now eight Earth years since the Earth voted by 52% to 48% to leave the Federation, the President of Earth has not invoked Article 50 of the planet's membership treaty and is in battle over whether she can do so without a vote in the Planetary Assembly. The Earth orbital and lunar colonies strongly voted remain. The First Minister of Luna is advocating an independence referendum and several asteroid colonies are exploring transferring to Martian jurisdiction which has its own Federation membership.

Losing access to the Federation single market would make Earth more vulnerable to economic exploitation by the Ferengi.

The Leave campaign is now widely regarded as overestimating the amount of dilithium contributed to the Federation budget by Earth.


Monday, 27 June 2016

Mapping the result of the EU referendum

Since the results of the UK EU referendum were published, a number of maps have been published of the results across the UK.

I have mapped these in QGIS, with the aid of the OS Boundary Line map of local authority boundaries in Great Britain, and Westminster constituencies in Northern Ireland. Both of these sets of boundaries are available as government open data.

I have used data dependent styling in the maps below, which used the following formula:

case when "pc_leave"  >= 50.0 then color_rgba( 127,0,255, scale_linear( "pc_leave" ,50,80,20,255))
else color_rgba( 255,255,0, scale_linear( "pc_remain" ,50,80,20,255)) end


This makes places that had a majority of votes cast for leave shaded in purple, with transparency varied as the percentage who voted leave rises from 50% to 80%. Similarly remain is shaded in yellow under the same scaling. Unlike in General Elections, where parties generally have an established colour scheme, the EU referendum doesn't have a universally accepted colour scheme. I used purple because UKIP uses purple, and yellow because pro-Remain parties LibDems and SNP use it.

Most of my maps retain the geographic rather than a cartogram representation.  It is a point of open debate which is better, but I also add another alternative, which is to represent the absolute size of the majority by crosses, by placing a point at a random place within each polygon for each 1000 votes of majority. The other difficulty with these kind of maps is the varying impact based on the visual impact of different colours.

With a white background
With SRTM elevation overlaid (because I can).
With a black background.
Using QGIS's random dots feature to represent each 1000 voters of majority abs(leave-remain) with a cross. These are not very visible at this scale.

Crosses to represent each 1000 votes of majority, using random dots in QGIS.

Same as above, but remain is now red, which makes it more visible.
With a black background, going back to purple/yellow.

A cartogram with the QGIS cartogram plugin, sized by votes cast (not electorate) since this was the data more easily to hand.