Fetch league year-over-year plots from the pbpstats API
Source:R/pbpstats.R
get_year_over_year_plots.RdA thin wrapper around the pbpstats API’s “get-league-year-over-year-plots” endpoint.
Usage
get_year_over_year_plots(
league = "nba",
season_type = "Regular Season",
left_axis,
right_axis
)Arguments
- league
Character. Which league to query; e.g.,
"nba"or"wnba"; defaults to"nba".- season_type
Character. One of:
"Regular Season""Playoffs""PlayIn""All"
; defaults to
"Regular Season".- left_axis
Character. One of the statistical metrics to plot on the left axis. Options include:
"PtsPer100Poss""SecondsPerPoss""FG3APct""Fg3Pct""AtRimFrequency""AtRimAccuracy""AtRimPctAssisted""ShortMidRangeFrequency""ShortMidRangeAccuracy""ShortMidRangePctAssisted""LongMidRangeFrequency""LongMidRangeAccuracy""LongMidRangePctAssisted""Corner3Frequency""Corner3Accuracy""Corner3PctAssisted""Arc3Frequency""Arc3Accuracy""Arc3PctAssisted""LiveBallTurnoverPct""EfgPct""DefFTReboundPct""OffFTReboundPct""DefTwoPtReboundPct""OffTwoPtReboundPct""DefThreePtReboundPct""OffThreePtReboundPct""DefFGReboundPct""OffFGReboundPct""OffAtRimReboundPct""OffShortMidRangeReboundPct""OffLongMidRangeReboundPct""OffArc3ReboundPct""OffCorner3ReboundPct""DefAtRimReboundPct""DefShortMidRangeReboundPct""DefLongMidRangeReboundPct""DefArc3ReboundPct""DefCorner3ReboundPct""SecondChancePtsPer100PossSecondChance""PenaltyPtsPer100PossPenalty""SecondChanceOffPossPer100Poss""FirstChancePtsPer100Poss""SecondChancePtsPer100Poss""PenaltyOffPossPer100Poss""Avg2ptShotDistance""Avg3ptShotDistance"
- right_axis
Character. One of the same options as
left_axis, plotted on the right axis.
References
Darryl Blackport (2020). PBPStats API, MIT License. https://api.pbpstats.com/docs