View source: R/Get Tidy Lineups DK API data.R
get_tidy_lineups_dk_api | R Documentation |
Takes paths for draftkings contest-standings file, and gathers salary data from database to create long format lineup data.
Note that this will result in a dataframe of length (number of players in a lineup) * (number of lineups), so for larger contests this can result in data sets with 1 million+ rows
get_tidy_lineups_dk_api(contest_path, sport)
contest_path |
a path to the contest-standings csv you'd like to tidy up |
sport |
A string specifying the sport of the contest. tidyDK currently supports 'NFL', 'NHL', 'NBA' and 'MLB' |
tidy data.table with a row for each player in a lineup in a contest, joined with ownership and points scored data for each player
lineups <- get_tidy_lineups('./contest-standings-1234564789.csv') head(lineups)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.