This Sunday, millions of French people will head to their local polling stations to choose their next resident. If it is an exaggeration to say that this election will decide the fate of Europe, it is surely only a small one.

We predict that the majority of voters will give their support to Emmanuel Macron. This forecast is based on what French voters have been reading online over the past three months. It follows the same methodology we used to predict that Macron would win the first round of the election two weeks ago, comparing the aggregate level of interest attracted by each candidate over time.

Our key findings are:

Over the entire election campaign, Macron attracted more attention than Le Pen.

Macron has received more attention online than Marine Le Pen in the two weeks since the first round, when they were competing directly with each other.

While there is no evidence of the clear shift in attention that Le Pen would have needed for a credible chance of victory, Macron’s lead has been eroding slightly since last weekend. This suggests that Le Pen may be having some limited success in closing the gap.

We are therefore confident that Macron will win decisively, but we think that the margin may be significantly smaller than the 20–25% gap predicted by the polls after the first round in April.

As we publish this, news is spreading of a cyber attack on the Macron campaign. We do not believe that this will affect the result.

The level of online interest a candidate attracts proved a good predictor of the number of votes they would garner in the first round of the election. This measure even made it possible to spot trends in public support before they manifested themselves in traditional polls.

To capture the level of interest for each candidate, we looked at tens of thousands of articles published about them by the French media since January. Every hour, we measured how many clicks each article attracted (our dataset has grown to over 2.5 billion data points). We then compared the median level of traffic each candidate received, and published this data in our French Election Tracker.

www.franceelection.com

In order to predict the result of the election, we compared the average level of interest in a candidate over the duration of the entire campaign.

By this measure, Macron outperformed Le Pen just over 60% of the time over the duration of the campaign.

% of time each candidate outperformed the other since 15 January, according to the French Election Tracker.

Crucially, Macron has also attracted more attention than Le Pen after the first round of the election. This is important because Le Pen would need a massive shift in voter support towards her in order to have a chance of victory. Our data does not provide any evidence that this is indeed happening.

Average difference between level of interest attracted by Le Pen and Macron online since 23 April, according to the French Election Tracker. Positive values indicate Macron in the lead.

That being said, over the past week Marine Le Pen has almost closed the gap — though the debate provided some temporary relief to Macron. With a ban on campaign-related news now in place in the French media, the candidates have received approximately the same amount of interest over the course of the run-off period.

We think this may indicate that the result will be narrower than what was predicted just after 23 April, when Macron led by 25 percentage points. Given the substantial lead Macron has enjoyed for three months, however, we think Marine Le Pen would need a much more dramatic movement of attention towards her. As our predictions in round one showed, historical levels of attention matter.