A thin wrapper around the pbpstats API’s “get-shot-query-summary” endpoint.
Usage
get_shot_query_summary(
league = "nba",
season,
season_type = "Regular Season",
type,
from_margin,
to_margin,
from_time,
to_time,
period_gte = NULL,
period_lte = NULL,
period_equals = NULL
)
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"
.- type
Character. One of:
"Team"
"Lineup"
"Opponent"
"LineupOpponent"
.
- from_margin
Numeric. Starting point margin for the breakdown.
- to_margin
Numeric. Ending point margin for the breakdown.
- from_time
Integer. Seconds remaining in the period at the start of a possession.
- to_time
Integer. Seconds remaining in the period at the end of a possession.
- period_gte
Integer. Filter for possessions in periods ≥ this value; defaults to
NULL
.- period_lte
Integer. Filter for possessions in periods ≤ this value; defaults to
NULL
.- period_equals
Integer. Filter for possessions in periods == this value; defaults to
NULL
.
References
Darryl Blackport (2020). PBPStats API, MIT License. https://api.pbpstats.com/docs