Skip to contents

Return franchise-level data (including divisions, usernames, etc) - available data may vary slightly based on platform.

Usage

ff_franchises(conn)

# S3 method for class 'espn_conn'
ff_franchises(conn)

# S3 method for class 'flea_conn'
ff_franchises(conn)

# S3 method for class 'mfl_conn'
ff_franchises(conn)

# S3 method for class 'sleeper_conn'
ff_franchises(conn)

Arguments

conn

a conn object created by ff_connect()

Value

A tidy dataframe of franchises, complete with IDs

Methods (by class)

  • ff_franchises(espn_conn): ESPN: returns franchise and division information.

  • ff_franchises(flea_conn): Fleaflicker: returns franchise and division information.

  • ff_franchises(mfl_conn): MFL: returns franchise and division information.

  • ff_franchises(sleeper_conn): Sleeper: retrieves a list of franchise information, including user IDs and co-owner IDs.

Examples

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird

  conn <- espn_connect(season = 2020, league_id = 1178049)

  ff_franchises(conn)
}) # end try
#> # A tibble: 14 × 8
#>    franchise_id franchise_name       franchise_abbrev logo  waiver_order user_id
#>           <int> <chr>                <chr>            <chr>        <int> <chr>  
#>  1            1 Rushin' Collusion    RC               http…            3 {6CE35…
#>  2            2 Gurleys Gone Wild    GGW              http…            6 {74ADB…
#>  3            3 The Name's Mage      Mage             http…           12 {141C9…
#>  4            4 dlp:: thoriyan       thor             http…            5 {1E6BB…
#>  5            5 No Ultrasmurfs Allo… ALH              http…            9 {E88F5…
#>  6            6 Dak Street Boys      DSB              http…           11 {441A5…
#>  7            7 Kung-Fu Kenny        KDOT             http…           10 {C6050…
#>  8            8 Sticky Simians       LEL              http…            4 {599F7…
#>  9            9 The Wright Stuff     TWS              NA               8 {F831B…
#> 10           10 Too Many Cooks       COOK             http…            7 {C9AE3…
#> 11           11 Team Typhon          TYPH             http…           14 {070C0…
#> 12           12 Homicidal Hicks      HH               http…            1 {CBF26…
#> 13           13 Baby You Can Drive … POKE             http…           13 {A5DC8…
#> 14           14 Boralus Booty        BB               http…            2 {1778D…
#> # ℹ 2 more variables: user_name <chr>, user_nickname <chr>
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  conn <- fleaflicker_connect(season = 2020, league_id = 206154)
  ff_franchises(conn)
}) # end try
#> # A tibble: 16 × 10
#>    division_id division_name franchise_id franchise_name          franchise_logo
#>          <int> <chr>                <int> <chr>                   <chr>         
#>  1      606681 JDL North          1371776 Winter Hill Black Sham… https://s3.am…
#>  2      606681 JDL North          1373973 Red River Land Thunder  https://s3.am…
#>  3      606681 JDL North          1373501 Midgard Gallows         https://s3.am…
#>  4      606681 JDL North          1373991 Top City Terrors        https://s3.am…
#>  5      606682 JDL East           1374255 Mushroom City Karts     https://s3.am…
#>  6      606682 JDL East           1373475 Winterfell Dire Wolves  https://s3.am…
#>  7      606682 JDL East           1373480 Goldenrod City Nightma… https://s3.am…
#>  8      606682 JDL East           1374252 Central City Crusaders  https://s3.am…
#>  9      606683 JDL South          1373970 Bamenda Herd            https://s3.am…
#> 10      606683 JDL South          1374271 Clutch City Ballers     https://s3.am…
#> 11      606683 JDL South          1374315 Shanghai Communists     NA            
#> 12      606683 JDL South          1373993 Boomtown Sly Foxes      https://s3.am…
#> 13      606684 JDL West           1373393 Philadelphia Fire       https://s3.am…
#> 14      606684 JDL West           1373535 Winterthur Angry Ducks  https://s3.am…
#> 15      606684 JDL West           1373883 Manitoba Marmots        NA            
#> 16      606684 JDL West           1373988 Springfield Isotopes    https://s3.am…
#> # ℹ 5 more variables: franchise_abbrev <chr>, user_id <int>, user_name <chr>,
#> #   user_avatar <chr>, user_lastlogin <dttm>
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  ssb_conn <- ff_connect(platform = "mfl", league_id = 54040, season = 2020)
  ff_franchises(ssb_conn)
}) # end try
#> # A tibble: 14 × 7
#>    franchise_id franchise_name abbrev waiverSortOrder logo  bbidAvailableBalance
#>    <chr>        <chr>          <chr>  <chr>           <chr> <chr>               
#>  1 0001         Team Pikachu   PIKA   1               http… 159.00              
#>  2 0002         Team Simon Be… SIMN   7               http… 99.00               
#>  3 0003         Team Donkey K… DK     6               http… 50.00               
#>  4 0004         Team Ice Clim… ICE    5               http… 0.00                
#>  5 0005         Team Dr. Mario DRM    4               http… 84.00               
#>  6 0006         Team King Ded… KDDD   10              http… 87.00               
#>  7 0007         Team Kirby     KRBY   8               http… 40.00               
#>  8 0008         Team Bowser    BWSR   9               http… 0.00                
#>  9 0009         Team Link      LINK   13              http… 81.00               
#> 10 0010         Team Yoshi     YSHI   12              http… 0.00                
#> 11 0011         Team Diddy Ko… DDY    11              http… 173.00              
#> 12 0012         Team Mewtwo    MEW2   3               http… 0.00                
#> 13 0013         Team Ness      NESS   2               http… 0.00                
#> 14 0014         Team Luigi     LUIG   14              http… 0.00                
#> # ℹ 1 more variable: icon <chr>
# }

# \donttest{
try({ # try only shown here because sometimes CRAN checks are weird
  jml_conn <- ff_connect(platform = "sleeper", league_id = "522458773317046272", season = 2020)
  ff_franchises(jml_conn)
}) # end try
#> # A tibble: 12 × 5
#>    franchise_id franchise_name    user_name      user_id            co_owners 
#>           <int> <chr>             <chr>          <chr>              <list>    
#>  1            1 Fake News         Jcurtis44      70729037081100288  <NULL>    
#>  2            2 KingGabe          KingGabe       76686532077305856  <NULL>    
#>  3            3 solarpool         solarpool      202892038360801280 <NULL>    
#>  4            4 The FANTom Menace weeknee        202882046337490944 <NULL>    
#>  5            5 Barbarians        ABitterHomer   386383436639973376 <NULL>    
#>  6            6 sox05syd          sox05syd       409797051455393792 <NULL>    
#>  7            7 Flipadelphia05    Flipadelphia05 386950378371207168 <NULL>    
#>  8            8 Hocka Flocka      TwoFrames      386976568364306432 <NULL>    
#>  9            9 ZPMiller97        ZPMiller97     386571720443764736 <NULL>    
#> 10           10 JMLarkin          JMLarkin       387070108625039360 <NULL>    
#> 11           11 Permian Panthers  theoracleETS   198540145396289536 <list [1]>
#> 12           12 jaydk             jaydk          401485903224193024 <NULL>    
# }