Motivation#
As part of the Soccer Analytics course at ETH Zurich, we received many Women’s EURO qualifier matches of SkillCorner tracking data, containing the positions of players and the ball 10 times per second. Further, we received a Python notebook containing code to parse and visualize this tracking data. However, rendering a 10 second 2D animation of positions required multiple minutes of processing, which tested my patience more than three back-to-back unskippable YouTube ads for things I’ll never buy. Thus, I decided to try to implement my own approach that allows me to inspect football tracking data in real-time.

Implementation#
The viewer is implemented in Unity 6. For every match that I want to be able to visualize, I pre-processed the following data from our given JSON tracking and event data:
- Metadata: Team names, jersey colors and pitch size
- Lineup: Includes all participating players, their numbers and other information about them
- Set Piece Events: As our team’s task was to analyze set pieces, this includes time-stamped throw-ins, goal kicks, free kicks and corners. Each set piece further contains which team and player performed it, how long the associated possession lasted and whether it was accurate.
- Tracking Data: Includes the position of every player (2D) and the ball (3D), ten times per second.
The code for replay is pretty straightforward, and quite similar to what I had to implement for my Bachelor’s Thesis for recording virtual reality trainings. In a nutshell, we instantiate an object for every player and the ball, then update each according to the tracking data. As our viewer likely runs at a higher framerate (say 60 FPS) than the tracking data (10 FPS), we further need to interpolate between the two closest positions for a smoother replay. Applying some smoothing to the tracking data would also be beneficial, though this is not currently implemented.
Functionality#
The viewer features a free-fly camera that allows replaying a match with arbitrary viewpoints. It also includes common replay functionality such as seeking to a specific timestamp and manipulating playback speed. For our project, this proved quite useful for analyzing key moments (e.g. the Danish kick-off strategy), providing better angles than the livestream and making it easier to identify players who were hard to spot on video.

Another thing I built into the viewer is the ability to replay the trajectories of all set pieces of a certain type (e.g. corners), for a single game or even across matches. This is possible by combining the Wyscout event data with the Skillcorner data and leads to some pretty cool animations that can reveal many patterns that football teams may apply. A set piece trajectory gets hidden when the possession ends, meaning that e.g. for goal kicks it gives an immediate overview of which strategies lead to sustained possession or quick turnovers. Unfortunately, I cannot share these animations here, as they rely on private data from the Women’s EURO qualifier matches.
Try It Yourself#
If you have some Skillcorner tracking data, and potentially even fitting Wyscout event data, you can get the viewer on GitHub. After you preprocessed the data into the specified format, the viewer features the ability to set a custom data path in its start screen.
But even if you don’t have your own data, you can still explore the replay functionality using 9 matches from the publicly available SkillCorner dataset, either locally or in this WebGL build on itch.io. This sample includes league matches from the 2019/2020 season between the champions and runners-up in the Premier League, Ligue 1, La Liga, Serie A, and Bundesliga. Unfortunately, the data quality is worse compared to the private, more recent datasets we had access to. Also, I did not find open event data for these matches, so you cannot use the set piece inspection feature. Let me know if you know of any more recent and complete open data I could include!
Extension Ideas#
With Unity’s great built-in XR support, making the viewer even more immersive was a simple task. However, standing on a football pitch with magically moving capsules wasn’t exactly the most compelling experience for me. I’d love to revisit this project for XR support once I can get my hands on skeletal tracking data with fitted body models. For example, the WorldPose dataset from ETH’s AIT Lab:
With this data, the only thing missing for a fully immersive virtual football experience would be realistic textures, but I’m sure the magic of Gaussian Splatting & Co. will (or perhaps already does) come in handy here.