Learn R Programming

toRvik (version 1.1.1)

bart_factors: Get Four Factor Statistics

Description

Returns four factor data and team records on a variety of splits, including date range, quadrant level, opponent ranking, game location, and game type.

Usage

bart_factors(
  year = current_season(),
  result = NULL,
  type = NULL,
  start = NULL,
  end = NULL,
  location = NULL,
  last = NULL
)

Value

Returns a tibble with 22 columns:

team

character.

conf

character.

rating

double. Expected scoring margin against an average team on a neutral court.

rank

double.

adj_o

double.

adj_o_rank

double.

adj_d

double.

adj_d_rank

double.

tempo

double.

off_ppp

double. Raw points scored per possession.

off_efg

double. Team effective FG%.

off_to

double. Offensive turnover rate.

off_or

double. Offensive rebound rate.

off_ftr

double. Offensive free throw rate.

def_ppp

double. Raw points allowed per possession.

def_efg

double. Effective FG% allowed.

def_to

double. Turnover rate forced.

def_or

double. Defensive rebound rate.

def_ftr

double. Free throw rate allowed.

wins

integer.

losses

integer.

games

integer.

Arguments

year

Defaults to current season (YYYY).

result

Filters by result ('W' or 'L')

type

Filter by game type ('nc', 'conf', or 'post')

start

Filters by starting date (YYYY-MM-DD)

end

Filters by ending date (YYYY-MM-DD)

location

Filters by game location ('H', 'A', or 'N')

last

Filters by last x games played

Details

For a brief explanation of each factor and its computation, please visit KenPom's blog.

Examples

Run this code
try(bart_factors(year=2022, start='2022-01-13', type='conf'))

Run the code above in your browser using DataLab