This repo contains code used to apply an Elo rating model to the AUDL. The data is scraped from various places, either the AUDL website or saved webpages containing game information from previous seasons. The Elo data file is in the format of FiveThirtyEight's NBA Elo data.
Inspired by FiveThrityEight's NBA Elo ratings. I apply an Elo ranking to the American Ultimate Disc League (AUDL). The AUDL started playing games in 2012 and is now a 23 team, 4 division professional ultimate league.
With the tools.one_plot function, I create a chart of historical Elo data for every team in the AUDL with specific teams highlighted.
The tools.predict_results function produces a prediction for any future gamse that have been scraped. This includes a game forecast in the format of a percentage chance the team under 'team_id' wins and a predicted point differential under audl_diff. There is also a naive prediction of the total number of points scored in the game.
I utilized this tool during the regular season to test this model's predictions against a game called AUDL Pick'Em run by the AUDL. The model's predictions took second in the 2018 competition and would have took first had I known about the game before the third week of competition was over.
- Most up to date information is collected in audl_elo.csv
- Use
pip install -r requirements.txt
- You may want to use a virtual environment for this.
- Clone this repo to your computer.
- Scrape game data for each year, 2012 through 2018.
- Change directory into the folder for the given year.
- Run
python scraper_(year).py
in the folder to produce the (year)_audl_games.csv file in the given folder.
- Navigate back to the main directory.
- Run
python audl_elo.py
to create the data set in audl_elo.csv.