get_lineups: Lineup Compiler

get_lineupsR Documentation

Lineup Compiler

Description

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.

Usage

get_lineups(play_by_play_data = NA, include_transition = F)

Arguments

play_by_play_data

data frame consisting of play-by-play data from the functions scrape_game() or get_play_by_play()

Value

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


jflancer/bigballR documentation built on March 1, 2025, 3:57 a.m.