Skip to contents

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

[Deprecated] - now returns custom players by default

Value

A tidy dataframe of draft results

Methods (by class)

  • ff_draft(espn_conn): ESPN: returns the current year's draft/auction, including details on keepers

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

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

  • ff_draft(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 franch…¹ user_…² playe…³ playe…⁴ pos   team 
#>    <int> <int>   <int>        <int> <chr>    <chr>     <int> <chr>   <chr> <chr>
#>  1     1     1       1            9 "RAFI C… Brando… 3120348 JuJu S… WR    PIT  
#>  2     1     2       2            5 "The Ju… longho… 4047646 A.J. B… WR    TEN  
#>  3     1     3       3            1 "The Ea… dachos… 2977644 Todd G… RB    ATL  
#>  4     1     4       4            4 "I'm Al… Ciaval… 3121422 Terry … WR    WAS  
#>  5     1     5       5            8 "Big Co… Zarkoa   -16033 Ravens… DST   BAL  
#>  6     1     6       6            3 "PAKI S… erodri… 3122840 Deshau… QB    HOU  
#>  7     1     7       7            2 "Coom  … mfespi…   16800 Davant… WR    GBP  
#>  8     1     8       8            6 "OBJ's … drake …   15683 Justin… K     BAL  
#>  9     1     9       9           10 "Austin… espn14…   14880 Kirk C… QB    MIN  
#> 10     1    10      10            7 "Tony E… anthon… 2573079 Carson… QB    IND  
#> # … with 210 more rows, 11 more variables: 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>, and
#> #   abbreviated variable names ¹​franchise_name, ²​user_nickname, ³​player_id,
#> #   ⁴​player_name
# }

# \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   playe…¹ playe…² pos   team 
#>    <int> <int>   <int>        <int> <chr>              <int> <chr>   <chr> <chr>
#>  1     1     1       1      1373970 Bamenda Herd       15539 Clyde … RB    KC   
#>  2     1     2       2      1374252 Central City Cr…   15604 Jonath… RB    IND  
#>  3     1     3       3      1373991 Top City Terrors   15523 CeeDee… WR    DAL  
#>  4     1     4       4      1374315 Shanghai Commun…   15555 J.K. D… RB    BAL  
#>  5     1     5       5      1374271 Clutch City Bal…   15601 D'Andr… RB    DET  
#>  6     1     6       6      1374271 Clutch City Bal…   15563 Cam Ak… RB    LAR  
#>  7     1     7       7      1373883 Manitoba Marmots   15540 Justin… WR    MIN  
#>  8     1     8       8      1373973 Red River Land …   15544 Jerry … WR    DEN  
#>  9     1     9       9      1374271 Clutch City Bal…   15537 Chase … EDR   WAS  
#> 10     1    10      10      1373535 Winterthur Angr…   15620 Ke'Sha… RB    TB   
#> # … with 70 more rows, and abbreviated variable names ¹​player_id, ²​player_name
# }

# \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 franc…¹ franc…² playe…³ playe…⁴ pos  
#>    <dttm>              <chr> <chr>   <int> <chr>   <chr>   <chr>   <chr>   <chr>
#>  1 2021-02-08 18:52:22 01    01          1 0014    Team L… 11244   Kelce,… TE   
#>  2 2021-02-08 19:20:07 01    02          2 0003    Team D… 14073   Jacobs… RB   
#>  3 2021-02-08 20:01:16 01    03          3 0008    Team B… 11678   Robins… WR   
#>  4 2021-02-08 20:01:30 02    01          4 0008    Team B… 13131   Mixon,… RB   
#>  5 2021-02-08 20:12:30 02    02          5 0003    Team D… 11671   Evans,… WR   
#>  6 2021-02-09 02:55:39 02    03          6 0012    Team M… 13593   Jackso… QB   
#>  7 2021-02-09 03:09:50 03    01          7 0014    Team L… 0829    2021 P… XX   
#>  8 2021-02-09 03:12:44 03    02          8 0003    Team D… 11222   Allen,… WR   
#>  9 2021-02-09 03:22:50 03    03          9 0008    Team B… 14208   Johnso… WR   
#> 10 2021-02-09 03:23:01 04    01         10 0008    Team B… 13156   Smith-… WR   
#> # … with 80 more rows, 2 more variables: age <dbl>, team <chr>, and abbreviated
#> #   variable names ¹​franchise_id, ²​franchise_name, ³​player_id, ⁴​player_name
# }

# \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…¹ status type  season round  pick franc…² franc…³ playe…⁴ playe…⁵ pos  
#>    <chr>   <chr>  <chr> <chr>  <int> <int>   <int> <chr>   <chr>   <chr>   <chr>
#>  1 522458… compl… line… 2020       1     1       4 The FA… 6820    Clyde … RB   
#>  2 522458… compl… line… 2020       1     2       5 Barbar… 6813    Jonath… RB   
#>  3 522458… compl… line… 2020       1     3      11 Permia… 6806    J.K. D… RB   
#>  4 522458… compl… line… 2020       1     4       2 KingGa… 6783    Jerry … WR   
#>  5 522458… compl… line… 2020       1     5       8 Hocka … 6938    Cam Ak… RB   
#>  6 522458… compl… line… 2020       1     6       2 KingGa… 6790    D'Andr… RB   
#>  7 522458… compl… line… 2020       1     7       2 KingGa… 6786    CeeDee… WR   
#>  8 522458… compl… line… 2020       1     8       2 KingGa… 6794    Justin… WR   
#>  9 522458… compl… line… 2020       1     9       6 sox05s… 6798    Jalen … WR   
#> 10 522458… compl… line… 2020       1    10       9 ZPMill… 6789    Henry … WR   
#> # … with 38 more rows, 2 more variables: age <dbl>, team <chr>, and abbreviated
#> #   variable names ¹​draft_id, ²​franchise_id, ³​franchise_name, ⁴​player_id,
#> #   ⁵​player_name
# }