Football Sports

Football – Data Models and Predictors


One fine day in the month of June, 2019 I stumbled upon the training sessions of my schools football team. Being a huge admirer of football I was really interested to watch how they go about their routine. After the session, I spoke to one of my friends who is part of the team and asked him about the weekly schedule of the team and what they did in each session. He told me that they usually train 4 days a week. General drills, practicing skills and set-pieces for 3 days and playing a friendly intra-team match on the final day. These were usually practice matches before the school level league kicks off later on in the year. He informed me that the team and the coach were planning to conduct trials in July, 2019 for new and upcoming players in the school who were part of the junior team or had joined the school recently. He also told me that the league would kick-off in August, 2020 so they had to understand each other’s playing styles and incorporate the new players into the team accordingly.

I asked him if choosing the best players from the trials and picking the ideal team to play the season were the most difficult decisions the coach and the team had to make. He responded by saying that they were the most important and difficult decisions that they had to make as their whole season depended on it, and if they didn’t make the right choices they wouldn’t be able to win the league.

This led me to think if there was any way in which I could help them out with the decisions. While I was watching the training session in which they were playing a match I saw that all the records regarding the players (goals, assists, tackles etc.) were being maintained by the coach manually in a notebook. I thought to myself, how difficult it would’ve been to maintain all the data from both league and friendly matches in a notebook. I decided to help the coach to transfer all of the data he had maintained, into a Microsoft Excel file which he could easily update each time a match was played on an iPad or Tab, this made it much easier to manage than before. This was the first step towards a better decision making strategy.

Data from the team’s players’ previous season.

After learning more about the ways the team functions and how the coach makes decisions regarding the team I had an idea in my mind. I requested the coach to let me have access to the data so that I could do my part to help the team, he agreed so I started working on my plan. I figured that I could help coach and the team with finding the best position for each player to play in if I built some sort of tool which took in data for all the players in the matches that they play and returned their perfect position. I could then also choose an ideal team for each match based on the statistics of the players by choosing the best players in each area of the field. This could help the team in numerous ways!


Since I decided to approach this situation from a data point of view, I came to the conclusion that Python would be the ideal programming language to use to deliver the best result. Using Python, I started making the “Player Position Finder” which is a analytical model that helps a football teams manager/coach to find the most appropriate position for a player to play in based of their statistics from the previous season. The players were selected based on their performances in practice matches.

A quick look at the interface that the model begins with.

The model first requests a selected player to enter an area on the field (forward, midfielder, defender, goalkeeper), where he feels he plays the best in. Based on the players response, the model requests the player to enter a few statistics from the latest season they’ve played in, depending on the role that a player would be commonly seen taking in that particular field area. Judging off the data that the player enters the model proceeds to either return a position that the player should play in within that field area if his statistics match the requirements or asks the player to enter a new field area (which the model suggests) along with some more statistics which categorize the field area and then return an appropriate position for the player to play in.

All the results given by this model are on the basis of the average range of statistics of players playing in a particular position. An example is used to explain the idea.

Example : Center Forwards
On averaging out the statistics of a few of the most consistent international players, it was found out that they tend to average more than 20 goals per season and more than 10 assists a season. Also, a majority of them have more goals than assists, so that is taken as an indicator of a center forward. Other indicators include a low number of interceptions and tackles and low defensive statistics.

Center Forward example execution.

Similar to the above example, all other positions in the team have some special indicators, based on which the player is assigned that position, if his stats match up to a large extent. In this way the perfect position for each player to play in a team can be found out.

If you want to check out the model and use it for the benefit of your own team here is the link below!
Player Position Finder Click the link to check it out for yourself!


I thought to myself, now that I have helped the coach and the team figure out which player fits which position the best it is necessary that another model helps the coach and the team understand the playing style of the opponent and choose an ideal team to play for a particular match accordingly.

Since I decided to approach this situation from a player perspective as well as data point of view, I came to the conclusion that Python would be the ideal programming language to use to deliver the best result. Using Python, I started making the “Ideal Team Generator” which is an analytical model that helps a football teams manager/coach to analyse the way they think an opponent team plays (on the counter, defensive, attacking etc.) and then find the ideal team to play in that kind of situation based on the statistics of all the old and new players from the trials in the practice matches.

Working of the Ideal Team Genrator Model.

The model uses the average squad size of 20 with 4 forwards, 7 midfielders and defenders each and 2 goalkeepers. It first requests the forwards to input a number of statistics of theirs from their last season in the league, based on this the model accounts for the weightage of each stat of a forward (goals are worth the most, followed by assists and so on) and assigns the forward with a statistical rating. As most teams generally use the 4-4-2 formation, the model returns the 2 best forwards and adds them to the ideal squad. The same working is followed for all midfielders, defenders and goalkeepers, the only change is that the statistics with the most weightage are changed for each position (assists and passes made are worth more for midfielders, tackles and interceptions for defenders, and goals saved, clean sheets for goalkeepers). Once a team of 11 is formed, an ideal team is displayed. The model also displays some other features such as the most valuable player, the most disciplined players etc.

Example : Goalkeepers
Goalkeepers are judged by the model on the basis of the number of clean sheets kept and number of goal saved. The weightage of their statistics is in that order followed by other categories. The goalkeeper with the higher statistical rating is added to the ideal team and is selected to play for the match unless he is injured or the opponent team doesn’t pose a big challenge. In that case the coach/manager can overrule the decision of the model.

Goalkeeper example execution.

In case a coach/manager decides to play a different formation the players with the highest statistical rating in each area of the field can be chosen accordingly. In a 4-3-3 formation, 3 forwards and midfielders, and 4 defenders with the highest statistical ratings are chosen. The goalkeeper is selected in a similar manner.

If you want to check out the model and use it for the benefit of your own team here is the link below!
Ideal Team Generator Click the link to check it out for yourself!


I explained the working of both the models to the coach and the team, both of them were happy to use the models to their advantage starting from the trials that were to be conducted in July, 2019. The trials process was much simpler and smoother than ever before and the selected players were assigned their positions for the practice matches using the Player Position Predictor model. On the basis of their efforts and performances in the practice matches the Ideal Team Generator model collected all their statistics and came up with an ideal team for league matches which were to start in August, 2020.

The coach seemed much more relieved and relaxed than usual as he had already made all the decisions for the upcoming season well in advance. He wasn’t stressed like the previous years and was much more confident that his team were going to win the title. The team kept training throughout the months of July and August, 2019.

Delhi Public School, R.K. Puram - allsport
An away match the team ended up winning 2-1 (16-03-2020)

The season kicked off and league matches began as scheduled in August, 2020. The team which had prepared well under the coach’s guidance and using the model came up with an ideal team to face their first opponent (away – at opponents school) who had the reputation to be a defensive team. The coach decided to play an attacking team as suggested by the model and they convincingly won 3-0. This form continued till mid-October, 2020 before the season was put on hold due to the school exams and mid-season breaks. Till mid-October, 2020 the team played 14 matches, winning 10 of them and drawing 3 and losing only 1 match due to an unfortunate red card. They were at the top of the table and had the highest goal difference among all teams.

Last 5 Match results:
27th Sep, 2020 : 3-1 win (Home Match)
1st Oct, 2020 : 2-2 draw (Away Match)
8th Oct, 2020 : 1-0 win (Away Match)
11th Oct, 2020: 4-2 win at (Home Match)
16th Oct, 2020: 2-1 win (Away Match)

The coach said that this was a vast improvement on previous seasons and he was glad that the team is performing so well in all kinds of situations. Their goalkeeper had kept the most clean sheets among all the goalkeepers in the league and one of the forwards was the league’s top scorer in 2020. The team’s morale was very high and they looked like they were going to wrap up the title as soon as the league resumes.

This was a great learning experience for me and I am very happy that I could help the team out. I hope the team do really well in the remaining matches (whenever the season resumes) and that they win the title, bringing back the glory days of the school!


How did you like the models and predictors? Were they able to help you and your football team to reach the next level and become a force to reckon with? Feel free to subscribe if you liked this post or just leave a like! You can also leave your suggestions in the comments section below! More on COVID-19 and other events very very shortly! Stay tuned for some very informative stuff! See you soon with new exciting posts!


  1. Well said and analysed! I liked the way the models were accurately able to determine professional players’ positions and choose the best team as well.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: