This Personal project explores England Premier League(EPL) 2024/25 season team performances through interactive dashboards built with Python(Streamlit) and Tableau Public.
About This Project
I created this project to visualize EPL team stats the 2024/25 season using multiple tools. The goal was to build interactive and intuitive dashboards that let users explore home and away performance, match averages, and league rankings.
The dataset comes from footballdata.co.uk, a public resource for football statistics.
Dataset
The data covers match results including:
- Match Date(Date)
- Home and Away Teams(HomeTeam, AwayTeam)
- Full-time Goals scored by Home and Away teams(FTHG, FTAG)
- Match Outcome(FTR: Home Win(H)/ Draw(D)/ Away Win(A))
Tools & Approach
- Python & Streamlit for interactive web dashboard with filters and dynamic
- Tableau Public for rich, visual dashboards accessible online
The Python code processes match data by separating home and away results, calculates team totals, averages, points, goal differences, and ranks teams accoredingly.
Try the Dashboards
- Interactive Streamlit Dashboard https://eplstats202425-bttg2hfzcmbeita4th2aez.streamlit.app/
- Tableau Public Dashboard https://public.tableau.com/views/team_stats/Dashboard1
Highlights & Insights
- Select teams to compare home vs away records
- View per-match averages of points and goals scored/conceded
- Browse full league table sorted by points, goal difference, and goals scored
- Dynamic visualizations update based on user selection, enhancing data storytelling
Code Snippet(Data Processing)
import pandas as pd
Load dataset
df = pd.read_csv("epl_team_summary.csv")
df['Date'] = pd.to_datetime(df['Date'], dayfirst=True)
Process home games
home = df[['HomeTeam', 'FTHG', 'FTAG', 'FTR']].copy()
home.rename(columns={'HomeTeam': 'Team', 'FTHG': 'GoalsFor', 'FTAG': 'GoalsAgainst'}, inplace=True)
home['Win'] = (home['FTR'] == 'H').astype(int)
home['Draw'] = (home['FTR'] == 'D').astype(int)
home['Loss'] = (home['FTR'] == 'A').astype(int)
Process away games
away = df[['AwayTeam', 'FTAG', 'FTHG', 'FTR']].copy()
away.rename(columns={'AwayTeam': 'Team', 'FTAG': 'GoalsFor', 'FTHG': 'GoalsAgainst'}, inplace=True)
away['Win'] = (away['FTR'] == 'A').astype(int)
away['Draw'] = (away['FTR'] == 'D').astype(int)
away['Loss'] = (away['FTR'] == 'H').astype(int)
Combine and calculate team stats
full = pd.concat([home, away])
team_stats = full.groupby('Team').agg({
'Win': 'sum',
'Draw': 'sum',
'Loss': 'sum',
'GoalsFor': 'sum',
'GoalsAgainst': 'sum'
}).reset_index()
Add additional metrics
team_stats['Matches'] = team_stats['Win'] + team_stats['Draw'] + team_stats['Loss']
team_stats['Points'] = team_stats['Win'] * 3 + team_stats['Draw']
team_stats['GD'] = team_stats['GoalsFor'] - team_stats['GoalsAgainst']
team_stats['AvgPoints'] = (team_stats['Points'] / team_stats['Matches']).round(2)
team_stats['AvgGoalsFor'] = (team_stats['GoalsFor'] / team_stats['Matches']).round(2)
team_stats['AvgGoalsAgainst'] = (team_stats['GoalsAgainst'] / team_stats['Matches']).round(2)
Sort and rank
team_stats = team_stats.sort_values(by=['Points', 'GD', 'GoalsFor'], ascending=False)
team_stats['Rank'] = range(1, len(team_stats) + 1)
→ Full source code is available on GitHub:
https://github.com/k-eunji/eplstats202425
What I Learned
- Practical data wrangling and aggregation with pandas
- Building interactive dashboards with Streamlit and seaborn
- Designing visually appealing dashboards in Tableau Public
- Sharing dashboards publicly for easy access and engagement
Final Thoughts
In this project, I primarily used Python with Streamlit and Tableau Public to create interactive dashboards that are easy to share publicly online.
Although I initially considered using Power BI Desktop, I found it difficult to share dashboards publicly from a persnal account. Because if this limitation, I decided not to use the Power BI version and instead focused on tools that allow simple, free sharing for personal projects.
All source code and data files for this project are available on my GitHub:
https://github.com/k-eunji/eplstats202425
Feel free to check it out ands share any feedback!
Thanks for reading!
Marina Kim (Eunji Kim)
Top comments (0)