Which players have moved between La Liga clubs?
August 2025
The other day, Yuriko Schumacher published a chart in The Athletic showing the trades that took place between MLB teams. The chart, a kind of heatmap, had something hypnotic about it, so much so that I felt like trying it out to see how it would look with La Liga clubs.
First, a summary of the data:
- Between 2017 and 2024 there were 360 moves between La Liga clubs: 229 were permanent transfers and 131 were loans.
- Getafe is the club that has received the most players, 45, and the one that has bought the most, 24. Meanwhile, with 25, Alavés is the club that has received the most loaned players.
- On the other side of the negotiating table, FC Barcelona is the club that has seen the most players leave, 36. The Catalan club has also sold more players than anyone else, 29, but it hasn't loaned out the most: only Villarreal has done more of that, with 18 players loaned out.
- The clubs with the most moves between them are Barcelona and Betis, with 12. They are also the pair with the most players transferred between them, 8, and the most loaned, 4, although in that last case they are tied with the Alavés–Betis pair.
Select a team⤵︎
27 of the 28 clubs analyzed have bought or loaned at least one player from another La Liga club. Only Valencia has not transferred a single player to another La Liga club. However, the 9 clubs that have neither sold nor loaned out a single player include teams like Málaga, Cádiz and Valladolid.
This is easier to see by unfolding the club pairings, which reveals some imbalances in the moves between clubs. The biggest ones are between FC Barcelona and Betis and between Getafe and Real Sociedad. In the first case, the Catalan club has sent 10 players to Betis, while the Andalusian side has sent just 2 players to FC Barcelona. In the second, Getafe has received 7 players who were playing for Real Sociedad, but there hasn't been a single move in the opposite direction.
Select a team⤵︎
About the data
The first step was getting the data, and the { worldfootballR } library makes that much easier with its functions for pulling Transfermarkt data going back to 2017.
With a couple of functions and a few loops you can extract every move that took place in La Liga between 2017 and 2024. To limit the clubs that appear in the chart, I decided to filter them and keep only the moves in which both clubs were in the top flight. Another important filter, to show the right moves, was removing the ones that recorded a loaned player returning to their parent club.
With this raw data, the next step was to build a matrix linking every club that had played at least one season in the top flight. This way, every relationship between clubs is shown, whether or not there were any moves between them (and so the connections with no moves can be drawn too).
With the resulting file you can make a heatmap showing the moves between clubs, according to who sells and who buys. But since what we want to show is the sum of the moves in both directions between clubs, for that chart all you have to do is group and add up.
This last part is done directly in Svelte, using rollups() from D3
The R code is available on GitHub