For the uninitiated, squad age profiles are scatter plots that highlight the distribution of a squad’s age and share of total minutes played. The goal of these charts is to assess whether teams rely on players past their prime, whether they focus on youth, or on players who are in their peak years (~24 to 29).
These charts have been around for a few years now and a quick look around analytics twitter will show a couple of examples.
I had tweeted Tom to ask about running these charts showing the difference in minute share from a player’s first season at a club compared to this season, but decided to have a go at it myself, which we’ll run through now.
For this tutorial, we’ll be using data
scraped obtained from Soccerway. There’s no point in going through multiple seasons of f24 and f7 datasets when we can get the summed info from a couple of lines of code. Please be aware that scraping is a grey area, different providers have differing tolerance levels, and I – a coward unwilling to anger the footballing gods – will not be providing any code used for scraping.
I mainly wanted to experiment to see how this would look. In my opinion it’s probably a bit too busy with the lines showing change in minutes. If you want to create this viz but keep the line for this season’s minutes, you just need to change the first y value in the ax.plot loop to the variable for this season (mins_perc).