Skip to contents

This function returns a dataframe with detailed scoring settings for each league - broken down by event, points, and (if available) position.

Usage

ff_scoring(conn)

# S3 method for espn_conn
ff_scoring(conn)

# S3 method for flea_conn
ff_scoring(conn)

# S3 method for mfl_conn
ff_scoring(conn)

# S3 method for sleeper_conn
ff_scoring(conn)

# S3 method for template_conn
ff_scoring(conn)

Arguments

conn

a conn object created by ff_connect()

Value

A tibble of league scoring rules for each position defined.

Methods (by class)

  • espn_conn: ESPN: returns scoring settings in a flat table, override positions have their own scoring.

  • flea_conn: Fleaflicker: returns scoring settings in a flat table, one row per position per rule.

  • mfl_conn: MFL: returns scoring settings in a flat table, one row per position per rule.

  • sleeper_conn: Sleeper: returns scoring settings in a flat table, one row per position per rule.

  • template_conn: Template: returns MFL style scoring settings in a flat table, one row per position per rule.

Examples

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  conn <- espn_connect(season = 2020, league_id = 899513)
  ff_scoring(conn)
}) # end try
#> # A tibble: 627 × 4
#>    pos   points stat_id stat_name                    
#>    <chr>  <dbl>   <int> <chr>                        
#>  1 QB         0     133 defensive400To449YardsAllowed
#>  2 RB         0     133 defensive400To449YardsAllowed
#>  3 WR         0     133 defensive400To449YardsAllowed
#>  4 TE         0     133 defensive400To449YardsAllowed
#>  5 K          0     133 defensive400To449YardsAllowed
#>  6 P          0     133 defensive400To449YardsAllowed
#>  7 DT         0     133 defensive400To449YardsAllowed
#>  8 DE         0     133 defensive400To449YardsAllowed
#>  9 LB         0     133 defensive400To449YardsAllowed
#> 10 CB         0     133 defensive400To449YardsAllowed
#> # … with 617 more rows
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  joe_conn <- ff_connect(platform = "fleaflicker", league_id = 312861, season = 2020)
  ff_scoring(joe_conn)
}) # end try
#> # A tibble: 72 × 7
#>    pos   event                   abbrev points label   desc             event_id
#>    <chr> <chr>                   <chr>   <dbl> <chr>   <chr>               <int>
#>  1 QB    Passing Yard            Yd       0.04 Passing 1 point for eve…        3
#>  2 RB    Passing Yard            Yd       0.04 Passing 1 point for eve…        3
#>  3 WR    Passing Yard            Yd       0.04 Passing 1 point for eve…        3
#>  4 TE    Passing Yard            Yd       0.04 Passing 1 point for eve…        3
#>  5 QB    Passing TD              TD       6    Passing 6 points for ev…        5
#>  6 RB    Passing TD              TD       6    Passing 6 points for ev…        5
#>  7 WR    Passing TD              TD       6    Passing 6 points for ev…        5
#>  8 TE    Passing TD              TD       6    Passing 6 points for ev…        5
#>  9 QB    2 Pt Conversion Passing 2PC      2    Passing 2 points for ev…        4
#> 10 RB    2 Pt Conversion Passing 2PC      2    Passing 2 points for ev…        4
#> # … with 62 more rows
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020)
  ff_scoring(ssb_conn)
}) # end try
#> # A tibble: 71 × 7
#>    pos   points range   event points_type short_desc            long_desc       
#>    <chr>  <dbl> <chr>   <chr> <chr>       <chr>                 <chr>           
#>  1 TE      0.25 0-99    CC    each        Receptions            This is the num…
#>  2 TE      0.25 1-50    1R    each        Rushing First Downs   This is the num…
#>  3 TE      0.25 1-50    1C    each        Receiving First Downs This is the num…
#>  4 QB      6    0-10    #P    each        Number of Passing TDs This is the tot…
#>  5 RB      6    0-10    #P    each        Number of Passing TDs This is the tot…
#>  6 WR      6    0-10    #P    each        Number of Passing TDs This is the tot…
#>  7 TE      6    0-10    #P    each        Number of Passing TDs This is the tot…
#>  8 QB      0.04 -50-999 PY    each        Passing Yards         This is the tot…
#>  9 RB      0.04 -50-999 PY    each        Passing Yards         This is the tot…
#> 10 WR      0.04 -50-999 PY    each        Passing Yards         This is the tot…
#> # … with 61 more rows
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
  ff_scoring(jml_conn)
}) # end try
#> # A tibble: 169 × 3
#>    pos   event    points
#>    <chr> <chr>     <dbl>
#>  1 QB    pass_2pt      2
#>  2 RB    pass_2pt      2
#>  3 WR    pass_2pt      2
#>  4 TE    pass_2pt      2
#>  5 K     pass_2pt      2
#>  6 QB    pass_int     -2
#>  7 RB    pass_int     -2
#>  8 WR    pass_int     -2
#>  9 TE    pass_int     -2
#> 10 K     pass_int     -2
#> # … with 159 more rows
# }

# \donttest{
template_ppr <- ff_template(scoring_type = "ppr")
ff_scoring(template_ppr)
#> # A tibble: 228 × 7
#>    pos   points range event points_type short_desc              long_desc       
#>    <chr>  <dbl> <chr> <chr> <chr>       <chr>                   <chr>           
#>  1 TE         6 0-10  #C    each        Number of Receiving TDs This is the tot…
#>  2 QB         6 0-10  #C    each        Number of Receiving TDs This is the tot…
#>  3 RB         6 0-10  #C    each        Number of Receiving TDs This is the tot…
#>  4 PK         6 0-10  #C    each        Number of Receiving TDs This is the tot…
#>  5 WR         6 0-10  #C    each        Number of Receiving TDs This is the tot…
#>  6 DT         6 0-10  #C    each        Number of Receiving TDs This is the tot…
#>  7 DE         6 0-10  #C    each        Number of Receiving TDs This is the tot…
#>  8 LB         6 0-10  #C    each        Number of Receiving TDs This is the tot…
#>  9 CB         6 0-10  #C    each        Number of Receiving TDs This is the tot…
#> 10 S          6 0-10  #C    each        Number of Receiving TDs This is the tot…
#> # … with 218 more rows
# }