The annual super long weekend of football that I always miss because I’m camping is upon us! After a few creaks and a bit of encouragement, I’ve managed to get the ELO model up and running for the new season, including my first set of simulations!
This year, I’m going to be including
r code in my posts. If I get enough feedback either way I may turn that off. There is plans for
blogdown to support code folding in the future which will be nice, as not all my followers are interested in code. Nonetheless, if you are so inclined, it’s all here in the open and reproducible!
First, let’s get some libraries loaded and grab some data (you can find this file on my github repo)
# Load libraries library(pacman) pacman::p_load(fitzRoy, tidyverse, formattable, ggthemes, elo, here, lubridate) # Load data that has been run using 'weekly_data_process.R' path <- here::here("data", "raw-data", "AFLM.rds") dat_list <- read_rds(path)
My first set of simulations are hot off the press and we can see below our summary table. For reference, the ELO score and 1-week change are presented, as are the probabilities of finishing top 8, top 4 and minor premier.
# Get the round data elo_round <- dat_list$elo %>% filter(Game == last(Game) & !Team %in% c("Fitzroy", "University")) # Combine Simulation and ELO data elo_table <- elo_round %>% left_join(dat_list$sim.simple.summary, by = "Team") %>% mutate(ELO.change = ELO - ELO_pre) %>% mutate_at(c("Top.8", "Top.4", "Top.1"), percent, digits = 1) %>% mutate_at(c("ELO","ELO.change"), as.integer) %>% mutate_at("Wins", round, 1) %>% select(Team, ELO, ELO.change, Wins, Top.8, Top.4, Top.1) %>% arrange(desc(Wins)) # Write to formattable with some formatting elo_table %>% format_table(list( ELO = normalize_bar("#20B2AA80"), Top.8 = color_tile("transparent", "lightblue"), Top.4 = color_tile("transparent", "lightblue"), Top.1 = color_tile("transparent", "lightblue") ))
So we get our first look at the projected wins for each team and Richmond is well out in front. This is pretty reflective of having a decent gap over everyone except Adelaide in their ELO ratings. I’m still surprised the model is so bullish about their changes however - a 34% change at a minor premierships seems like our ELO has been swept up in Yellow and Black fever.
Adelaide is still up there but remember, our model is completely naive to player movement so it doesn’t know about their key personnel woes. They are just above a group of 4 in terms of ELO ratings (Sydney, GWS< Port and Geelong) but their round 1 loss means they fall back into that pack for projected wins.
After those teams, we have a pretty even group of teams all sitting around the 1500 mark. These are the teams at various stages of transition from either being good and falling down or on the way back up. It will take a few weeks to know which way some of them are going (ahem, Bulldogs).
Unfortunately for Queensland footy fans, the model isn’t given you much of a shot at seeing September (both <10%) action. It’s too hot that time of year to play footy anyway.
Bringing up the rear is Freo, with our model giving them less than 5% change of making finals and only projected around 4 wins. I hope Ross Lyon is up for this rebuild!
Onto our all important tips and we’ve got some very close games all weekend! The model thinks all games are within 3 goal margins, with a couple basically too close to call.
One of the more interesting predictions is the North Melbourne v St Kilda game. Most models are tipping a pretty comfortable win by St Kilda. For some reason, my model either rates North a bit higher, or St Kilda a bit lower (or a combination of both). Another explanation could be that I’m using a fixed HGA for all teams - one would expect that the HGA for North at Etihad over St Kilda is minimal. Nonetheless, we’ll back our ELO model in here and tip an upset to North by 1 point!
Another interesting game is tonight’s grand final rematch. Adelaide just gets the nod here with a slight ELO advantage and home ground. Again - no player information for our model so we can only take recent results into account. Can the Adelaide fortress get them home?
Possibly the match-up of the round is Sydney v Port. Again, HGA and a slightly higher rating gets Sydney over the line but these are two highly rated teams in our model and looked in good form in Round 1. Good one to watch in the post Easter egg hunt coma!
|Thu, 29||19:20||2||Adelaide Oval||Adelaide||Richmond||10||0.560||Adelaide by 10|
|Fri, 30||16:20||2||Etihad Stadium||North Melbourne||St Kilda||1||0.501||North Melbourne by 1|
|Sat, 31||13:45||2||Etihad Stadium||Carlton||Gold Coast||11||0.566||Carlton by 11|
|Sat, 31||16:35||2||MCG||Collingwood||GWS||-8||0.444||GWS by 8|
|Sat, 31||16:40||2||Perth Stadium||Fremantle||Essendon||-16||0.398||Essendon by 16|
|Sat, 31||18:25||2||Gabba||Brisbane Lions||Melbourne||-16||0.399||Melbourne by 16|
|Sun, 01||15:20||2||Etihad Stadium||Footscray||West Coast||3||0.514||Footscray by 3|
|Sun, 01||16:40||2||SCG||Sydney||Port Adelaide||13||0.579||Sydney by 13|
|Mon, 02||15:20||2||MCG||Geelong||Hawthorn||18||0.605||Geelong by 18|
Happy Easter and happy tipping. I’ll be camping all weekend but hit me up on Twitter if you have any questions!