2024: Week 35 - Premier League Results

 Created by: Carl Allchin

The football (soccer) season is upon us. The challenge this week is to take the game results and make them ready for analysis. Sadly, when you google Premier League results the data is not structured in an analytically friendly way. 

We've taken a copy of all the results from last season, can you prepare it for analysis?

Input

One Excel file with a single worksheet:

Requirements

  • Input the dataset
  • Add in a row number as at source (this will help for next week's challenge)
  • Create a column to show which Matchday (ie which game in the 38 game season) each game occured in
  • Remove any rows of the data set that don't contain game information
  • It's helpful to put all the match information in one column rather than the two columns in the input
  • Replace the new row character (\n) with a different character(s) (I use two pipe characters: ||) 
    • \n is recognised as char(10) by Prep Builder
  • Form separate columns for:
    • Date
    • Home Score
    • Home Team
    • Away Score
    • Away Team
  • Output the results

Output


7 data fields:
  • Away Score 
  • Away Team
  • Home Score
  • Home Team 
  • Matchday
  • Source Row Number
  • Date
380 rows (381 incl. headers)

You can view the output here.

After you finish the challenge make sure to fill in the participation tracker, then share your solution on Twitter or LinkedIn using #PreppinData and tagging @Datajedininja@JennyMartinDS14 & @TomProwse1

You can also post your solution on the Tableau Forum where we have a Preppin' Data community page. Post your solutions and ask questions if you need any help! 

Popular posts from this blog

2024: Week 1 - Prep Air's Flow Card

2023: Week 1 The Data Source Bank

How to...Handle Free Text