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 flea_conn
ff_transactions(conn, franchise_id = NULL, ...)

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

# 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

franchise_id

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

custom_players

TRUE or FALSE - fetch custom players

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)

  • 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

# \donttest{ conn <- fleaflicker_connect(season = 2020, league_id = 312861) ff_transactions(conn)
#> # A tibble: 86 x 12 #> timestamp type type_desc franchise_id franchise_name player_id #> <dttm> <chr> <chr> <int> <chr> <glue> #> 1 2020-11-25 11:00:00 free… dropped 1581753 fede_mndz's T… 16044 #> 2 2020-11-25 11:00:00 waiv… added 1581753 fede_mndz's T… 14773 #> 3 2020-11-18 11:00:00 free… dropped 1581722 syd12nyjets's… 14009 #> 4 2020-11-18 11:00:00 waiv… added 1581722 syd12nyjets's… 15937 #> 5 2020-11-18 11:00:00 free… dropped 1582423 The Verblande… 13844 #> 6 2020-11-18 11:00:00 waiv… added 1582423 The Verblande… 13904 #> 7 2020-11-12 11:00:00 waiv… added 1581722 syd12nyjets's… 14009 #> 8 2020-11-04 11:00:00 free… dropped 1582416 Ray Jay Team 11504 #> 9 2020-11-04 11:00:00 waiv… added 1582416 Ray Jay Team 13194 #> 10 2020-10-30 10:00:00 waiv… added 1581726 SCJaguars's T… 15639 #> # … with 76 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{ dlf_conn <- mfl_connect(2019, league_id = 37920) ff_transactions(dlf_conn)
#> # A tibble: 1,146 x 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 Spid… 13868 #> 2 2019-12-19 11:56:49 FREE… dropped 0003 Electric Spid… 13387 #> 3 2019-12-19 03:03:13 FREE… added 0019 Advance Repti… 12857 #> 4 2019-12-19 03:03:13 FREE… dropped 0019 Advance Repti… 11186 #> 5 2019-12-19 03:02:26 FREE… added 0019 Advance Repti… 13868 #> 6 2019-12-19 03:02:26 FREE… dropped 0019 Advance Repti… 14305 #> 7 2019-12-15 17:28:15 FREE… added 0003 Electric Spid… 12197 #> 8 2019-12-15 17:27:28 FREE… dropped 0003 Electric Spid… 12623 #> 9 2019-12-15 17:27:00 FREE… added 0003 Electric Spid… 13387 #> 10 2019-12-15 17:26:27 IR deactiva… 0003 Electric Spid… 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{ jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020) x <- ff_transactions(jml_conn, week = 1:17) # }