Skip to contents

Returns game-by-game four factor statistics.

Usage

bart_game_factors(
  year = current_season(),
  team = NULL,
  conf = NULL,
  opp_conf = NULL,
  type = NULL,
  location = NULL,
  result = NULL
)

Arguments

year

Defaults to current season (YYYY).

team

Filters to team.

conf

Filters to conference.

opp_conf

Filters to opponent's conference.

type

Filters for game type ('nc', 'conf', 'conf_t', 'post')

location

Filters for game location ('H', 'A', 'N')

result

Filters for game result.

Value

Returns a tibble of four factor statistics

Details

For a brief explanation of each factor and its computation, please visit KenPom's blog. `avg_marg` and `opp_avg_marg` is the the average lead or deficit during a game.

Examples

bart_game_factors(year=2022)
#> ── Game Factors ──────────────────────────────────────────────── toRvik 1.1.0 ──
#>  Data updated: 2022-09-09 13:47:27 EDT
#> # A tibble: 10,950 × 28
#>    date      type  team  conf  opp   opp_c…¹ loc   result avg_marg opp_a…² adj_o
#>    <chr>     <chr> <chr> <chr> <chr> <chr>   <chr> <chr>     <dbl>   <dbl> <dbl>
#>  1 2022-04-… post  Kans… B12   Nort… ACC     N     W, 72…  -2.09     0.911  106 
#>  2 2022-04-… post  Nort… ACC   Kans… B12     N     L, 72…   2.09     0.958  108.
#>  3 2022-04-… post  Duke  ACC   Nort… ACC     N     L, 81…   0.0621   0.911  123.
#>  4 2022-04-… post  Nort… ACC   Duke  ACC     N     W, 81…  -0.0621   0.944  123.
#>  5 2022-04-… post  Kans… B12   Vill… BE      N     W, 81…  10.9      0.935  155.
#>  6 2022-04-… post  Vill… BE    Kans… B12     N     L, 81… -10.9      0.958  125.
#>  7 2022-04-… post  Coas… SB    Fres… MWC     H     L, 85… -13.2      0.739  115 
#>  8 2022-04-… post  Fres… MWC   Coas… SB      A     W, 85…  13.2      0.589  136.
#>  9 2022-03-… post  Texa… SEC   Xavi… BE      N     L, 73…  -0.0246   0.821  114.
#> 10 2022-03-… post  Xavi… BE    Texa… SEC     N     W, 73…   0.0246   0.860  119.
#> # … with 10,940 more rows, 17 more variables: adj_d <dbl>, off_ppp <dbl>,
#> #   off_efg <dbl>, off_to <dbl>, off_or <dbl>, off_ftr <dbl>, def_ppp <dbl>,
#> #   def_efg <dbl>, def_to <dbl>, def_or <dbl>, def_ftr <dbl>, game_score <dbl>,
#> #   season <int>, tempo <dbl>, game_id <chr>, coach <chr>, opp_coach <chr>, and
#> #   abbreviated variable names ¹​opp_conf, ²​opp_avg_marg