Toan Hoang

Tableau QT: Error Margin

On Thursday 12th December the UK had a General Election. On Wednesday 27th November YouGov released its MRP poll which gave a break down of the estimated votes shared by Constituency by Party. These values came with an estimated vote share, high estimate and low estimate, or a an an estimate with an Error Margin. You can find the full report here: https://yougov.co.uk/uk-general-election-2019/

The Guardian also released a list of 50 constituencies where tactical voting could stop the Conservative Party. https://www.theguardian.com/politics/2019/dec/08/tactical-voting-guide-2019-keep-tories-out-remain-voter-general-election

In this quick tip, we will build a data visualization for these 50 Constituencies and show the Party, Estimated Votes, Error Margins, and we will do this in 10 minutes or less.

Data

We will start by loading the follow data into Tableau Desktop / Tableau public.

Worksheet

With our data loaded, we can now look to build our worksheet, yep, we do not need any additional Calculated Fields.

You should see the following:

Now we will add our Error Margins:

You should see the following:

With this done, we will adjust the cosmetics to get our desired visualization:

You will want to end up with the following:

and boom, we are done! I hope you enjoyed this tutorial, and as always, you can find this data visualization on Tableau Public at https://public.tableau.com/profile/toan.hoang#!/vizhome/ErrorMarginCharts/MarginofError

Summary

I hope you all enjoyed this article as much as I enjoyed writing it and as always do share the love. Do let me know if you experienced any issues recreating this Visualization, and as always, please leave a comment below or reach out to me on Twitter @Tableau_Magic. Do also remember to tag me in your work if you use this tutorial.

If you like our work, do consider supporting us on Patreon, and for supporting us, we will give you early access to tutorials, exclusive videos, as well as access to current and future courses on Udemy:

Also, do be sure to check out our various courses:

Exit mobile version