Daily pipeline
Model (outdated - new readme to come)
-
In
model.ipynb
run the code block containingdata_getters.download_gamelog_jsons(2014,'boxscores/2014',start_game=X, end_game=1230)
where X is the first game that has not already been downloaded. The program will automatically stop once the last game that is available is downloaded. -
Run the next code block, making sure to change
latest_day = datetime.date(2014,11,16)
into the correct day. All days before and includinglatest_day
will be used to make predictions. -
Paste the results of the model
model_predictions.csv
into the appropriate salary optimization sheet in excel.
Optimization
-
Export daily player information to CSV and place in first five columns of the appropriate sheet in
DK Salary Optimization Sheets
. -
Copy/paste results from
model_predictions.csv
into theModel
column of the sheet -
Make discretionary changes if desired, then click
Data -> Solver
and solve using the Simplex LP algorithm.
Meta-analysis
-
Go to DraftKings lobby and save the lobby source code as
draftkings scrapes/YYYYMMDD_draftkings_nba_lobby.htm
. -
Go to the main function in data_getters.py, change the variable
fn
to the name of the downloaded.htm
file, and run, generating a list of all games and their ID's. -
Run selenium script on logged in DK account to download the
.csv
info for each of these games.