Tuesday 5 July 2016

Who is the world cheering for? | UEFA EURO 2016 PREDICTION using Twitter Sentiment Analysis (in R)



    Football, full of emotions is a game driven by passion. Fans are claimed to be the 12th man in the team and very rightfully so. If the fans are behind their teams, their chances of winning are enhanced significantly.

   


    The effect of fans on a team's performance is easily visible in the difference between their home and away form of almost every team. A big misconception is that the fans on the pitch only counts. 

    The players are also human beings, they also feel excitement and pressure. They also goes through a different sets of emotions before any match, much of it coming from the reaction of fans largely from social media.

     The resent google searches for these four National Football teams who have made it to Last 4 have taken a big hike clearly visible in the graph below with the occasional bumps reflecting the international friendlies. Here's a look of the trends in Google searches of the four semifinalists :





      In this article we will make a prediction using a simplistic algorithm on the winner of UEFA EURO 2016. This prediction will be based on the emotions expressed by people on Twitter. 


    


    GERMANY :

    The reigning World Champions and favorites in the books of most odd makers to win the UEFA EURO this time around. Their trademark German efficiency was visible from the word go. Lets see what comes to fans's mind when they think about #GER.




     Here is what the sentiment analysis of the German Football team looks like :




     On a scale of -5 to +5, the tweets can be classified as :






    PORTUGAL :

    This could very well be the last EURO for Ronaldo. Strangely they are yet to win a single game in normal time, but here they find themselves just two steps away from the big trophy. First up will be the Bale and co. in their way who will surely pose a tough challenge. Here's the word cloud for #POR :  




     Here is what the sentiment analysis of the Portuguese Football team looks like :




     On a scale of -5 to +5, the tweets can be classified as :




    FRANCE :

    The hosts are turning on the style. Their big win against Iceland showed their intentions to win EURO on their home soil. The French will surely need some stopping but Germany can also not be taken for granted too. Lets see what comes to fans's mind when they think about #FRA.




     Here is what the sentiment analysis of the French Football team looks like :




     On a scale of -5 to +5, the tweets can be classified as :




    WALES :

    Wales has been the surprise package of this tournament. They must not be taken lightly after their convincing win over Belgium, arguably the strongest side in the tournament on paper atleast. Lets see what comes to fans's mind when they think about #WAL.




     Here is what the sentiment analysis of the German Football team looks like :




     On a scale of -5 to +5, the tweets can be classified as :





     ANALYSIS :

          #Tweets with a +ve/-ve score for each team 




          %Tweets with a +ve/-ve score for each team





     Final Summary






I have considered following to rank order teams :
Criterion 1 :  %positive tweet – %negative tweets
Criterion 2 :  weighted score
Criterion 3 :  Fixture of matches


   FINAL PREDICTIONS :


     As clearly evident from the above analysis, Wales might just have enough to secure a win over France in the UEFA EURO 2016 Final.