get_lineups | R Documentation |
This function takes in a play-by-play dataframe, and generates all possible lineups for both teams. It then calculates a variety of statistics/metrics at a lineup level.
get_lineups(play_by_play_data = NA, include_transition = F)
play_by_play_data |
data frame consisting of play-by-play data from the functions scrape_game() or get_play_by_play() |
data frame with each row representing a unique lineup. All stats for entire lineup or opponent (o- prefix)
P1 - Player in lineup
P2 - Player in lineup
P3 - Player in lineup
P4 - Player in lineup
P5 - Player in lineup
Team - Team for the lineup
Mins - Minutes the lineup was on the court
PTS - Points scored
FGA - Field goal attempts
TO - Turnovers
TPA - Three point attempts
FGM - Field goals made
TPM - Three points made
FTA - Free throw attempts
FTM - Free throws made
ORB - Offensive rebounds
DRB - Defensive rebounds
RIMA - Rim attempts: defined as layups, dunks, tip-ins, hook attempts
BLK - Blocked shots
AST - Assists
POSS - (Offensive) Possessions: (FGA + .475 x FTA - ORB + TO + oFGA + .475 x oFTA - oORB + oTO) /2
TS. - True shooting percentage: (PTS / 2) / (FGA + .475 x FTA),
eFG. - Effective field goal percentage: (FGM + 0.5 x TPM) / FGA,
TPP - Three point percentage: TPA/TPM
FTP - Free throw percentage: FTA/FTM
TPrate - Three point attempt rate: TPA/FGA
ASTrate - Assist rate: AST/FGM
TOrate - Turnover rate: TO/POSS
FTrate - Free throw rate: FTA/FGA
BLKrate - Block rate: BLK/FGA
ORB. - Offensive rebound percentage: ORB / (ORB + oDRB)
DRB. - Defensive rebound percentage: DRB / (DRB + oORB)
ORTG - Offensive efficiency: 100 * (PTS/POSS)
DRTG - Defensive efficiency: 100 * (oPTS/POSS)
NETRTG - Net efficiency: OEFF - DEFF
TimePerPoss - Average time per possession (Seconds): (Possessions / Mins) * 60
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.