Covid-19 Resource Center

Understand how consumers are responding.


Published February 18th 2020

Brandwatch Qriously Releases Code and Raw Data Behind UK General Election 2019 Prediction

Get excited, data fans! Now anyone can access and analyze Brandwatch Qriously’s General Election 2019 raw data

At Brandwatch Qriously, transparency has always been a priority.

As members of the British Polling Council, we release in-depth information about our methodology once survey results are released to the public (you can see our 2019 UK General Election release here and see how close we got to the final result in this article). And we’ve worked to exceed these requirements, for example by releasing an in-depth guide to our sampling methods.

This time, we’ve decided to go a step further.

We’re releasing the code and raw data behind our successful 2019 UK General Election prediction to Github.

This means that anyone can create their own splits in the data, learn how scientific polling is done, and draw their own conclusions about why the public voted as they did.

Why is this useful?

The 2019 General Election was historic not only in giving Boris Johnson the majority he needed to ensure the UK’s departure from the EU, but also in the scale of the Conservative win.

While Brandwatch Qriously and other pollsters have released analysis about why people voted as they did, access to this data allows anyone to come to their own conclusions, based on their own research.

Crucially, our poll included questions about a wide range of different issues, such as how the respondent voted in the past, what issues are important to them, and leadership preferences.

We also asked a number of demographic questions so, for example, you could look at perceptions about the importance of immigration by employment status, or political interest by party support.

What’s more, the code is released with an open source licence, and the data with a highly permissive licence, giving you the freedom to share and adapt the data, as well as produce your own work with it.

We also hope that even people without a specific interest in understanding the 2019 General Election results could use this as a way of learning about survey methods.

How to get the Brandwatch Qriously UK 2019 General Election data and code

All the code and data can be downloaded from the public Github repo here.

An important thing to note is that, while we provide code, you don’t have to use it. If you prefer, you can open up our data in a program of your choice (such as SPSS, Stata, or Excel). The repo contains a brief file with further information.

The Python code provided is a very stripped down version of our actual prediction, so someone with basic Python experience should be able to run it, and play around themselves quite easily.

We hope you enjoy playing with the data, and we’d love to know how you get on in the comment section below.

Share this post
Search the blog
Covid-19 Resource Center

Get access to free expert-built dashboards, daily email bulletins, unique reports and more to help you understand how consumer are responding.

Access insights
facets Created with Sketch.
facets-bottom Created with Sketch.
Question real people


What question would you ask two billion people? With Brandwatch Qriously, you can survey billions across the globe, instantly.

We value your privacy

We use cookies to improve your experience and give you personalized content. Do you agree to our cookie policy?

More info.

By using our site you agree to our use of cookies

Crimson Hexagon has merged with Brandwatch. You’re in the right place!

From May 8th, all Crimson Hexagon products are now on the Brandwatch website. You’ll find them under ‘Products’ in the navigation. If you’re an existing customer and you want to know more, your account manager will be happy to help.