technology Archive

Liberal Leadership 2013: Popular Vote

April 16th, 2013

The results of the 2013 Liberal leadership race were announced on Sunday. The data the Liberal Party have published now include riding-by-riding specific results, but they aren’t in a particularly convenient format, and don’t include the popular vote.

However, the published data does include both the total votes cast in each riding, and the points for each candidate, and that gives us all we need to calculate the popular vote. (The points for each candidate are that candidate’s percentage of the popular vote. Multiply points by the total valid votes cast in each riding and you have the actual number of votes each candidate received.)

That’s what I’ve done here, en mass. I used some automated scripting to pull all the results for each riding from the Liberal page, and tabulate it (clicking on each riding would be a little tedious). I then dropped that all into a google spreadsheet that calculates the popular vote.

The results: Trudeau got 78% of the popular vote, and pro-cooperation candidate Joyce Murray (who was almost unknown going into the race) picked up 12%.

Now, for the details (click on any title to load the source google spreadsheet)…

1. Raw data from the Liberal results page, with popular vote calculated

2. Totals of popular vote and points:

3. Interactive Graph of Popular Vote

4. Pivot table, showing popular vote totals by province:

Final thought: if “blank ballot” had actually been a candidate, it would have beaten both Coyne and McCrimmon.

Found this interesting or useful? Leave a comment, and don’t forget to follow @matthewfcarroll and @leadnowca on twitter, and keep up with Leadnow’s work to build a more fair, responsible and democratic Canada on facebook or by signing up online.

PDF Spam

June 20th, 2007

The spam filtering setup on our server is pretty good – SpamAssassin with Bayesian filtering and the FuzzyOCR Plugin which I installed to deal with the rise of image-based spam last year. Still, a few email addresses that route to me are very public, and most days one or two spam messages get through the filters.

This morning I noticed a new phenomenon in my inbox. I almost moved it across into my “missed spam” folder without giving it a second thought (we train our filters with missed spam to improve the Bayesian analysis), but something caught my eye:

PDF Spam

“That’s odd,” I thought, so I opened the pdf. (Note, in general unless you know what you’re doing, it’s a really bad idea to open attachments if you don’t know the sender or weren’t expecting something from them – it could be a virus.)

PDF Spam

That’s right, it’s spam, in a pdf file. While spamassassin does a great job of analysing text, and even images using FuzzyOCR, no analysis is done of pdf attachments, so this one slipped through the net. (I’ve had seven copies of this so far today.)

What next? Well, if this type of spam continues (and there’s no reason to think it won’t) I expect we’ll see a pdf scanning plugin for SpamAssassin before too long. After that gains traction the spammers will undoubtedly adapt again with some new trick to avoid the filters. Rinse, and repeat.

The arms race continues…’s privacy violations

November 29th, 2006

One of the great privacy features now activated by default in Mozilla’s Thunderbird email client (which I thoroughly recommend) is that it blocks loading of remote images in emails. This is a good thing. Why? Well, spammers, fraudsters, and unscrupulous companies mass emailing their customers just love to know for sure whether or not their emails have been read.

One way they can do this is using a tiny image know as a “web bug“. By quietly loading a one-pixel transparent image in the bottom of an email, via a specially crafted URL with a unique identifier, the sender of the email can, with no permission from the recipient, verify that the email has been read, that the email address is valid (this is really bad news if it’s spam, since valid email addresses are valuable and will be sold and spammed even more). It is also possible for the sender to track when the message was read, and where the recipient was at the time they read it, by recording the IP address of the computer the recipient was using at the time.

I’ve become quite accustomed to seeing the alert Thunderbird pops up to tell me that it has blocked remote images to protect my privacy. After all, quite a few companies legitimately add remote images with no tracking capability to emails – for example their logo. So, when clearing through a few unread messages from earlier in the week, I almost didn’t give this a second thought…

Screenshot of the Thunderbird email client blocking a webbug tracking image in an email from

But for some reason I thought “that’s odd” and so I had a look at the html source of the message. To my surprise, this is what I found three lines from the bottom:

<img src="" HEIGHT="1" WIDTH="1">

That’s right, it’s a web bug. (I removed the end of the tracking code.)

The irony of – which do some great work – campaigning to “stop AOL’s email tax“, and “save the internet” whilst at the same time using the exact same invasive methods of email tracking as spammers and fraudsters would be laughable, if it wasn’t so sad. Having worked on numerous campaigns and digital organising projects myself, I find the use of email tracking by a progressive campaign quite a despicable abuse of privacy.

If you’re reading this, Eli, I suggest you first of all apologise directly to the 3 million or so members whose trust you have violated, destroy any tracking data you are storing, and most importantly don’t do it again.

Who’s Googling Your Genes?

March 28th, 2006

In their biannual Captain Hook Awards for Biopiracy, the Coalition Against Biopiracy has dubbed Google Inc. Biggest Threat to Genetic Privacy for teaming up with J. Craig Venter to create a searchable online database of all the genes on the planet so that individuals and pharmaceutical companies alike can ‘google’ our genes – one day bringing the tools of biopiracy online.

From the nomination:

Google’s motto, “Don’t be Evil,” may soon take a backseat to a new mission statement unveiled by CEO Eric Schmidt in early March 2006: “We want to be able to store everybody’s information all the time.” Already causing concern over the way it uses (or could use) the vast amount of Google-user information it has collected and stored over the years, the company has now set the sights of its all-seeing eyes even higher. Google’s massive computer power and cutting-edge data-mining capacity make it a logical partner for Craig Venter and his ever-expanding collection of DNA samples taken from humans, animals and microbes living in soil, sea and air.

We Won

March 24th, 2006

The governments assembled at the UN Convention on Biological Diversity meetings in Brazil today reached an agreed to stop the push towards commercialising so called ‘terminator’ (sterile) seeds – a huge victory for the safety of the world’s food supplies:

“This is a momentous day for the 1,4 billion poor people world wide, who depend on farmer saved seeds,” said Francisca Rodriguez of Via Campesina a world wide movement of peasant farmers, “Terminator seeds are a weapon of mass destruction and an assault on our food sovereignty.

Read the full article on

  • Search
  • You are currently browsing the technology archive.

  • Meta

  • Old Browser

    It seems you are using an old web browser (e.g. Internet Explorer 5 or below). This is a security risk to you, since Microsoft no longer releases updates for old versions of Internet Explorer. Also, note that this site is designed to modern internet standards, and the layout may appear strange or plain in older browsers. All the content is still accessible to you, but I strongly recommend you upgrade to a modern, safe, standards-complient browser, such as Firefox. For more information on getting the best experience surfing the web, see