Project Overview

This report builds the Premier League 2024/25 league table from scratch using only raw match data.

  • Data Source: https://football-data.co.uk/mmz4281/2425/E0.csv.
  • Rows: 380 matches
  • Methodology: No pre-calculated points - everything derived from FTHG (Full Time Home Goals) and FTAG (Full Time Away Goals).

1. Load Raw Data

## Data Info:
## Total matches: 380
## Total columns 25
## The league started on 2024-08-16 and ended on 2025-05-25

2. Key Column Descriptions

Before building the league table, let’s understand what we’re working with. The dataset contains 380 rows (one per match) with over 100 columns. For this analysis, we only need a handful of columns.

Premier League Table
Column_Name Description
Date Match date
Time Time match started
HomeTeam Home team name
AwayTeam Away team name
FTHG Full-time home goals
FTAG Full-time away goals
FTR Full Time Results
Referee Referee of the match
HS Home Team Shots
AS Away Team Shots
HST Home Team Shots on Target
AST Away Team Shots on Target

3. Raw Data Preview

Before any calculations, let’s examine the raw match data. The dataset contains 380 rows (one per match) with over 100 columns including match statistics, betting odds, and derived metrics.

For this analysis, we focus on the essential columns: match date, teams, full-time scores, and basic attacking metrics.
First 6 matches of the 2024/25 Premier League season
date HomeTeam AwayTeam FTHG FTAG HS AS
2024-08-16 Man United Fulham 1 0 14 10
2024-08-17 Ipswich Liverpool 0 2 7 18
2024-08-17 Arsenal Wolves 2 0 18 9
2024-08-17 Everton Brighton 0 3 9 10
2024-08-17 Newcastle Southampton 1 0 3 19
2024-08-17 Nott’m Forest Bournemouth 1 1 14 13

2. Calculate Match Results

For each match, determine points based on full-time scores

Sample points calculation (Game week 1)
HomeTeam AwayTeam FTHG FTAG home_points away_points
Man United Fulham 1 0 3 0
Ipswich Liverpool 0 2 0 3
Arsenal Wolves 2 0 3 0

3. Build League Table

Aggregate data to get team statistics

## Final League Table:

4. Top Performers

Top 6 (Champions League Qualification)
Rank Team MP W D L GF GA GD Pts
1 Liverpool 38 25 9 4 86 41 45 84
2 Arsenal 38 20 14 4 69 34 35 74
3 Man City 38 21 8 9 72 44 28 71
4 Chelsea 38 20 9 9 64 43 21 69
5 Newcastle 38 20 6 12 68 47 21 66
6 Aston Villa 38 19 9 10 58 51 7 66
Relegation Zone (Bottom 3)
Rank Team MP W D L GF GA GD Pts
18 Leicester 38 6 7 25 33 80 -47 25
19 Ipswich 38 4 10 24 36 82 -46 22
20 Southampton 38 2 6 30 26 86 -60 12

5. Attack & Defense Analysis

## **Top 5 Attacks (Most Goals Scored):**
Team GF GA GD
Liverpool 86 41 45
Man City 72 44 28
Arsenal 69 34 35
Newcastle 68 47 21
Brighton 66 59 7
## 
##  **Top 5 Defenses (Fewest Goals Conceded): **
Team GA GF GD
Arsenal 34 69 35
Liverpool 41 86 45
Chelsea 43 64 21
Man City 44 72 28
Everton 44 42 -2

6. Validation

## **Validation Check:**
## - Total points in table: 1047
## - Expected total points (3 per match): 1047
## - Match: ✓ PASS
## 
##  -Expected team-match instances: 760
## - Actual team-macth instances: 760
## - Match: ✓ PASS

Visual Comparison

Below is the official Premier League table for comparison with our calculated results.

Note: Our calculated table should match the official standings exactly. Any differences would indicate data quality issues or logic errors.

7. Export Results

## **Season Summary:**
Total_Goals Avg_Goals_Per_Game Total_Points Teams
1115 2.93421 1047 20

Conclusion

This report successfully built the Premier League table from 380 raw match records using: - No pre-calculated standings - Only basic R operations (case_when, group_by, summarise) - 100% reproducible workflow.

The final table matches official Premier League standings exactly.

Next Steps

  • Code available on GitHub:
  • Data source: football-data.co.uk
  • Refresh: You can replace the data (from the same source) with another season’s and get a different table.