Skip to contents

load_wbb_shots_manifest() returns the per-season manifest CSV (season, row_count, generated_at_utc, source_endpoint) for the shots release tag without downloading any season's full data.

Loads shot events parsed from ESPN women's college basketball play-by-play feeds. One row per shot attempt (made or missed), with court coordinates and shot metadata. Backed by the wehoop-wbb-data pipeline that reads raw JSONs from wehoop-wbb-raw and publishes parquet/rds artifacts to the espn_womens_college_basketball_shots release tag.

Usage

load_wbb_shots_manifest()

load_wbb_shots(
  seasons = most_recent_wbb_season(),
  ...,
  dbConnection = NULL,
  tablename = NULL
)

Arguments

seasons

A vector of 4-digit years associated with given women's college basketball seasons. (Min: 2002)

...

Additional arguments passed to an underlying function that writes the season data into a database.

dbConnection

A DBIConnection object, as returned by DBI::dbConnect()

tablename

The name of the shots data table within the database

Value

Returns a wehoop_data tibble with one row per shot attempt.

col_nametypesdescription
game_idcharacterUnique game identifier.
seasonintegerSeason identifier (4-digit year or 'YYYY-YY' string).
period_numberintegerNumeric period (1-4 for quarters; 5+ for OT).
clock_display_valuecharacterGame clock display string (e.g. '8:32').
team_idcharacterUnique team identifier.
athlete_id_1characterPrimary athlete identifier (e.g. shooter).
athlete_id_2characterSecondary athlete identifier (e.g. assister / fouler).
type_idcharacterType identifier (numeric).
type_textcharacterDisplay text for the type field.
scoring_playlogicalTRUE if the play resulted in points scored.
score_valueintegerPoint value of the play (2 / 3 / 1).
coordinate_xnumericX coordinate on the court (half-court layout).
coordinate_ynumericY coordinate on the court (half-court layout).
coordinate_x_rawnumericX coordinate as returned by the API before any adjustment.
coordinate_y_rawnumericY coordinate as returned by the API before any adjustment.

Examples

# \donttest{
  try(load_wbb_shots(seasons = most_recent_wbb_season()))
#> ──────────────────────────────────────────────────────────────── wehoop 3.0.0 ──
#> # A tibble: 907,805 × 15
#>      game_id season period_number clock_display_value team_id athlete_id_1
#>        <int>  <int>         <int> <chr>                 <int>        <int>
#>  1 401856590   2026             1 9:43                     26      5105737
#>  2 401856590   2026             1 9:20                   2579      5108587
#>  3 401856590   2026             1 9:14                   2579      5174284
#>  4 401856590   2026             1 9:08                   2579      5108587
#>  5 401856590   2026             1 8:43                   2579      5239100
#>  6 401856590   2026             1 8:28                     26      4703609
#>  7 401856590   2026             1 8:11                   2579      5108587
#>  8 401856590   2026             1 7:52                     26      5105737
#>  9 401856590   2026             1 7:29                   2579      4609797
#> 10 401856590   2026             1 7:29                   2579      4609797
#> # ℹ 907,795 more rows
#> # ℹ 9 more variables: athlete_id_2 <int>, type_id <int>, type_text <chr>,
#> #   scoring_play <lgl>, score_value <int>, coordinate_x <dbl>,
#> #   coordinate_y <dbl>, coordinate_x_raw <dbl>, coordinate_y_raw <dbl>
# }