Social Media and Politics: Predicting the French elections from Facebook posts

Tried to predict the French elections from Facebook posts

After what happened last November in the United States election it’s not possible to neglect that Social Media had a huge role in the way people perceive the message and interacted with the candidates.

We also know what problems came with this and Fake News is still a topic Facebook is struggling to control, but putting aside the quality of the information shared, can we predict the outcome of an election by looking at the performance of the posts on Facebook from a candidate? How much of a representation of a belief is a Facebook like, share or comment?

Looking back: How it looked like with Trump vs Clinton

It’s easier to speak after it happened, but it’s still totally relevant to check the performance of the posts on the 3 precedent months prior to the day of the US election (November 8th).

If we take a look at Social Bakers, we can’t see the amount of page fans 3 months prior to the election but we can see that at the date of the voting and Trump was already much ahead of Clinton. One reason for this is that Hillary’s page was much more recent while Trump was already using it from a long time to promote his activities and TV Shows.

On the day of the election, Clinton had around 3.5M page fans coming from the United States and Trump around 8M, a huge difference in audience size. If we close down the filter and check fans for the whole world, they’re closer but Trump still takes the lead by around 4M. First conclusion: Trump had a much bigger audience in the US than Hillary.

A different view on Posts

Posts, however, are possible to be retrieved retroactively using Facebook API, which means we can analyse the performance from the 3 months prior to the election day (Aug-08 to Nov-08).

Total posts published is very close between the two: 826 (AVG 9.17/day) for Donald Trump and 864 (AVG 9.6/day) for Hillary Clinton.

The data gets interesting when we take a look at Post Engagement:

On the graph above, we have a plot of the Average Engagement Rate* of a post and we can clearly see that Donald Trump’s audience was much more engaged than Hillary’s that seem to have waken up in the last few days of the campaign.

We can take a few conclusions out of here:

  • Donald Trump’s Facebook audience was much more US centered, something that turned out to be true in the real world too. Hillary had a lot of support from other parts of the world, mainly Europe
  • Hillary was only capable of really show engagement in the last week of the campaign because up until then, her message was having roughly half of the engagement when compared with her direct opponent
  • Donald Trump’s message was reasoning much more with the voters on Facebook. Data shows its posts constantly had an advantage on the amount of shares / 1000 page fans

From US to France – what we can learn from last November

It became clear in the US that Donald Trump’s message was much more in line with the voters opinions and that resulted in an higher Engagement Rate that only continued to climb, so it only make sense to search for the same trends in the French election.

First, a look at the audience sizes, as of last 30 days:

Marine Le Pen, like Donald Trump, has been using Facebook for a long time and was able to grow her audience to a decent size. Jean-Luc Mélenchon, takes the 2nd place and has been growing very strongly: 16% in the last 30 days while Le Pen only grew 2%. Benoît Hamon has the smallest audience of all.

Now let’s see look at engagement:

A few notes on the graph:

  • It’s easier for smaller pages to have higher engagement rates because the supporters are much more concentrated
  • It’s impressive the rate at which Mélenchon is gaining audience and engagement with already such a big quantity of page fans
  • François Fillon’s engagement is reducing hard in what seems to be at cost of Mélenchon’s success
  • Emmanuel Macron’s campaign is struggling to pass the message at the same rate as before on what also seems to be at cost of Mélenchon’s improvement
  • Marine Le Pen was not able to transform an older and bigger audience into engagement like Donald Trump did and it’s clearly the least engaging page of the lot

If post Reactions and Comments don’t always equal a user agreeing with the message, the Share is seen as a measure of amplification of the post because only the followers supporting the message should do it. Let’s look at the amount of Post Shares per 1000 fans of the page for the top 4 candidates:

The data on shares look similar to the Engagement, but it clearly shows an accentuation of the amplification momentum Mélenchon got himself into.

With around 3.5 shares / 1000 fans and with the 2nd biggest audience, his performance is only expected to increase until the day of the election.

In the other sense, what about Angry reactions? luckily we have data for that too.

Angry reactions are a tricky metric because people can be angry at the message or at the messenger, but I believe this graph has a few good takeaways: Macron’s message is so moderate that almost doesn’t generate hate, Mélenchon has been generating less hate in the past 2 months and Le Pen has the gift of firing up an audience after a post directly citing Macron and about Radical Islam published on the 14th of April generated the biggest amount of hate of the whole campaign: +14k “angry’s”.

After looking at the data, here’s some predictions and a long shot:

  • Mélenchon to beat Fillon on the 1st round
  • Fillon’s performance is surprising knowing the scandals he has been through on the last few months. This shows his audience is likely supporting him because of the party tradition (largest center-right political party) and it’s the reason why his engagement is good but the audience is not growing like the others. His engagement will continue to decrease on the last week of campaign
  • Macron’s message is not reasoning particularly well but it’s a characteristic of his moderated message. Together with Mélenchon, they should be the natural decision for the undecided voters
  • Marine Le Pen will not win the election on the 2nd round and judging by the data (and some polls confirm this trend), she’s risking not going past next Sunday – unlike Donald Trump or Brexit, we shouldn’t see a surprise in France this year. Yet.
  • If Social Media represented the French society, Mélenchon would be president

At this point the election is going to be decided between Mélenchon, Macron and Le Pen, in what is surprisingly a very tight race to the Elysée.

Long shot: Marine Le Pen doesn’t go through Sunday and Macron to face Mélenchon on the 2nd round

Note: Take this data with a pinch of salt because there are key factors not being taken in consideration like the nature of Le Pen’s supporters or the fact that Fillon’s party is quite big.


Report was built with public available data from Social Bakers and Facebook API.

Engagement Rate: (Likes + Comments + Shares) / Page Fans at the date of the post. Because Facebook doesn’t provide the Page Fans retroactively, the number is a rough calculation based on the trend of the last few weeks