R/0_generics.R
, R/flea_transactions.R
, R/mfl_transactions.R
, and 1 more
ff_transactions.Rd
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, ...)
conn | the list object created by |
---|---|
... | 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. |
A tidy dataframe of transaction data
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.
#> # A tibble: 104 x 12 #> timestamp type type_desc franchise_id franchise_name player_id #> <dttm> <chr> <chr> <int> <chr> <glue> #> 1 2020-12-23 11:00:00 free… dropped 1581721 Mjenkyns2004'… 15977 #> 2 2020-12-23 11:00:00 waiv… added 1581721 Mjenkyns2004'… 15937 #> 3 2020-12-20 11:00:00 free… dropped 1581721 Mjenkyns2004'… 6610 #> 4 2020-12-20 11:00:00 waiv… added 1581721 Mjenkyns2004'… 13027 #> 5 2020-12-16 11:00:00 free… dropped 1581718 Officially Re… 13095 #> 6 2020-12-16 11:00:00 waiv… added 1581718 Officially Re… 13898 #> 7 2020-12-16 11:00:00 free… dropped 1581722 syd12nyjets's… 12151 #> 8 2020-12-16 11:00:00 waiv… added 1581722 syd12nyjets's… 13844 #> 9 2020-12-11 11:00:00 free… dropped 1581718 Officially Re… 13816 #> 10 2020-12-11 11:00:00 waiv… added 1581718 Officially Re… 12232 #> # … with 94 more rows, and 6 more variables: player_name <glue>, pos <chr>, #> # team <chr>, trade_partner_id <int>, trade_partner_name <chr>, #> # trade_id <int>#> # 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) # }