Jeremy Corbyn in Bedford
Labour leader Jeremy Corbyn attends a Labour Party general election campaign event on May 3, 2017 in Bedford, England Leon Neal/Getty Images

At the start of the 2017 UK general election campaign few pollsters gave Labour leader Jeremy Corbyn much of a chance – the Labour Party was around 17 points behind the Conservatives. However, the leader's strong performance was boosted by young voters flocking to the polls, new data from Ipsos MORI now reveals.

The data gives a detailed picture of how Labour moved from 30% of the vote in 2015 to 40% just two years later. The result was made possible by a strengthening of the party's traditional supporters: voters under 24 years of age, BME voters, and members of the working class.

Another important lesson from the data is that we are moving closer to a two-party system. Both the Conservatives and Labour held 80% of their voters from 2015, a trend not reflected in other parties. The Liberal Democrats retained just 50% of their vote, while 2 in 10 Ukip supporters switched their affiliation to the Conservatives.

General Election 2017: demographic analysis
ibtimes.co.uk

AGE

Corbyn's "For the many, not the few" campaign saw an improvement in support among young voters as well as a boost in youth turnout. In the 18-24 age group, Labour received 62% of the vote, dropping to 56% in the 24-34 age group. This contrasts with them taking just 25% of voters of a pensionable age.

General Election 2017: demographic analysis
ibtimes.co.uk

The swing in voters under 45 saw some unexpected results, such as Canterbury turning Labour for the first time since 1918.

YOUTH

Age divide and age groups played a key role in the 2017 general election.

As shown by the charts above, a decisive number of 18-24 year olds voted for Labour. This influenced the final outcome of the election, despite fears the youth would not convert their online enthusiasm into real-life voting action.

General Election 2017: demographic analysis
ibtimes.co.uk

This helped Labour gain more votes than ever among the young, although there was a slight fall in turnout among voters over the age of 55.

Ipsos MORI data shows an increase in turnout of under-24 voters to 64%. This election saw the highest number of under-35 voters since 1992.

EDUCATION

The level of a voter's education is a significant variable in analysing election data demographics.

General Election 2017: demographic analysis
ibtimes.co.uk

In areas of the country with a low level of degree-attainment, Theresa May boosted her vote base, with a lead of 17% over Labour among voters with no qualifications. This contrasts with graduates, where Labour lead by 15%.

SOCIAL CLASS

Although the Conservative vs Labour dichotomy is traditionally pitched as a battle of the middle class vs the working class, social strata was not the most significant variable in this election. Data shows a narrowing gap in the importance of social standing.

General Election 2017: demographic analysis
ibtimes.co.uk

Among voters in professional and managerial roles, Conservatives maintained a lead. However, Labour increased its influence in the same category by 12% compared to the previous election. In the working, pensioners, and benefits class, Labour initially had a 4 percentage points lead, but this was eclipsed by a 12 percentage points increase for the Conservatives.

ETHNIC GROUPS

Although the Conservatives made some progress among black and minority ethnic (BME) voters under David Cameron, the trend reversed under May. Corbyn attracted non-white voters back to Labour in great numbers.

General Election 2017: demographic analysis
ibtimes.co.uk

GENERAL ELECTION VS BREXIT

Unsurprisingly, Brexit played a major role in how people voted in the General Election. Labour took 66% of all voters who didn't participate in the ballot on Britain's membership of the European Union.

General Election 2017: demographic analysis
ibtimes.co.uk

The Liberal Democrats, who campaigned for a second EU referendum, benefitted from the votes of Remainers.

The Brexit variable saw the Conservatives gain seats in areas with a large number of "Leave" voters, while Labour were backed in "Remain" areas.