End of the Regression Line

The Economist graph correctly shows Remain ahead of Leave, after the referendum. (Image: The Economist)

In short

No leap for Leave: Looking at pre-referendum polling averages, there was no leap to Leave in June 2016.
Before and After: A continuous regression line runs the risk that the line’s position before the referendum date will be affected by data points afterwards.
Graphical transparency: The failure to replicate shows the importance of data visualisation teams sharing their scripts or snippets.

Polling before the referendum

The Economist’s graph seeks to show that polls conducted after the referendum now show Remain ahead of Leave.

The final six polls showed Remain at 52%. (Image: What UK Thinks EU)

A replication attempt

Drawing data from the What UK Thinks EU website, I attempted to replicate The Economist’s graph using R Studio Cloud. I used a Loess regression curve, which seeks to guide a signal through the noise of a scatter plot.

Decisions and Transparency

As we can see, I have made multiple choices of how to show the intended graph of EU referendum polling data, both before and after 23rd June 2016.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store