AFL statistics SQL database

The AFL stats database (and some relevant code) is on github!

Download the SQL(ite) stats database here: afl-stats.sqlite

The SQLite database has team statistics for each season and finals game for 1987-2014. In the earlier years not all stats are present as they were not all recorded. The database schema is shown below, which also shows the type of stats avaliable.

db schema

It's great for anyone nerdy who's wanting to do any sort of visualisation of stats, machine learning or just wanting to play around with the data easily. As an example of what can be quickly knocked up using Python in 10 minutes, here's the average amount of tackles in AFL games by year.

tackle count

Some things I think would be interesting to examine, using the data:

  • How is the intensity of finals vs. normal season games captured in the statistics? Are there more tackles, is goal kicking less accurate, are there more or less free kicks etc etc?
  • Can historical stats be used to make a good tipping/betting system? How accurate would a machine learning algorithm based on the stats be?
  • How do attendances change when a team is on a hot or cold streak? Which teams have the most fair weather supporters?
  • Are there any teams that consistently are outliers in certain areas despite their position on the ladder? For example, are there any teams that consistently have great goal kicking accuracy regardless of their position on the ladder?
  • Which teams do best at home? Away from home? Are there any teams that are consistently bad/good in certain stadiums/states?

Would love to hear from you if you do anything interesting with it though. I'm sure there are lots of cool things that could be done.sda


comments powered by Disqus