Skip to content

Dashboard that visualizes the market value and performance of the top soccer teams across Europe. Uses Python, Pandas, and SQL to process and manipulate data, and JavaScript to build the dashboard.

License

Notifications You must be signed in to change notification settings

ericyang91/Dashboard_Soccer_Performance_vs_Money

Repository files navigation

Soccer: Is the Money Worth the Goals?

soccer

Purpose

The European soccer market has been increasing in size in the recent years. The level of increase is unprecedented, with multi-billionaires from countries like Qatar and Saudi Arabia taking ownership of the major clubs. The result is a hyper-inflation of player values. This project uses bubble chart, bar chart, and a table to visualize the major European soccer league and their teams' monetary value and performance to see if there are any visible relationships between money and performance. Leagues of interest include:

  • Premier League (England)
  • La Liga (Spain)
  • Serie A (Italy)
  • Bundesliga (Germany)
  • Ligue 1 (France)
  • Eredivisie (Netherlands)
  • Liga Portugal (Portugal)
  • Premier Liga (Russia)
  • Super Lig (Turkiye)
  • Jupiler League (Belgium)
  • Bundesliga (Austria)

Note that the project is limited to visualization only. The relationship between the two factors must be further studied using correlation, regression, and/or machine learning.

Data Preparation

Data set was prepared by scraping the most recent data from Transfermarkt using BeautifulSoup. The scraped data was cleaned and organized with Pandas and Python, which was then sent to PostgreSQL to be stored in a database. SQLAlchemy was used to retrieve the data from PostgreSQL and Flask was created for setting up the dashboard. The code is stored in app.py.

Javascript Coding

D3.js and Plotly were used to create the bar chart, bubble chart, and league table. Both the HTML and the Javascript code are stored in dash.html. CSS code is stored in main.css.

Dashboard

The dashboard composed of 5 different sections: Dropdown menu, Team Summary, Bubble Chart, 2 Bar Charts, and a League Table. Below is an overview of the dashboard.

dashboard

There are two dropdown menus that allow users to select a league of interest and a club in the selected league.

menu

The Team Summary side menu gives a summary of the club of selection. This summary includes the club's market value, total points in the league, average points per game, number of matches played, games won, games drawn, and games lost.

summary

The bubble chart gives users information of all the clubs in a league their market value, average points won per game, and the win-loss ratio. The size of the bubble depicts the market value.

bubblechart

There are two bar charts. The upper chart compares the market value between the selected club and the league average. The chart below compares the points won.

bar

The league table shows a detailed value and performance information for all clubs in a league. Users can sort the different columns by clicking on the column headers.

table

Further Research

As noted above, this project is limited only to data visualization. Further research is required to analyze the relationship between money and performance. It would also be interesting to make comparison between the different leagues by using UEFA's club coefficients and the Champions League performance. Another nice addition to it would be to use tools such as the Task Scheduler to automate the process of updating the data set as the data on Transfermarkt gets updated.

Libraries and Modules

Python Pandas PostgreSQL pgAdmin Flask SQLAlchemy JavaScript Plotly D3 Beautiful Soup

About

Dashboard that visualizes the market value and performance of the top soccer teams across Europe. Uses Python, Pandas, and SQL to process and manipulate data, and JavaScript to build the dashboard.

Topics

Resources

License

Stars

Watchers

Forks