Calculates the Colley Matrix rankings of the NFL.
Colley.py
is copyright 2014 Eugene Bulkin, licensed under MIT.
For a season of NFL games as returned by Pro-Football-Reference:
- All tie games are discarded. The Colley Matrix library I'm using has no contingency for tie games.
- The team abbreviations are normalized. Pro-Football-Reference has an obsession with making sure that team abbreviations are 3 characters long, so we trim the ones that need to be trimmed.
- The final
games.csv
is organized as such:Week,Winner abbreviation,Winner score,Loser abbreviation,Loser score,OT
- The Colley method is ran on these games. Overtime is counted as .75 of a game.
- The finalized rankings are output.
By default, postseason games are excluded. They can be added by supplying the
-p
flag to get_game_results.py
.
Run:
python get_game_results.py
python results_to_games.py
python generate_rankings.py games.csv
The rankings in CSV form are in rankings.csv
.