Skip to content Skip to navigation

Soccer and Data Analytics by Tande Mungwa

Hello,
My name is Tande Mungwa, I'm a junior in Mechanical-Aerospace Engineering and an avid soccer fan. My dream is to work as a data analyst for a sports club. Its one I'm far from achieving, but you've got to start somewhere, right?

As a first project I decided to write a program to generate some (hopefully interesting) graphs. In a nutshell, my algorithm(written in Python), computes both the average and total price of teams from various leagues across Europe. These were completely player-driven statistics, meaning nothing other than the price of the individual players was taken into account to compute the values shown. I acquired these values from Daniel Freitag's football-data.org API, which provides market values(where available), for players from most, though not all, of Europe's top flight leagues.

The API provides two types of price information, acquired from TransferMarkt.
Market Value (MV) - This, provided at the player level & reflects an estimate of their transfer worth based on various metrics decided upon by TransferMarkt
Squad Market Value (SMV) - This, provided at the team-level, reflects the overall price of the team

For my purposes I decided to ignore the Squad Market Value and instead sum the individual Market Values. Then, I divided the SMV by the number of players counted to produce the Average Player Price for each team. I then plotted these values in a stacked bar-graph format(which was frustratingly difficult to achieve via Python for a variety of reasons, not the least of which was my inexperiece as a programmer). Once graphed, I had the choice of either:

A) displaying the Y-Axis on the graph with a grid, allowing the viewer to read the data horizontally

or,

B) Placing each price where its respective bar ends.

I haven't yet decided upon which to use, or to use both. But examples of all cases are provided.

The data is not perfect nor are the statistics. For one, this data only reflects the most recent summer transfer window. This is evident as, for example, Dimitri Payet(recently sold to Marseille) remains in West Ham's player list and thus contributes to West Ham's average and total value(explaining, perhaps, why my numbers for West Ham overshoots the values now reported by TransferMarkt). Also, TranferMarkt prices are updated intermittently and the API doesn't account for this. Also, some player prices are missing - trained eyes will probably spot this. But this is far from what I would label as "misleading data". Hopefully Mr. Freitag will update the database soon.

Ok, that's it. Enjoy the graphs =) ([graphs are coming we have to resize them, [TI])

File: