Skip to contents

A thin wrapper around the pbpstats API’s “get-endgame-breakeven-2-pct” endpoint.

Usage

get_endgame_breakeven_2_pct(
  league = "nba",
  margin,
  seconds_remaining,
  three_point_pct
)

Arguments

league

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

margin

Numeric. Point margin from the perspective of the team with the ball.

seconds_remaining

Integer. Time remaining (in seconds) after the shot is made or rebounded.

three_point_pct

Numeric. Three-point field goal percentage as a whole number (e.g., 30 for 30%).

Value

A tibble of endgame breakeven two-point percentages as returned by the API.

References

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