Updating the data on the relevant wiki is becoming a royal pain, so I might as well update the polling data here, in a CSV file. This will also speed up the process of updating interactive graphics reliant on the data.
- View and inspect the data here.
- Download the project as a compressed file here.
- Get the raw CSV here.
More polls can be found using this collection of polls.
Because manually entering data inevitably results in human errors, I have created a basic test script that detects inconsistencies in how the individual values match calculations based on those figures. The findings of this script that have not been addressed are available in the
INCONSISTENCIES.md file, available here.
Understanding the Data
|Polling Firm||Date||V||A||O||B||F||Ø||I||C||K||Å||Lead||Red (A+B+F+Ø+Å)||Blue (V+O+I+C+K)|
|Polling Firm||Firm behind the opinion poll.||Text|
|Date||Date of opinion poll.||Date:
|V, O, I, C, K||Parties in right (“blue”) coalition. (Provided.)||Per cent,
|A, B, F, Ø, Å||Parties in left (“red”) coalition. (Provided.)||Per cent,
|Lead||Difference between the two biggest parties. (Manually calculated.)||Per cent: 0.0–100.0|
|Red (A+B+F+Ø+Å)||Total of party vote share in red coalition. (Provided.)||Per cent: 0.0–100.0|
|Blue (V+O+I+C+K)||Total of party vote share in blue coalition. (Provided.)||Per cent: 0.0–100.0|
Sometimes, the Red/Blue coalition figure is not provided. In that case, I calculate the figure it myself. Some of the provided coalition figures tend to be different than the sum of their parties, because the pollster factor in the parties failing to meet the voting threshold of 2%. I prefer to leave such post-processing outside the scope of the dataset myself for dynamic tools like D3 to compute.
Displaying the Data with D3
You can see the status of the fancy chart at the top of this project page.
Additional Polling Data
Polling companies like YouGov do some dreadful polling, but some people still want to use their data towards their own ends. Because of this, I have included the YouGov data in the file called
$ grep -v YouGov all-polls.csv > data.csv
And, if needed, you can sort it with
$ sort -r -n -t"," -k2.4 -k2.6 -k2.7 -k2.9 -k2.10 all-polls.csv > sorted.csv # And move the header back to the top afterwards
You can probably get away with a general CSV sort, since the date format conforms to the ISO 8601 standard:
$ sort -t"," -r -k2 all-polls.csv > sorted.csv
To find out more, go to its folder.
Getting Opinion-Polling Data from Wikis
That guide does not mention how to clean the sorry raw data you get in Google Spreadsheets, so here are the steps for cleaning the data, after you’ve saved it as, say, a CSV file.
Cleaning Spreadsheet Data
- Remove header separator (
- Put all headers on one line.
- Remove all footnotes (
- Fix the non-2014 year dates shown as 2014.
- Remove all year separator lines (
- Remove the line with the
- (Optional: Remove all YouGov polls.)
Visit the project’s issue tracker to follow its status and development. There is still much to be done.