Using Data Science to show what made Xavi the best playmaker

Abhijeet Gupta
4 min readDec 20, 2020
Xavi vs Real Madrid (2012–13 season)

Xavi Hernandez was the primary central midfielder at FC Barcelona from 1998 to 2015 and Spanish National Team from 2000 to 2014

With Barcelona, Xavi won eight La Liga titles and four UEFA Champions League titles. Xavi was ranked third in the 2009 FIFA World Player of the Year, followed by third place for its successor award, the FIFA Ballon d’Or, in 2010 and 2011. In 2011, he was runner up to Lionel Messi for the UEFA Best Player in Europe Award.

He played an integral role in Spain’s victory at the 2010 FIFA World Cup, as well as their wins at UEFA Euro 2008 and UEFA Euro 2012. He was named Player of the Tournament at UEFA Euro 2008, and was named in the UEFA Euro Team of the Tournament in 2008 and 2012. With two assists in the UEFA Euro 2012 Final, Xavi became the first player to register assists in two separate European finals, after setting up the only goal in the 2008 final versus Germany four years earlier.

He is considered one of the midfielders in footballing history and certainly the best midfielder in the last decade. Some quotes on Xavi include :

“He is the best player in the history of Spanish football.” — Lionel Messi

“If Xavi has a bad day then Barcelona do not play half as well. He is the one that sets the rhythm of the game. His play allows the team to function. He’s different.” — Johan Cruyff

“Xavi changed football. He helped us to build, or to see, a new player profile that ended up running through all levels of the national team. He killed off the myth of physicality being above all else and opened people’s eyes to the qualities of small, technical players, proving that you can attack and also defend with the ball. There are lots of players who win things, but few who lay down concepts, ideas, who change the way we think, and Xavi did that.” — Julen Lopetegui

However, when someone asks for stats to prove Xavi is the best midfielder of the last decade, most of us fall short. This is because in football the stats that are looked at are Goals and Assists.

While goals and assists can be great indicators for a striker, the same can’t be said for a central midfielder. It’s not a central midfielder’s role to score goals for his team. Hence, goals aren’t included in this analysis.

While assists matter to an extent for a midfielder, they again aren’t a true indicator of a central midfielder’s performance as central midfielders more often than not don’t provide the final ball to the strikers. They are responsible for controlling the flow of the game. Assists do matter for an attacking midfielder, however and hence a column for assists has been considered in the analysis.

In this statistical analysis, we look at stats beyond goals and assists which show why Xavi is considered the best midfielder of last decade (and perhaps in history)

The data we use is from whoscored.com. The data contains detailed passing stats from whoscored of 18 players since 2009–10 season

2 of those data points belong to Xavi and Iniesta. 14 are other great midfielders of last decade. One of them midfielder is Ivan Rakitic, who is a former Barca player and Xavi’s successor. Others are current Barca players tasked with playmaking

Now, let us look at the data we are dealing with and then make a few modifications to it as per requirement :

Now, let us look at Stat comparisons per game amongst all the players

This alone shows why Xavi is considered the best. He was the master of passing and controlling the tempo of the match

Not only did he have the patience to circulate the ball again and again, he completed so many of these passes successfully. Moreover, he is the embodiment and engine of Barca’s tiki-taka style of play, as his stats perfectly sum up tiki-taka’s heavy emphasis on passing. Thus, we can say that he was the orchestrator and perhaps the main reason behind Barca’s tiki-taka success from 2009–13 (alongside Messi and Iniesta).

Playmaking stats Visualization using PCA (to visualize 7D data as 2D graph)

Principal Components Analysis (PCA) is a well-known unsupervised dimensionality reduction technique that constructs relevant features/variables through linear (linear PCA) combinations of the original variables (features/columns). The construction of relevant features is achieved by linearly transforming correlated variables into a smaller number of uncorrelated variables.

More details regarding the math behind PCA can be found at : https://towardsdatascience.com/pca-clearly-explained-how-when-why-to-use-it-and-feature-importance-a-guide-in-python-7c274582c37e

Xavi was undoubtedly the best playmaker of his generation. Rivals, teammates and successors all failed to match his level of tempo control.

He was also one of the best final passers to attackers, despite playing in a deeper position than what attacking midfielders usually occupy on the pitch (In terms of final passing, Pirlo’s stats are astounding, as even though he played as a deep lying midfielder, he is one of the best at it, beating the likes of David Silva and Steven Gerrard in that regard)

To sum up the analysis, Xavi has set the bar very high for a playmaker, a level that may or may not be achieved again in football

--

--

Abhijeet Gupta

Business Analyst. Problem Solver. Pythonista. AI/ML enthusiast. Football fan. EDM/Trance music lover. Gamer. Traveler.