Once in every 4 years, the world celebrates a festival called “Fifa World Cup” and with that, everything seems to change. Priorities switch to football, and predictions switch to the teams and players that would perform in the tournament. Through the medium of this blog, I am going to predict the “World’s Best Playing XI” in 2018 and I would be using Python for the analytical implementation.

Analyze the Fifa Dataset to predict the World’s Best Playing XI in 2018!!

In my quest to carry out the above mentioned task, I stumbled upon an interesting dataset on Kaggle. I am going to stick with it and use it to predict the strongest 11 players taking part in this world cup 2018. Based on player availability, the best possible lineup is a 4-3-3.Using this dataset, I would be giving you a step by step approach to analyze various characteristics that would help us infer the best players for the World Cup 2018.

So, let’s get started :-)

Let’s start by importing the dataset and the required libraries in Python.

Once you have simplified this data, you can then start with the analysis part. Let us begin with the simplest plot. This graph gives us the number of players representing a particular country. Now, these graphs are best used to gain statistical insights.

Note: The plot generated from the above code will display all the football playing nations, but for the sake of simplicity, I have just displayed the top 28 countries which would give me the desired results.

Using this graph, we conclude that most of the players are from England, Argentina, Spain, France and Brazil. In this case, the graph won’t add a lot of value because we would be picking the best XI, and the results may vary.

Moving ahead with the analysis, you can try out different visualizations with the player’s age, preferred_position, rating, club etc. Let me show you one such visualization and then we’ll switch to our analysis of the best playing XI for the world cup.

plt.figure(figsize=(15,6))
sns.countplot(x="Age",data=df)

It is evident from the above screenshot that the majority of players are between the age of 20 and 29, with the largest peak of 25 years.

Now is the time we try and find the answer to the question put forth in the problem statement: Who will be the World’s Best Playing XI?

Let us begin our analysis. Let us start by considering the following playing formation, 4-3-3. So here, we need to find 4 best defenders, 3 best mid-fielders and 3 best attackers. Let us start our quest by finding a goalkeeper first.

World’s Best Playing XI: Finding The Best Goalkeeper

In order to get the best goalkeeper, I’ll be analyzing the data for the below mentioned parameters:

Shot Stopper: A goalkeeper who is strong in stopping shots taken by opponents.

Sweeper: A goalkeeper who is strong in playing with his feet and making passes.

Also, note that the list of players and the formation is based on my opinion only and you are entitled to have a completely different opinion. So, if you do have a different opinion, do let me know about your best XI in the comment section below.

If you know any other applications or trending technologies in FIFA or sports, in general, do let us know by writing to us in the comments section below. Be sure to subscribe to our blog and stay tuned for more blogs by Edureka. Happy Learning!!