Skip to contents

Provider game key <-> Genius LiveStats match id, from a frame that carries both.

Reads a frame you already have (no request is made), checks the id types and returns the distinct id pairs, one-to-one both ways. Rows without a Genius id (older seasons, upcoming games) are dropped.

Usage

genius_game_crosswalk(df, source)

Arguments

df

A data frame from the wrapper named for source.

source

One of "sportpress", "cebl", "tbf", "kzs", "sportality".

Value

A wehoop_data tibble, one row per game:

col_nametypedescription
game_keyinteger or characterProvider's own game key: the BNXT, CEBL, TBF or KZS integer game id, or the Sportality platform game uuid (a string) for source sportality.
genius_match_idintegerGenius Sports LiveStats match id of the same game (the match_id every genius_* wrapper takes).

Details

Sources: sportpress (BNXT sportpress_game_slider: game_id / genius_id), cebl (game_id / genius_match_id), tbf (match_id / genius_id), kzs (match_id / genius_match_id) and sportality (game_uuid / game_id, the Genius match id). The provider key is integer for every source but sportality (a character uuid); the Genius id is integer. A wrong source, a missing column, a wrong id type or a key that maps to two ids raises wehoop_bad_request.

Examples

# \donttest{
  slider <- data.frame(game_id = c(1L, 2L), genius_id = c(2902690L, NA))
  genius_game_crosswalk(slider, "sportpress")
#> ── Genius LiveStats game crosswalk ───────────────────────────── wehoop 3.1.0 ──
#> ℹ Data updated: 2026-10-22 02:36:15 UTC
#> # A tibble: 1 × 2
#>   game_key genius_match_id
#>      <int>           <int>
#> 1        1         2902690
# }