dmaclean / dfs-python

Tools for DFS data collection and projection creation.
11 stars 2 forks source link

Keep track of injuries #16

Closed dmaclean closed 10 years ago

dmaclean commented 10 years ago

We need to know who's injured so we can make sure player projections are accurate - both the injured player and the backups that can expect more minutes.

Table:

dmaclean commented 10 years ago

Added the injuries table, model and database manager classes, and a way to construct depth charts that take advantage of injury information to generate expected minutes.

Files modified:

dmaclean commented 10 years ago

Need to also add a script that goes through the existing game logs and determines when a player has been out. For a player that didn't play on a given night, there should be no corresponding row in the _game_totalsbasic table.

This will be valuable for regression testing.

dmaclean commented 10 years ago

This has been done. The InjuryManager can now evaluate game logs to determine past injuries for a given season. There's also now a script _determineinjuries.py that runs this for us.

One last thing that needs to be done is creating a script that scrapes an injury site like donbest.com.

Files modified:

dmaclean commented 10 years ago

Added a function _scrape_injuryreport() to scrape the rotoworld.com injuries and automatically update the injury dates. Also added unit tests and a hook into the _determineinjuries.py script using the argument type=current.

Files modified:

dmaclean commented 10 years ago

Added small Laravel web app to provide a quick way to set a player's return date to yesterday.

dmaclean commented 10 years ago

One more task to do (minus any bug fixes): let's add some cleanup in the BBR scraper to check the injury list against the games a player has played in. If the injury listing says the player was out, but there is a _game_totalsbasic row for them for that game, adjust the injury listing accordingly.

dmaclean commented 10 years ago

Added a cleanup mechanism in InjuryManager that takes a date (presumably from the game log) and an injury that is erroneously reported, and fixes it.

Files modified: