get_tidy_lineups_dk_api: Get Tidy Lineups DK API

View source: R/Get Tidy Lineups DK API data.R

get_tidy_lineups_dk_apiR Documentation

Get Tidy Lineups DK API

Description

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

Usage

get_tidy_lineups_dk_api(contest_path, sport)

Arguments

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'

Value

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

Examples


lineups <- get_tidy_lineups('./contest-standings-1234564789.csv')
head(lineups)



Dmunslow/tidyDK documentation built on Nov. 8, 2022, 8:53 a.m.