This function returns a tidy dataframe of transactions - generally one row per player per transaction per team. Each trade is represented twice, once per each team.

ff_transactions(conn, ...)

# S3 method for espn_conn
ff_transactions(conn, limit = 1000, ...)

# S3 method for flea_conn
ff_transactions(conn, franchise_id = NULL, ...)

# S3 method for mfl_conn
ff_transactions(conn, custom_players = deprecated(), ...)

# S3 method for sleeper_conn
ff_transactions(conn, week = 1:17, ...)

Arguments

conn

the list object created by ff_connect()

...

additional args for other methods

limit

number of most recent transactions to return

franchise_id

fleaflicker returns transactions grouped by franchise id, pass a list here to filter

custom_players

[Deprecated] - now returns custom players by default

week

A week filter for transactions - 1 returns all offseason transactions. Default 1:17 returns all transactions.

Value

A tidy dataframe of transaction data

Methods (by class)

  • espn_conn: ESPN: returns adds, drops, and trades. Requires private/auth-cookie.

  • flea_conn: Fleaflicker: returns all transactions, including free agents, waivers, and trades.

  • mfl_conn: MFL: returns all transactions, including auction, free agents, IR, TS, waivers, and trades.

  • sleeper_conn: Sleeper: returns all transactions, including free agents, waivers, and trades.

Examples

if (FALSE) { # Marked as don't run because this endpoint requires private authentication conn <- espn_connect( season = 2020, league_id = 1178049, swid = Sys.getenv("TAN_SWID"), espn_s2 = Sys.getenv("TAN_ESPN_S2") ) ff_transactions(conn) } # \donttest{ try({ # try only shown here because sometimes CRAN checks are weird conn <- fleaflicker_connect(season = 2020, league_id = 312861) ff_transactions(conn) }) # end try
#> # A tibble: 303 × 12 #> timestamp type type_desc franchise_id franchise_name player_id #> <dttm> <chr> <chr> <int> <chr> <glue> #> 1 2021-07-25 13:19:07 free_ag… dropped 1578553 Running Bear 13782 #> 2 2021-07-25 13:19:07 free_ag… dropped 1578553 Running Bear 15642 #> 3 2021-07-25 13:19:07 free_ag… dropped 1578553 Running Bear 16630 #> 4 2021-07-25 13:19:07 free_ag… dropped 1578553 Running Bear 16386 #> 5 2021-07-07 01:54:05 free_ag… dropped 1581721 Mjenkyns2004's… 16397 #> 6 2021-07-06 01:40:32 free_ag… dropped 1581721 Mjenkyns2004's… 14018 #> 7 2021-07-03 14:24:59 free_ag… dropped 1581721 Mjenkyns2004's… 14849 #> 8 2021-06-30 19:56:06 free_ag… dropped 1581753 fede_mndz's Te… 16576 #> 9 2021-06-30 13:59:25 free_ag… dropped 1581719 Jmuthers's Team 12058 #> 10 2021-06-30 13:59:22 free_ag… dropped 1581719 Jmuthers's Team 11398 #> # … with 293 more rows, and 6 more variables: player_name <glue>, pos <chr>, #> # team <chr>, trade_partner_id <int>, trade_partner_name <chr>, #> # trade_id <int>
# } # \donttest{ try({ # try only shown here because sometimes CRAN checks are weird dlf_conn <- mfl_connect(2019, league_id = 37920) ff_transactions(dlf_conn) }) # end try
#> # A tibble: 1,146 × 12 #> timestamp type type_desc franchise_id franchise_name player_id #> <dttm> <chr> <chr> <chr> <chr> <chr> #> 1 2019-12-19 11:56:49 FREE_… added 0003 Electric Spiders 13868 #> 2 2019-12-19 11:56:49 FREE_… dropped 0003 Electric Spiders 13387 #> 3 2019-12-19 03:03:13 FREE_… added 0019 Advance Reptilia… 12857 #> 4 2019-12-19 03:03:13 FREE_… dropped 0019 Advance Reptilia… 11186 #> 5 2019-12-19 03:02:26 FREE_… added 0019 Advance Reptilia… 13868 #> 6 2019-12-19 03:02:26 FREE_… dropped 0019 Advance Reptilia… 14305 #> 7 2019-12-15 17:28:15 FREE_… added 0003 Electric Spiders 12197 #> 8 2019-12-15 17:27:28 FREE_… dropped 0003 Electric Spiders 12623 #> 9 2019-12-15 17:27:00 FREE_… added 0003 Electric Spiders 13387 #> 10 2019-12-15 17:26:27 IR deactiva… 0003 Electric Spiders 14138 #> # … with 1,136 more rows, and 6 more variables: player_name <chr>, pos <chr>, #> # team <chr>, bbid_spent <dbl>, trade_partner <chr>, comments <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_transactions(jml_conn, week = 1:2) }) # end try
#> # A tibble: 661 × 13 #> timestamp type type_desc franchise_id franchise_name player_id #> <dttm> <chr> <chr> <chr> <chr> <chr> #> 1 2020-09-23 08:04:23 waiver_c… added 5 Barbarians 5162 #> 2 2020-09-23 08:04:23 waiver_c… dropped 5 Barbarians 6074 #> 3 2020-09-23 08:04:23 waiver_c… added 3 solarpool 4054 #> 4 2020-09-23 08:04:23 waiver_f… added 3 solarpool 2431 #> 5 2020-09-23 08:04:23 waiver_f… added 4 The FANTom Me… 5001 #> 6 2020-09-23 08:04:23 waiver_f… dropped 4 The FANTom Me… 4994 #> 7 2020-09-23 08:04:23 waiver_c… added 4 The FANTom Me… 2431 #> 8 2020-09-23 08:04:23 waiver_c… dropped 4 The FANTom Me… 4994 #> 9 2020-09-23 08:04:23 waiver_f… added 6 sox05syd 6001 #> 10 2020-09-23 08:04:23 waiver_f… dropped 6 sox05syd 827 #> # … with 651 more rows, and 7 more variables: player_name <chr>, pos <chr>, #> # team <chr>, bbid_amount <int>, trade_partner <chr>, waiver_priority <int>, #> # comment <chr>
# }