Skip to contents

This function lightly wraps ffscrapr::ff_franchises() and adds league_id, which is a required column for ffsimulator.

Usage

ffs_franchises(conn)

Arguments

conn

a connection object as created by ffscrapr::ff_connect() and friends.

Value

a dataframe of franchises that includes the league_id column

See also

vignette("Custom Simulations") for more detailed example usage

Examples

# \donttest{
# cached examples
conn <- .ffs_cache("mfl_conn.rds")

try({ # prevents CRAN connectivity issues, not actually required in normal usage
ffs_franchises(conn)
})
#> # A tibble: 12 × 11
#>    franchise_id franc…¹ salar…² stadium icon  waive…³ bbidA…⁴ abbrev logo  sound
#>    <chr>        <chr>   <chr>   <chr>   <chr> <chr>   <chr>   <chr>  <chr> <chr>
#>  1 0001         Mexico… ""      MC      http… 9       10.76   PewPew http… NA   
#>  2 0002         Dirty … ""      NA      http… 6       0.34    NA     http… NA   
#>  3 0003         Albert… ""      NA      http… 3       1.52    AA     NA    NA   
#>  4 0004         Electr… ""      Menlo … http… 10      1.06    EW     http… NA   
#>  5 0005         Motor … ""      NA      NA    2       1.45    NA     NA    NA   
#>  6 0006         Hoth C… ""      Echo B… http… 1       3.79    HCT    http… NA   
#>  7 0007         Disper… ""      NA      NA    8       1.24    NA     NA    NA   
#>  8 0008         DS      ""      NA      NA    5       0.92    NA     NA    NA   
#>  9 0009         Kill D… ""      NA      http… 11      7.29    KDHC   http… NA   
#> 10 0010         Disper… ""      NA      NA    7       2.04    NA     NA    NA   
#> 11 0011         TB12    ""      NA      http… 4       0.03    NA     http… NA   
#> 12 0012         Indigo… ""      NA      http… 12      15.50   NA     http… http…
#> # … with 1 more variable: league_id <chr>, and abbreviated variable names
#> #   ¹​franchise_name, ²​salaryCapAmount, ³​waiverSortOrder, ⁴​bbidAvailableBalance
# }