Tuesday, August 30, 2016

Processing AFL Data

The first step in using R to analyse data about Australian Rules Football is to get the data in the right format.

This article describes how to work with AFL data supplied by Sorenson Technologies Pty Ltd ( http://www.sorensen.com.au/index.html ). Sorenson's provide AFL data for either
  • $150 - current season - file is updated weekly
  • $15 - prior year seasons. $15 covers the full season
Other sources of AFL data include :-
  • Champion Data - the main supplier of AFL data, but for the sports enthusiast it's only available from either the press or by scraping various websites.
  • AFL Tables ( http://afltables.com/afl/afl_index.html ). Depending on what the data is, it's available either as a table which you can scrape or downloadable file.
This article will refer data supplied by Sorenson Technologies, as that's what I use.


.....  the rest of this post is published on R Pubs :    http://rpubs.com/gswebstr/afl_data


When I learn how to publish R markdown to a blog, I'll do that !

Friday, August 12, 2016

AFL_Data_Players

The Players file is the main data file. The variables in the Players file are:


  • Player ID
  • Season
  • Round Name
  • Player Name
  • Team Name
  • Opposing Team
  • Player Number
  • Kicks
  • Marks
  • Contested Marks
  • Uncontested Marks
  • Handballs
  • Effective Possessions
  • Contested Possessions
  • Uncontested Possessions
  • Goals
  • Behinds
  • Hitouts
  • Tackles
  • Rebounds
  • Inside50
  • Clearances
  • Clangers
  • Frees For
  • Frees Against
  • Assists
  • Brownlow Votes
  • Marks Inside50
  • One Percenters
  • Bounces
  • Goal Percentage
  • Time On Ground %
  • Centre Clearances
  • Stoppages
  • Date of Birth
  • Height
  • Weight
  • Match Date and Time

AFL_Data_Matches

The variables in the Matches file are


  • Season
  • Round Name
  • Venue Name
  • Home Team
  • Away Team
  • Winner
  • Home Score (Points)
  • Away Score (Points)
  • Aggregate Score
  • Home - Goals - By Quarter and at Game End
  • Home - Behinds - By Quarter and at Game End
  • Away - Goals - By Quarter and at Game End
  • Away - Behinds - By Quarter and at Game End
  • Match date and time
  • Local match date and time
  • Crowd
  • Roof
  • Home Coach
  • Away Coach

AFL_Data_Ladders

The variables in the Ladders file are


  • Season
  • Round
  • Position
  • Previous Position
  • Season High
  • Season Low
  • Final Position
  • Team Name
  • Opponent Name
  • League Points
  • Percentage
  • Score For (Points)
  • Score Against (Points)
  • Matches Played
  • Matches Won
  • Matches Drawn
  • Matches Lost