I finally had some time to play around with the free Statsbomb data. I previously wanted to look into using the crosstalk package to link interactive charts and this data set which includes all of Messi’s La Liga free kicks gave me a good excuse.
The initial idea was to link the location of free kicks to their goal impact (or their impact outside of the goal as long as they are not blocked). At a later stage I also added Statsbomb’s freeze frame information into the dashboard which allows you to see the location of the goalkeeper and set-ups of the defending and attacking teams (notably were the wall is located).
Since the freeze frame information only really makes sense if a single free kick is highlighted I added a short text summary in case multiple events are selected. It highlights how many off the selected free kicks resulted in goals, were saved, blocked or off target. As Statsbomb provides xG data we can check if Messi outperformed the model for this selection.
Crosstalk not only allows you to link charts with each other but also charts and tables. The table in the bottom left automatically filters when events are selected but also works the other way around: we can for example also filter the table for all free kicks against Iker Casillas and then highlight the respective locations and impacts in the charts above.
The underlying code is available on Github
It should work out of the box without too many adjustments with other free data from Statsbomb.