June 01, 2020ML
Existing Options to Track Football Games
First, you can use any activity tracker like a Garmin watch, a Fitbit or an Apple Watch to track you football game as any other outdoor activity. But the issue is that applications like Strava do not support football specifically. You can still use Strava to track your activity around games like the Football for Fathers club does, and you can certainly track your games as well this way. But the stats will be running stats, not football specific (e.g. no top speed, no sprint distance ...).
Others have felt the same frustration. In Laces Out, Pierre Delarroqua explains how he analyses his data. Out of this, he built a free webapp where you can connect with Strava and get the same plots. Unfortunately some functionality seems broken.
If like me, you remain unsatisfied with those options, follow along.
What Football do I play
At OneFootball we are not all football aficionados but for those of us who want to, we can play quite a bit of football. We play in the mornings for fun and we play in 2 leagues in the evenings, competing against other companies.
My favorite one is the Medienliga where we compete against other media companies, currently in the second division. Here is the summary of the last game.
Medienliga / 2. Liga / 5. Spieltag - Monday Sep 23, Prenzlauer Berg
The reporters came in late and missed the first 10 minutes of the 19:15 Medienliga game between Media:net and OneFootball. The blues (Media:net) are sitting in the 7th place of the table while the greens (OneFootball) were sitting at the 5th and hoping to climb.
OneFootball being the best attack of the table with 4.5 goals per game, the reporters should have known that coming late to the stadium would mean missing goals and eventually picking up the game at the 10' minute with 0-1 OneFootball.
Unfortunately, the next 15 minutes would prove to be a struggle: at 13' an own goal brings the blues back at 1-1, at 23' a defensive error leaves the Media:net striker free to arm a volley and score 2-1. These 2 goals came in "contre le cours du jeu" (against the odds) as in the 5 minutes before that the attacking duo @Alessandro and @Jack were having 2 good chances.
Fast forward to the second half, and 49' minute when @dominik has to leave his partners, injured, leaving them worried. The ambulance can be heard in the background. The medics come in but it turns out that the ambulance is in fact coming for a player from Media:net. Taking advantage of the confusion, media:net scores 1-3, in an attempt that was not really seen by the reporters.
Only 4 minutes later (53') @dbrown subs in and speeds forward. He makes a beautiful cross to @Alexis who arms a volley and scores 3-2. At that point, with 7 minutes to go, hopes were high.
But in a last counter attack (56') that embodied the game - the blues defending really far back, playing a long ball on their striker and taking their chances - the hopes vanished and the score went up to 4-2.
After the game, players were avoiding the mixed zone, and only @Dani came forward "I think we need some data to analyze our performance; I can't say what happened without a Tableau dashboard."
How I Track and Visualise my Football Games with Strava
I track my games using my activity tracker and Strava. I can download the GPX file from Strava and then analyse it using python.
The only manual input was to annotate the corners of the big pitch in the Mauerpark. I then derive the small pitch location (orange) and the goal posts location (target markers) automatically. I also detect when the warm up ends to make sure I visualise only my game (the blue dot).
Here is the visualisation of our March 9th game (just before confinement):
OneFootball 3 - 1 Exozet.
On top of those nice visualisations, my idea is to also extract football specific stats from this data.
For example, I want to use Bayesian Statistics (a Hidden Markov Model) to automatically tag
offensive and defensive sprints you do as player. You could have 3 states: sprinting towards
the opponent goal (=
attacking), sprinting towards your own goal (=
defending), or not sprinting (=
The nice thing with bayesian statistics is that they wouldn't require as many games for training as supervised learning would.
On the other hand, instead of data labelling, you have to do a thorough modelling
and I still need to think more about how I would model this.
Other than stats, we can also generate more football heatmaps using python. And lastly, you could compare your metrics (distance, top speed, sprint distance, power) to your teammates who independently who have tracked their games on Strava too.
If you're interested by this project, let me know on twitter @louis_guitton.