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/2526/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: 332
## Total columns 25
## The league started on 2025-08-15 and ended on 2026-04-22

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
2025-08-15 Liverpool Bournemouth 4 2 19 10
2025-08-16 Aston Villa Newcastle 0 0 3 16
2025-08-16 Brighton Fulham 1 1 10 7
2025-08-16 Sunderland West Ham 3 0 10 12
2025-08-16 Tottenham Burnley 3 0 16 14
2025-08-16 Wolves Man City 0 4 9 15

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
Liverpool Bournemouth 4 2 3 0
Aston Villa Newcastle 0 0 1 1
Brighton Fulham 1 1 1 1

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 Man City 33 21 7 5 66 29 37 70
2 Arsenal 33 21 7 5 63 26 37 70
3 Man United 33 16 10 7 58 45 13 58
4 Aston Villa 33 17 7 9 47 41 6 58
5 Liverpool 33 16 7 10 54 43 11 55
6 Brighton 34 13 11 10 48 39 9 50
Relegation Zone (Bottom 3)
Rank Team MP W D L GF GA GD Pts
18 Tottenham 33 7 10 16 42 53 -11 31
19 Burnley 34 4 8 22 34 68 -34 20
20 Wolves 33 3 8 22 24 61 -37 17

5. Attack & Defense Analysis

## **Top 5 Attacks (Most Goals Scored):**
Team GF GA GD
Man City 66 29 37
Arsenal 63 26 37
Man United 58 45 13
Liverpool 54 43 11
Chelsea 53 45 8
## 
##  **Top 5 Defenses (Fewest Goals Conceded): **
Team GA GF GD
Arsenal 26 63 37
Man City 29 66 37
Crystal Palace 36 35 -1
Brighton 39 48 9
Everton 39 40 1

6. Validation

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

7. Export Results

## **Season Summary:**
Total_Goals Avg_Goals_Per_Game Total_Points Teams
909 2.737952 906 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.