Fetch possession length frequency from the pbpstats API
Source:R/pbpstats.R
get_possession_length_frequency.RdA thin wrapper around the pbpstats API’s “get-possession-length-frequency” endpoint.
Usage
get_possession_length_frequency(
league = "nba",
season,
season_type = "Regular Season",
poss_type,
time_type,
start_type = "All"
)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".- poss_type
Character. One of:
"Offense""Defense"
.
- time_type
Character. One of:
"IncludeSecondChances""ExcludeSecondChances"
.
- start_type
Character. Defines the event that starts the possession; one of:
"All""OffMissedFG""OffMissed2""OffMissed3""OffMadeFG""OffMade2""OffMade3""OffAtRimMake""OffAtRimMiss""OffAtRimBlock""OffShortMidRangeMake""OffShortMidRangeMiss""OffLongMidRangeMake""OffLongMidRangeMiss""OffArc3Make""OffArc3Miss""OffCorner3Make""OffCorner3Miss""OffFTMake""OffFTMiss""OffLiveBallTurnover""OffDeadball""OffTimeout"
.
References
Darryl Blackport (2020). PBPStats API, MIT License. https://api.pbpstats.com/docs