This function returns a tidy dataframe with one row for every team for every weekly matchup

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, ...)

Arguments

conn

a conn object created by ff_connect()

...

for other platforms

week

a numeric or numeric vector specifying which weeks to pull

Value

A tidy dataframe with one row per game per franchise per week

Methods (by class)

  • 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

Examples

# \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: 190 x 7 #> week franchise_id franchise_score spread result opponent_id opponent_score #> <dbl> <chr> <dbl> <dbl> <chr> <chr> <dbl> #> 1 1 0001 123. NA W 0002 103. #> 2 1 0002 103. NA L 0001 123. #> 3 1 0003 128. NA L 0004 174. #> 4 1 0004 174. NA W 0003 128. #> 5 1 0005 144. NA W 0011 130. #> 6 1 0006 173. NA W 0013 125. #> 7 1 0007 145. NA W 0010 127. #> 8 1 0008 185. NA W 0009 176. #> 9 1 0009 176. NA L 0008 185. #> 10 1 0010 127. NA L 0007 145. #> # … with 180 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
# }