Introduction

Much of the debate following the referendum on leaving the EU has focused on interpretations of the decision made by the electorate as a whole. It is impossible to know what motivated individual voters. However there may be some interpretable patterns in the results themselves that can be analysed statistically. The votes cast in each local authority are likely to be linked to the specific characteristics of the population. This analysis looks at these general patterns of voting across the country as a function of demography.

Finding the data

Unlike general elections in which votes are declared for constituencies, the votes cast for the referendum were aggregated at the level of local authorities. This provides an opportunity to combine them with demographic data at the same level. So although data is not available on individual voters, the broader patterns can be analysed

The raw data are available here.

http://www.electoralcommission.org.uk/__data/assets/file/0014/212135/EU-referendum-result-data.csv

Demographic data are available here.

https://www.ons.gov.uk/file?uri=/peoplepopulationandcommunity/populationandmigration/populationestimates/datasets/populationestimatesforukenglandandwalesscotlandandnorthernireland/mid2015/ukmye2015.zip

Additional estimates of the population born outside the UK

https://www.ons.gov.uk/peoplepopulationandcommunity/populationandmigration/migrationwithintheuk/datasets/localareamigrationindicatorsunitedkingdom

The reshape library or dplyr can be used to manipulate these data and merge them into a single data set. The code for this is not shown here. However a link is provided to the merged data set that resulted for England uploaded into CartoDB. The map can be queried and the underlying data set itself downloaded for further analysis.

Percentage voting leave UK

Percentage voting leave UK

The influence of migration

A great deal of the controversy regarding the referendum centered around the role of the leave campaign’s focus on immigration as the major issue. If people’s experience of directly losing jobs to immigrants influenced their votes it would be logical to expect a positive relationship between the proportion of the population not born in the UK (who could not vote) and the leave vote at the local authority level.

library(ggplot2)
g0<-ggplot(d,aes(x=pernonuk,y=Pct_Leave))
g1<-g0+geom_point(aes(col=win))+scale_x_log10()+geom_smooth(method=lm)
g1<-g1+labs(x="Percentage of population born outside the UK, log scale",y="Percentage voting leave")
g1

In fact the opposite tendency is observed. There is a lot of scatter around the trend line, but the trend is clearly significant overall. Local authorities with higher resident immigrant populations tended on average to record a lower proportion of votes for leave. This aggregated data however may be confounded by the fact that the authorities with the highest percentage of residents born outside the UK were in London, which overwhelming favoured remain. So the results should also be looked at by region.

g1+facet_wrap("Region")