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
Usage
ff_draft(conn, ...)
# S3 method for espn_conn
ff_draft(conn, ...)
# S3 method for flea_conn
ff_draft(conn, ...)
# S3 method for mfl_conn
ff_draft(conn, custom_players = deprecated(), ...)
# S3 method for sleeper_conn
ff_draft(conn, ...)
Arguments
- conn
a conn object created by
ff_connect()
- ...
args for other methods
- custom_players
Methods (by class)
espn_conn
: ESPN: returns the current year's draft/auction, including details on keepersflea_conn
: Fleaflicker: returns a table of drafts for the current yearmfl_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{
try({ # try only shown here because sometimes CRAN checks are weird
conn <- espn_connect(season = 2020, league_id = 899513)
ff_draft(conn)
}) # end try
#> # A tibble: 220 × 21
#> round pick overall franchise_id franchise_name user_nickname player_id
#> <int> <int> <int> <int> <chr> <chr> <int>
#> 1 1 1 1 9 "RAFI CUNADO" Brandon11598 3120348
#> 2 1 2 2 5 "The Juggernaut" longhorn0010 4047646
#> 3 1 3 3 1 "The Early GGod" dachosenJuan… 2977644
#> 4 1 4 4 4 "I'm Also Sad " Ciavalen5th 3121422
#> 5 1 5 5 8 "Big Coomers" Zarkoa -16033
#> 6 1 6 6 3 "PAKI STANS" erodriguezk 3122840
#> 7 1 7 7 2 "Coom Dumpster" mfespinosaIV 16800
#> 8 1 8 8 6 "OBJ's Personal Por… drake iz yoda 15683
#> 9 1 9 9 10 "Austin 🐐Drew Lock… espn14856151 14880
#> 10 1 10 10 7 "Tony El Tigre" anthon8821581 2573079
#> # … with 210 more rows, and 14 more variables: player_name <chr>, pos <chr>,
#> # team <chr>, bid_amount <int>, nominating_team_id <int>, is_keeper <lgl>,
#> # can_keeper <lgl>, autodraft_type <int>, complete_date <dttm>,
#> # in_progress <lgl>, pick_id <int>, drafted <lgl>, lineupSlotId <int>,
#> # tradeLocked <lgl>
# }
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
conn <- fleaflicker_connect(season = 2020, league_id = 206154)
ff_draft(conn)
}) # end try
#> # A tibble: 80 × 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 Cr… 15604 Jonathan T… RB
#> 3 1 3 3 1373991 Top City Terrors 15523 CeeDee Lamb WR
#> 4 1 4 4 1374315 Shanghai Commun… 15555 J.K. Dobbi… RB
#> 5 1 5 5 1374271 Clutch City Bal… 15601 D'Andre Sw… RB
#> 6 1 6 6 1374271 Clutch City Bal… 15563 Cam Akers RB
#> 7 1 7 7 1373883 Manitoba Marmots 15540 Justin Jef… WR
#> 8 1 8 8 1373973 Red River Land … 15544 Jerry Jeudy WR
#> 9 1 9 9 1374271 Clutch City Bal… 15537 Chase Young EDR
#> 10 1 10 10 1373535 Winterthur Angr… 15620 Ke'Shawn V… RB
#> # … with 70 more rows, and 1 more variable: team <chr>
# }
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020)
ff_draft(ssb_conn)
}) # end try
#> # A tibble: 90 × 11
#> timestamp round pick overall franchise_id franchise_name player_id
#> <dttm> <chr> <chr> <int> <chr> <chr> <chr>
#> 1 2021-02-08 18:52:22 01 01 1 0014 Team Luigi 11244
#> 2 2021-02-08 19:20:07 01 02 2 0003 Team Donkey K… 14073
#> 3 2021-02-08 20:01:16 01 03 3 0008 Team Bowser 11678
#> 4 2021-02-08 20:01:30 02 01 4 0008 Team Bowser 13131
#> 5 2021-02-08 20:12:30 02 02 5 0003 Team Donkey K… 11671
#> 6 2021-02-09 02:55:39 02 03 6 0012 Team Mewtwo 13593
#> 7 2021-02-09 03:09:50 03 01 7 0014 Team Luigi 0829
#> 8 2021-02-09 03:12:44 03 02 8 0003 Team Donkey K… 11222
#> 9 2021-02-09 03:22:50 03 03 9 0008 Team Bowser 14208
#> 10 2021-02-09 03:23:01 04 01 10 0008 Team Bowser 13156
#> # … with 80 more rows, and 4 more variables: player_name <chr>, pos <chr>,
#> # age <dbl>, team <chr>
# }
# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
ff_draft(jml_conn)
}) # end try
#> # A tibble: 48 × 13
#> draft_id status type season round pick franchise_id franchise_name
#> <chr> <chr> <chr> <chr> <int> <int> <int> <chr>
#> 1 5224587733212405… compl… line… 2020 1 1 4 The FANTom Me…
#> 2 5224587733212405… compl… line… 2020 1 2 5 Barbarians
#> 3 5224587733212405… compl… line… 2020 1 3 11 Permian Panth…
#> 4 5224587733212405… compl… line… 2020 1 4 2 KingGabe
#> 5 5224587733212405… compl… line… 2020 1 5 8 Hocka Flocka
#> 6 5224587733212405… compl… line… 2020 1 6 2 KingGabe
#> 7 5224587733212405… compl… line… 2020 1 7 2 KingGabe
#> 8 5224587733212405… compl… line… 2020 1 8 2 KingGabe
#> 9 5224587733212405… compl… line… 2020 1 9 6 sox05syd
#> 10 5224587733212405… 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>
# }