/danish-polls

A collection of the latest political Danish opinion polls from the last election towards the next

MIT LicenseMIT

Danish Polls

MIT-license badge Download link

Opinion-poll chart

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

Table Excerpt

Polling Firm Date V A O B F Ø I C K Lead Red (A+B+F+Ø) Blue (V+O+I+C+K)
Voxmeter 9/14/2014 25.9 22.7 17.7 7.2 7.2 8.3 5.3 4.8 0.4 3.2 45.4 54.1
Gallup 9/11/2014 22.5 21.7 18.5 9.1 6.2 9.8 6.2 5.2 0.4 0.8 46.8 52.8
Wilke 9/7/2014 24.4 22.4 18.9 8.7 7.2 7.9 4.5 5.0 1.0 2.0 46.2 53.8

Table Legend

Column(s) Description Value Type
Polling Firm Firm behind the opinion poll. Text
Date Date of opinion poll. Date: MM/DD/YY/%m/%d/%Y
V, O, I, C, K Parties in right (“blue”) coalition. (Provided.) Per cent: 0.0–100.0
A, B, F, Ø Parties in left (“red”) coalition. (Provided.) -
Lead Difference between the two biggest parties. (Manually calculated.) -
Red (A+B+F+Ø) Total of party vote share in red coalition. (Provided.) -
Blue (V+O+I+C+K) Total of party vote share in blue coalition. (Provided.) -

Displaying the Data with D3

I am still trying to figure out how to plot a LOESS trendline in JavaScript with science.js to finish up my Party Trend chart, so any help towards achieving that would be appreciated immensely.

You can see the status of the fancy chart at the top of this project page.

Additional Polling Data

all-polls.csv

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 all-polls.csv.

2011-Election Data

To find out more, go to its folder.

Spreadsheet Data

As mentioned, the data was retrieved from the wiki with the latest Danish opinion polling—which I contributed to myself—collated using various poll aggregators. The wiki data is then imported using Google Docs. For more on how I did that, see this guide.

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

  1. Remove header separator (,,,).
  2. Put all headers on one line.
  3. Remove all footnotes ([1], [2], etc.).
  4. Fix the non-2014 year dates shown as 2014.
  5. Remove all year separator lines (2014,,,).
  6. Remove the line with the EP election.
  7. (Optional: Remove all YouGov polls.)

To-Do List

Visit the project’s issue tracker to follow its status and development. There is still much to be done.

Sibling Projects