Skip to contents

A thin wrapper around the pbpstats API’s “get-lineup-subunit-stats” endpoint.

Usage

get_lineup_subunit_stats(
  league = "nba",
  season,
  season_type = "Regular Season",
  team_id,
  lineup_id,
  sub_unit_size
)

Arguments

league

Character. Which league to query; e.g., "nba" or "wnba"; defaults to "nba".

season

Character or integer. The season to query; e.g. "2024-25".

season_type

Character. One of:

  • "Regular Season"

  • "Playoffs"

  • "PlayIn"

  • "All"

; defaults to "Regular Season".

team_id

Integer or character. The pbpstats ID of the team.

lineup_id

Character. The pbpstats lineup ID (hyphen-separated player IDs sorted as strings).

sub_unit_size

Integer. Number of players in each subunit (2, 3, or 4 players of a 5-player lineup).

Value

A tibble of lineup subunit stats as returned by the API.

References

Darryl Blackport (2020). PBPStats API, MIT License. https://api.pbpstats.com/docs