2024: Week 36 - Premier League Standings

Created by: Carl Allchin

One of my favourite Preppin' Data challenges was created by Jonathan Allenby about forming the NBA standings from game results. This week's challenge takes the output of last week's challenge and forms the standings for the Premier League. 

Input

The input for this week's challenge is the output from last week's challenge:


Requirements

  • Input the data
  • Determine how many points each team gets for each game
  • Create a record for each game, for each team containing:
    • Matchday
    • Team
    • Goals For (definition: goals scored by the team in the record)
    • Goals Against (definition: goals conceded by the team in the record)
    • Goal Difference (Goals For - Goals Against)
    • Points
      • Note there should be 38 records for each of the 20 teams in the league
  • To form your league table for each matchday:
    • Create a running total for each team in the order of the matchdays:
      • Goals For
      • Goals Against
      • Goal Difference
      • Points 
  • Determine Position in the league for each team by matchday. Position determined by (in order of importance)
    • Points (High to Low)
    • Goal Difference  (High to Low)
    • Reverse Alphabetical Order of team name (I'm a Tottenham fan) 
  • Remove any unnecessary data fields
  • Output the data

Output


7 data fields:
  • Matchday
  • Team
  • Goals For (Running Total)
  • Goals Against (Running Total)
  • Goal Difference (Running Total)
  • Points (Running Total)
  • Position
760 rows (761 rows 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 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

2023: Week 1 The Data Source Bank

2024: Week 1 - Prep Air's Flow Card

How to...Handle Free Text