Skip to contents

Convenience wrappers binding the Genius family to the Basketball Africa League (men's; Genius ORG BAL, LiveStats ORG BAL). Season rule: calendar year (BAL 2025 = 2025); 2023 lists two competitions, so pass comp_id.

Usage

bal_competitions(return_parsed = TRUE)

bal_schedule(season = NULL, comp_id = NULL, round_number = -1, return_parsed = TRUE)

bal_team_box(match_id, return_parsed = TRUE)

bal_player_box(match_id, return_parsed = TRUE)

bal_pbp(match_id, return_parsed = TRUE)

bal_shots(match_id, return_parsed = TRUE)

Arguments

season

END-year season (see the season rule). NULL (default) = the newest season the org lists.

comp_id

Genius competition id; skips the season lookup (needed when the label rule matches several competitions).

round_number

Round to list; -1 (default) lists every round.

match_id

Genius match id (match_id of bal_schedule()) of a game of this competition.

return_parsed

Parse into a tibble (default TRUE); FALSE returns the raw list.

Value

The base function's hoopR_data tibble, same columns and types (the raw list when return_parsed = FALSE) of each function:

Details

The season's competition is picked from the BAL chooser by the label rule include = ., exclude = ^$ (case-insensitive); cups and play-offs have their own comp_id. Several matching competitions raise hoopR_bad_request (pass comp_id); none raises hoopR_no_data.

Genius match ids are one global sequence shared by every customer and data.json names no competition, so each game alias checks the id on the game's LiveStats shell (/u/BAL/<match_id>/: one extra request per game, cached per process for an hour): its competition name must pass the label rule. Another org's game, a cup or play-off game of BAL, or a shell request that fails twice (or names no competition) raises hoopR_asset_fetch. The base genius_*() function reads any game unchecked.

Access, proxy and error notes: see genius_game().