View source: R/Get Tidy Lineups.R
get_tidy_lineups | R Documentation |
Takes paths for draftkings contest-standings file, and corresponding salary file. returns a tidy version, where each row corresponds to a player in a lineup.
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(contest_path, salary_path, sport, contest_id = NULL)
contest_path |
a path to the contest-standings csv you'd like to tidy up |
salary_path |
a path to the salary file corresponding to the contest-standing file you are tidying |
sport |
A string specifying the sport of the contest. tidyDK currently supports 'NFL', 'NHL', 'NBA' and 'MLB' |
contest_id |
an ID that you'd like to assign to all rows of the file (optional) |
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', './DKsalaries.csv', "NFL") head(lineups)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.