Lionel Messi : The Goal Machine

Maxime Bataille
Sports Data Analytics
5 min readJan 30, 2020

Statsbomb recently opened its data on Lionel Messi and his performances from the 2004/2005 season to the 2018–2019 season in La Liga championship. They have done double duty by delivering the Statsbombpy package, allowing data scientists who are passionate about football to now work with R and/or Python. Here’s the Github link https://github.com/statsbomb/statsbombpy

The Jupyter Notebook that allowed this analysis can be found on Gitlab : https://gitlab.com/bataillema/messi-analysis-with-statsbomb/blob/master/Messi_goal_machine.ipynb

After a first opus devoted to Messi’s positioning, this second article will analyse Lionel Messi’s unrivalled goalscoring qualities. You can find the first article here: https://medium.com/@bataillema/how-messi-was-able-to-evolve-to-get-out-of-pressing-ea835

A top goalscorer

The 2011-2012 season was a record-breaking one for Lionel Messi. He scored 50 goals and 16 assists in 37 appearances, in a frenetic race with Cristiano Ronaldo scoring 48 goals. Above all, these 15 seasons at the top level have been exceptionally consistent.

Fig 1 : Goals per season (from 2004–2005 to 2018–2019)

Lionel Messi scored more than 20 goals in 11 consecutive seasons, including 8 seasons with more than 30 goals. This exceptional talent was at its peak during the 2011–2012 and 2012–2013 seasons, under the commands of Pep Guardiola and Tito Vilanova (Fig 1).

It is interesting to note that its number of goals is roughly correlated with the number of shots attempted (Fig 2).

Fig 2 : Shots per season (from 2004–2005 to 2018–2019)
Fig 3 : Goals per shots per season (from 2004–2005 to 2018–2019)

The graph above (Fig 3) allows us to see that Messi converts on average 20% of its shots. This conversion rate reached nearly 30% during the 2012–2013 season with Vilanova. That underlines the quality of Barça’s play in this season. Messi was in simpler positions to adjust his shots, … or he improved his finishing, which we’ll see in the rest of this article.

Fig 4: Goals per minute per season (from 2004–2005 to 2018–2019)

On average, we can see that Lionel Messi scores about every 80 minutes. Once again, the 2012–2013 season was exceptional with a goal every 50 minutes. In other words, Barça were practically guaranteed to score almost 2 goals per game thanks to just one of their players.

Why Messi should have scored more than 50 goals in 2011–2012 ?

The number of goals over those 15 seasons alone cannot explain why Lionel Messi is an incredible finisher. You have to look at the number of Expected Goals (Xg) he generates.

For the uninitiated, the Xg is a unit of measurement to quantify the probability of a shot being converted into goals. The more a shot is made in a complicated position and in an unfavourable environment (e.g. many opponents), the lower the probability that the shot will be converted into a goal. On the contrary, a shot close to the goal without a goalkeeper will have an Xg close to 1. You can find more information by following this link : https://fbref.com/en/expected-goals-model-explained/

Fig 5 : Goals per Xg per season (from 2004–2005 to 2018–2019)

The graph above (Fig 5) describes the number of goals per Xg. By being well above 1 during most seasons, Messi proves he is an above average finisher. This indicator also shows when a player is over-performing. On average, this ratio is 1.29 since the beginning of his career. The variance is 0.23. It is therefore certain that this was the case of Lionel Messi during the 2012–2013 season. His ratio of goals per Expected Goal was 1.87, well above the range between the average and the variance.

This study is an opportunity to introduce a metric to quantify the degree of overperformance (or underperformance) of a player during a season. The aim is to compare the ratio of goals per Expected Goal for a given season to the average of this ratio in previous seasons. This metric is potentially very useful in order to recruit or not players who over-perform (or under-perform). Here is the proposed formula:

Figure 6 below shows the degree of overperformance (or underperformance when the metric is negative).

Fig 6 : Performance degree from 2004/2005 to 2018/2019 with formula 1

Logically, no data are available for the 2004/2005 season due to lack of history. This metric confirms us that the 2012/2013 season was marked by Messi’s overperformance. On the contrary, the other seasons have not been marked by big over or underperformances from the player.

The same formula can also be used by using a Goal per Xg average over the entire career. In this way, we can better observe whether a remarkable season was actually subject to overperformance if the player confirms his level in subsequent years. The following formula is used:

Fig 7: Performance degree from 2004/2005 to 2018/2019 with formula 2

It is noticeable that this second metric remains broadly the same as the previous one throughout Messi’s career. However, it can be noted that this fabulous 2011/2012 season with 50 goals is considered a slight underperformance when his entire career is taken into account (Fig 7).

--

--