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.

Demographic data are available here.

Additional estimates of the population born outside the UK

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.

g1<-g1+labs(x="Percentage of population born outside the UK, log scale",y="Percentage voting leave")

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.