A short walk around Vote Leave’s software VICS

The campaign which won last year’s referendum for the UK to leave the European Union immediately dissolved, and in the process kindly open sourced some of its innovative canvassing software VICS – blog post, github repository.

This afternoon, prompted by a chat with Incubator of Change (a Liverpool based think tank working on new ideas for how to develop policies), I took a quick look at the code. Rather than lose what I learnt, I’m just throwing it up in this blog post.

This post is not meant to be a detailed or accurate account of the software, just an hour spent quickly scanning it. Pleases correct errors or add links to better analyses of it in the comments!

According to the blog post linked to above, the features Vote Leave needed that weren’t in existing software – and meant they had to make their own – were:

  1. Live canvassing. I think this means it is a modern web based application, updating in real-time with new data and analytics. This requires a nice web interface and a permissions system for all the canvassers and local organisers to only have access to update or read data they need.
  2. Sophisticated modelling – done by proper physicists who know what they’re doing, using machine learning. This was used to inform all sorts of things. e.g. content of leaflets sent to every household
  3. Facebook adverts – targeted in detail in a sophisticated way. They bought over a billion digital adverts.

VICS isn’t a complete system. e.g. I’ve just checked, and it has nothing for generating Facebook adverts. I think VICS is just the core data entry and permissions system – i.e. the “Live canvassing part”.

The actual voting intention data is stored in another system (PAF) we don’t have the code to – as is the stuff that does machine learning and the stuff that does social media adverts. I could be wrong, this is just first pass looking at the code.

Nevertheless, this dump lets you learn a reasonable amount about their software and process. Below are some files to look at – even if you’re not technical, do click through. I’ve tried to choose ones you can learn something from anyway!

tools/db/create.sql – the schema for their database as to what is stored in VICS. It just has wards, constituencies and users (as in canvassers etc) with permissions for what they can access. No voter data.

paf-client/src/main/java/com/infinityworks/pafclient/PafClient.java – the functions for calling what they call “PAF”, their core API, which itself is not in this code dump. PAF is where the actual voter and intention data is stored. It’s a fairly basic API for getting lists of streets, voters in streets, and storing voting intention and other data about voters.

paf-stub/src/main/resources/json/paf-voter.json – this is a fake version of the upstream API for use in testing. This file is an example stub voter – it’s useful as it lets you see the data PAF contains about a voter. As you can see it is fairly straightforward, what you’d expect in this app. Note e.g. “wants_postal” (postal voting), “lift” (to the polling station), “intention” (how they intend to vote) etc. And “issues” being “cost”, “sovereignty”, “border” (key 3 issues for Vote Leave in the campaign). Plus “volunteer” – they used this to capture new volunteers. And, of course, contact by canvasser history. Oh yes, and this test voter has, amusingly, a French name – John Deaux.

web-client/app/views – HTML templates to let you see what each screen of the end user application contained. Maps of constituents, canvassing input forms, get out the vote (gotv) and so on.

web-server/src/main/resources/pdf/canvass_cover.pdf – hand made cover sheet for canvassers, telling them how to canvas.

web-server/src/main/java/com/infinityworks/webapp/clients/pdfserver/PdfClient.java – this code makes three PDFs for printing, by calling another API. They are for 1) canvassing, 2) get out the vote, 3) labels to get out the postal vote (links are to the forms for choosing the streets and so on).

web-server/src/main/java/com/infinityworks/webapp/rest/dto/LeaderboardStatsResponse.java – there’s a leaderboard of the best canvassers, wards and constituencies. I know from running various crowd sourcing efforts at mySociety that such league tables can be catnip for the best performing individuals.

Please do leave comments with other interesting things about this software you spot, or links to better blog posts or analyses of it.

3 thoughts on “A short walk around Vote Leave’s software VICS

    1. Yes! I wonder if that component has that name because they started out making it by loading all the postcodes into a database, and the name just stuck when they put the voters and their intentions in the same component.

Leave a Reply

Your email address will not be published.