R/0_generics.R
, R/espn_schedule.R
, R/flea_schedule.R
, and 2 more
ff_schedule.Rd
This function returns a tidy dataframe with one row for every team for every weekly matchup
ff_schedule(conn, ...) # S3 method for espn_conn ff_schedule(conn, ...) # S3 method for flea_conn ff_schedule(conn, week = 1:17, ...) # S3 method for mfl_conn ff_schedule(conn, ...) # S3 method for sleeper_conn ff_schedule(conn, ...)
conn | a conn object created by |
---|---|
... | for other platforms |
week | a numeric or numeric vector specifying which weeks to pull |
A tidy dataframe with one row per game per franchise per week
espn_conn
: ESPN: returns schedule data, one row for every franchise for every week. Completed games have result data.
flea_conn
: Flea: returns schedule data, one row for every franchise for every week. Completed games have result data.
mfl_conn
: MFL: returns schedule data, one row for every franchise for every week. Completed games have result data.
sleeper_conn
: Sleeper: returns all schedule data
#> # A tibble: 140 x 6 #> week franchise_id franchise_score result opponent_id opponent_score #> <int> <int> <dbl> <chr> <int> <dbl> #> 1 1 1 102. L 4 130. #> 2 1 2 156. W 3 135. #> 3 1 3 135. L 2 156. #> 4 1 4 130. W 1 102. #> 5 1 5 133. W 7 131. #> 6 1 6 119. L 9 124. #> 7 1 7 131. L 5 133. #> 8 1 8 120. L 10 122. #> 9 1 9 124. W 6 119. #> 10 1 10 122. W 8 120. #> # … with 130 more rows# } # \donttest{ conn <- fleaflicker_connect(season = 2019, league_id = 206154) x <- ff_schedule(conn, week = 2:4) # } # \donttest{ ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020) ff_schedule(ssb_conn)#> # A tibble: 234 x 6 #> week franchise_id franchise_score result opponent_id opponent_score #> <dbl> <chr> <dbl> <chr> <chr> <dbl> #> 1 1 0001 123. W 0002 103. #> 2 1 0002 103. L 0001 123. #> 3 1 0003 128. L 0004 174. #> 4 1 0004 174. W 0003 128. #> 5 1 0005 144. W 0011 130. #> 6 1 0006 173. W 0013 125. #> 7 1 0007 145. W 0010 127. #> 8 1 0008 185. W 0009 176. #> 9 1 0009 176. L 0008 185. #> 10 1 0010 127. L 0007 145. #> # … with 224 more rows# } # \donttest{ jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020) ff_schedule(jml_conn)#> # A tibble: 156 x 6 #> week franchise_id franchise_score opponent_id opponent_score result #> <int> <int> <dbl> <int> <dbl> <chr> #> 1 1 1 97.8 12 160. L #> 2 1 2 65.9 8 70.2 L #> 3 1 3 103. 10 71 W #> 4 1 4 133. 7 106. W #> 5 1 5 82.4 6 99.3 L #> 6 1 6 99.3 5 82.4 W #> 7 1 7 106. 4 133. L #> 8 1 8 70.2 2 65.9 W #> 9 1 9 78.3 11 147 L #> 10 1 10 71 3 103. L #> # … with 146 more rows# }