Away Goals Rule
What If Away Goals were always weighted at a Premium?
This is just a quick post that I have been meaning to do for a while on the away goals rule.
What You Need To Know About The Away Goals Rule
There are some tournaments like the Champions League where teams play two legs: one home and one away. The winner is the team that scores the most goals, in aggregate, over the two legs. However, if at the end of the two legs the aggregate score is tied then the team that scored more away goals wins.
For example, if team A plays the first leg at home and that game ends 1-1 and then team A travels and plays as the away team and that game ends 2-2 then team A wins even though both games ended in a draw because team A scored 2 away goals while the other team only scored 1 away goal.
Basically, this rule places a small premium on goals scored away from home. I have always wondered: if we are going to say that away goals are more difficult then home goals and we want to say they are worth just a little more then why not apply this to league play as well as tournament games. The code below imagines just such a scenario for the 2016-2017 English Premier League season.
R Code Included and Future Plans
Whether you care about this hypothetical set of outcomes or not, here is the R code included which may be of interest. There is a decent amount of dplyr
to wrangle up the raw data and create summary tables. This is the first time that I used the case_when
function which is great. This is also my first time creating a slope chart and I used the example from Top 50 ggplot2 Visualizations to make it happen.
This is just for one season. Next, I want to map this same script over as many past seasons as I can and wrap that all up in a Shiny app so anyone interested can select whichever season they want and see a chart similar to the one made below.