Play-by-play events with shot coordinates and the Genius ids (2023/24 on).
Endpoint: GET https://www.basketligaen.dk/api/gameday/play-by-play/{game_uuid}
Value
A hoopR_data tibble with one row per play-by-play event.
Its columns are listed in return_columns
(subset(return_columns, fn == "sportality_pbp")) and in the searchable
return columns article.
Details
Source, terms of use, request pacing, seasons, ids, coverage and error classes of this family: see the notes in sportality_schedule().
Sub-type codes
The values of sub_type:
1of1: free throw 1 of 11of2: free throw 1 of 21of3: free throw 1 of 324sec: shot-clock violation2of2: free throw 2 of 22of3: free throw 2 of 33of3: free throw 3 of 33sec: three-second violation5sec: five-second violation8sec: eight-second violationadjustment: clock adjustmentalleyoop: alley-oop shotalleyoopdunk: alley-oop dunkbackcourt: backcourt violationbadpass: bad passballhandling: ball-handling errorbenchTechnical: technical foul on the benchcoachTechnical: technical foul on the coachdefensive: defensive rebounddisqualifying: disqualifying fouldisruptive: disruptive foul (unverified)doubledribble: double dribbledrivinglayup: driving layupdunk: dunkend: end of the period or gameeurostep: euro-step layupfadeaway: fadeaway jump shotflagrant: flagrant foulfloatingjumpshot: floating jump shotfull: full timeoutheldball: held ballhookshot: hook shotin: player entersjumpshot: jump shotlayup: layuplodgedball: lodged balllost: lost the jump balloffensive: offensive rebound or offensive fouloffensivegoaltending: offensive goaltendingofficials: official timeoutother: otherout: player leavesoutofbounds: out of boundsoutofboundsrebound: rebound off an out-of-bounds ball (unverified)personal: personal foulpullupjumpshot: pull-up jump shotreverselayup: reverse layupstart: start of the period or game, or clock startstartperiod: start of a period (jump ball line)stepbackjumpshot: step-back jump shotstop: clock stoptechnical: technical foulthrowIn: throw-in violation (unverified)tipindunk: tip-in dunktipinlayup: tip-in layuptravel: travelingturnaroundjumpshot: turnaround jump shotunsportsmanlike: unsportsmanlike foulwon: won the jump ball
See also
family_basketligaen lists every function in this family.
Examples
# \donttest{
try(sportality_pbp(game_uuid = "c4hh5nig6t"))
#> ── Basketligaen Play-by-Play from basketligaen.dk ─────────────── hoopR 3.2.0 ──
#> ℹ Data updated: 2026-11-13 21:17:17 UTC
#> # A tibble: 804 × 49
#> game_source_id game_id event_id type event_uuid period period_type time
#> <int> <int> <int> <chr> <chr> <int> <chr> <chr>
#> 1 2868126 2868126 800 game 75a1c424-6… 4 REGULAR 00:0…
#> 2 2868126 2868126 799 period c7995db4-5… 4 REGULAR 00:0…
#> 3 2868126 2868126 798 clock e67997fb-e… 4 REGULAR 00:0…
#> 4 2868126 2868126 797 clock 0de6a3c7-0… 4 REGULAR 00:0…
#> 5 2868126 2868126 796 2pt cc616d49-8… 4 REGULAR 00:0…
#> 6 2868126 2868126 795 clock 84f92014-b… 4 REGULAR 00:0…
#> 7 2868126 2868126 794 clock cf232264-d… 4 REGULAR 00:0…
#> 8 2868126 2868126 793 clock 1b5da16a-4… 4 REGULAR 00:1…
#> 9 2868126 2868126 792 turnover 504e3200-3… 4 REGULAR 00:1…
#> 10 2868126 2868126 791 clock 8a7eacf6-f… 4 REGULAR 00:1…
#> # ℹ 794 more rows
#> # ℹ 41 more variables: real_world_time <chr>, updated_time <chr>,
#> # home_team_id <int>, home_team_code <chr>, home_team_name <chr>,
#> # home_abbreviation <chr>, home_team_number <int>, home_place <chr>,
#> # home_score <int>, away_team_id <int>, away_team_code <chr>,
#> # away_team_name <chr>, away_abbreviation <chr>, away_team_number <int>,
#> # away_place <chr>, away_score <int>, revision <int>, game_state <chr>, …
# }
