This function gets a tidy dataframe of draft results for the current year. Can handle MFL devy drafts or startup drafts by specifying the custom_players argument

ff_draft(conn, ...)

# S3 method for flea_conn
ff_draft(conn, ...)

# S3 method for mfl_conn
ff_draft(conn, custom_players = FALSE, ...)

# S3 method for sleeper_conn
ff_draft(conn, ...)

Arguments

conn

a conn object created by ff_connect()

...

args for other methods

custom_players

MFL: TRUE or FALSE - retrieve custom players from the MFL database? (Allows for devy, placeholder picks, slightly slower)

Value

A tidy dataframe of draft results

Methods (by class)

  • flea_conn: Fleaflicker: returns a table of drafts for the current year

  • mfl_conn: MFL: returns a table of drafts for the current year - can handle devy/startup-rookie-picks by specifying custom_players (slower!)

  • sleeper_conn: Sleeper: returns a dataframe of all drafts and draft selections, if available.

Examples

# \donttest{ conn <- fleaflicker_connect(season = 2020, league_id = 206154) ff_draft(conn)
#> # A tibble: 80 x 9 #> round pick overall franchise_id franchise_name player_id player_name pos #> <int> <int> <int> <int> <chr> <int> <chr> <chr> #> 1 1 1 1 1373970 Bamenda Herd 15539 Clyde Edwa… RB #> 2 1 2 2 1374252 Central City … 15604 Jonathan T… RB #> 3 1 3 3 1373991 Top City Terr… 15523 CeeDee Lamb WR #> 4 1 4 4 1374315 Shanghai Comm… 15555 J.K. Dobbi… RB #> 5 1 5 5 1374271 Clutch City B… 15601 D'Andre Sw… RB #> 6 1 6 6 1374271 Clutch City B… 15563 Cam Akers RB #> 7 1 7 7 1373883 Manitoba Marm… 15540 Justin Jef… WR #> 8 1 8 8 1373973 Red River Lan… 15544 Jerry Jeudy WR #> 9 1 9 9 1374271 Clutch City B… 15537 Chase Young EDR #> 10 1 10 10 1373535 Winterthur An… 15620 Ke'Shawn V… RB #> # … with 70 more rows, and 1 more variable: team <chr>
# } # \donttest{ ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020) ff_draft(ssb_conn)
#> # A tibble: 57 x 10 #> timestamp round pick franchise_id franchise_name player_id #> <dttm> <chr> <chr> <chr> <chr> <chr> #> 1 2020-05-15 19:43:56 01 01 0001 Team Pikachu 14803 #> 2 2020-05-15 19:53:18 01 02 0012 Team Mewtwo 14802 #> 3 2020-05-15 19:58:24 01 03 0010 Team Yoshi 14797 #> 4 2020-05-15 21:19:59 01 04 0013 Team Ness 14800 #> 5 2020-05-16 02:47:24 01 05 0010 Team Yoshi 14799 #> 6 2020-05-16 02:48:15 01 06 0012 Team Mewtwo 14833 #> 7 2020-05-16 04:03:59 01 07 0011 Team Diddy Ko… 14832 #> 8 2020-05-16 07:00:48 01 08 0007 Team Kirby 14839 #> 9 2020-05-16 12:38:48 01 09 0006 Team King Ded… 14836 #> 10 2020-05-16 13:47:29 01 10 0006 Team King Ded… 14834 #> # … with 47 more rows, and 4 more variables: player_name <chr>, pos <chr>, #> # age <dbl>, team <chr>
# } # \donttest{ jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020) ff_draft(jml_conn)
#> # A tibble: 48 x 13 #> draft_id status type season round pick franchise_id franchise_name #> <chr> <chr> <chr> <chr> <int> <int> <int> <chr> #> 1 5224587… compl… line… 2020 1 1 4 The FANTom Me… #> 2 5224587… compl… line… 2020 1 2 5 Barbarians #> 3 5224587… compl… line… 2020 1 3 11 Permian Panth… #> 4 5224587… compl… line… 2020 1 4 2 KingGabe #> 5 5224587… compl… line… 2020 1 5 8 Hocka Flocka #> 6 5224587… compl… line… 2020 1 6 2 KingGabe #> 7 5224587… compl… line… 2020 1 7 2 KingGabe #> 8 5224587… compl… line… 2020 1 8 2 KingGabe #> 9 5224587… compl… line… 2020 1 9 6 sox05syd #> 10 5224587… compl… line… 2020 1 10 9 ZPMiller97 #> # … with 38 more rows, and 5 more variables: player_id <chr>, #> # player_name <chr>, pos <chr>, age <dbl>, team <chr>
# }