Debuting in a VFL/AFL Grand Final is rare

When Marlion Pickett runs onto the M.C.G for Richmond in the AFL Grand Final this Saturday, he’ll be only the sixth player in 124 finals to debut on the big day.

The sole purpose of this blog post is to illustrate how incredibly easy it is to figure this out, thanks to the dplyr and fitzRoy packages.

library(dplyr)
library(fitzRoy)

afldata <- get_afltables_stats()

afldata %>% 
  select(Season, Round, Date, ID, First.name, Surname, Playing.for, 
         Home.team, Home.score, Away.team, Away.score) %>% 
  group_by(ID) %>% 
  arrange(Date) %>%
  # a player's first game 
  slice(1) %>% 
  ungroup() %>% 
  # grand finals only
  filter(Round == "GF") %>%
  # get the winning/losing margin 
  mutate(Margin = case_when(Playing.for == Home.team ~ Home.score - Away.score,
                            TRUE ~ Away.score - Home.score)) %>% 
  select(-Home.team, -Away.team, -Home.score, -Away.score)
Season Round Date ID First.name Surname Playing.for Margin
1908 GF 1908-09-26 5573 Harry Prout Essendon -9
1920 GF 1920-10-02 6677 Billy James Richmond 17
1923 GF 1923-10-20 6915 George Rawle Essendon 17
1926 GF 1926-10-09 3824 Francis Vine Melbourne 57
1952 GF 1952-09-27 9361 Keith Batchelor Collingwood -46

How long since your team scored 100+ points? This blog’s first foray into the fitzRoy R package

When this blog moved from bioinformatics to data science I ran a Twitter poll to ask whether I should start afresh at a new site or continue here. “Continue here”, you said.

So let’s test the tolerance of the long-time audience and celebrate the start of the 2019 season as we venture into the world of – Australian football (AFL) statistics!
Continue reading

Australiana

Suburban rainbow Non-science random thoughts this weekend:

  • On this last day of March – 16.8 mm of rain for the month. March average = 139.5 mm. See some Brisbane climate stats.
  • First weekend of the AFL season! Deep sadness as I realise that the first Swans game won’t be on TV here as it clashes with the Lions. Surely the great Grand Final rematch should be free to air in all states.
  • Wonder how the Pixies sound after all these years? Looking forward to reports from the V Festival.

No worries mate

In a sure candidate for an IgNobel prize, research indicates that Australians are less prone than Europeans to heart attacks induced by watching sport. This ground-breaking work is reported in the Christmas special section of the Medical Journal of Australia.

One of their datasets is the nail-biting 2005 AFL Grand Final, won at the death by the Sydney Swans. I wonder if they included a “fan factor” – the population at large may have been relaxed, but I know several people who repeatedly came close to cardiac arrest over the finals series that year. And we still can’t speak of the 2006 final.

A day off

Ah, cricket. Loved by those who grow up where it’s played and an utter mystery to everyone else.

I spent yesterday at Brisbane’s Gabba, a modern day amphitheatre, enjoying day 3 of the first Ashes test. It wasn’t the most compelling game – Australia’s dominance reminded me of a cat toying with an injured baby bird and the “fun police” have cracked down on water melon helmets, trumpets, beach balls and Mexican waves. However, if you’re visiting Australia and get the chance to see cricket or AFL at a major venue, I recommend that you do. It’s always good fun, relaxing in the sun with a beer, chatting with your mates, watching the crowd dynamics and the game. And it’s a great way to put work aside and wind down for a few hours.