Inspiration
We attempted to develop a program that allows teams to predict where their opposition may pass the ball depending on where the ball is received. This information would allow defenders and midfielders to have an idea of where an opposing player may play the ball next, allowing them to cut off certain passing lines or options that may be a threat. This idea inspired us as this tool has the ability to increase defenders adaptability to their opposition in an analytical way that has not been made available before.
What it does
This tool helps predict the next pass when Player B receives a pass from Player A. The heat map shows which section of the pitch the next pass is most likely to occur.
How we built it
In order to predict how possessions evolve, we first had to define a “possession.” We settled on the following criteria:
- A possession begins with a pass from the controlling team
- Possession is retained so long as there completed events between members of the controlling team, e.g. passes, recovered blocked shots.
- Possession is lost when the opposing team completes a pass.
With a possession defined, we looped through all available seasons of MLS data provided by Opta and marked when each possession started and sequenced the corresponding passes. This data is then brought into an interactive R Shiny application that allows the user to define an “origin” and “destination” quadrant for a pass. The application then provides two heatmaps: one for where the next pass is likely to go and a second with completion percentage. These are currently generated from historical data, however, more in-depth data about defender position could be used to generate models of how the distribution changes with respect to defensive intensity or formation.
Challenges we ran into
We first attempted to develop a program to predict goalkeeper save rate depending on location, however once we were able to clean up and wrangle the data, we realized we did not have all the variables and data that we would need. We would have liked to determine the success rate of goalkeepers based on their starting position compared to where the ball hit the goalmouth, although we had where the goalkeeper was able to make the save or the ball went into the goal, we did not have the location of the goalkeeper when the shot was taken by the opposition.
Accomplishments that we're proud of
Our team is particularly proud of the ease at which any team would be able to use our program to analyze their opponents tendencies if they have their passing data available. This analysis could prove valuable for clubs as they would be able to predict their specific opponent’s style of passing, as our program is not limited to a certain club or formation. The eventual aim for this tool is to be able to predict passing tendencies for any situation, allowing coaches to make more informed decisions than ever before.
What we learned
We learned that there are many factors involved when determining a sequence of passes. We also learned that there are many variables collected which attribute to a pass. Regardless of the amount and quality of data, we discovered that it takes a large amount of time to clean and determine what variables and data points are valuable to our project.
What's next
One of the great things about this tool is that additional filters can be implemented to further enhance the accuracy of the final output. For example, additional data types such as match conditions (visibility, lighting, field quality), user formation, opposition formation, current score, league, team form, and many more relative gameplay-affecting data inputs can be used to hone in on a result more specific to the user’s projected scenario. Teams pass the ball differently based on a variety of factors, and as more data is included in the tool, users will be able to filter the results to match their specific needs. In which situations are opposition players most likely to play a back-pass? How a bout a switch to the corner? How does a waterlogged pitch affect wide distribution or the tendency for defenders to play a ball over the top? All of these questions and more can be answered by including additional, pre-existing Opta data and configuring filters.
Built With
- r
- r-shiny
Log in or sign up for Devpost to join the conversation.