Skip to main content

GENIUS — additional Python functions — Genius Sports LiveStats: lnbm_player–lub_shots

lnbm_player_box​

lnbm_player_box(match_id: 'int', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'Union[pl.DataFrame, pd.DataFrame, Dict]'

Player box score of a finished Liga Nationala de Baschet Masculin (Romania) game.

Liga Nationala de Baschet Masculin (Romania) (men's); season rule: END year; Genius year + 1 (2016-17 = 2017).

Convenience wrapper: a thin binding of genius_player_box to this competition, minted from the competition registry (tools/codegen/basketball_competitions.yaml).

Read before use: Access (sdv-internal-refs/genius-livestats/README.md): the Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set the optional GENIUS_PROXY environment variable to an http(s) proxy URL (it is never logged or printed). The wrappers space requests at least one second apart and read only the Genius hosts; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts. Genius match ids are one global sequence shared by every customer, and data.json names no competition, so the id is checked on the game's LiveStats shell (/u/FRB/<match_id>/: one extra request per game, cached per process): its competition name must pass the label rule. genius_player_box(match_id=...) reads any game unchecked.

Parameters

ParameterTypeDefaultDescription
match_idintGenius match id (match_id in the schedule) of a game of this competition.
return_parsedboolTrueparse into a polars DataFrame (default True); False returns the raw body.
return_as_pandasboolFalsewith return_parsed, return a pandas DataFrame instead of polars.

Returns

A polars/pandas DataFrame by default; the body or page record (dict / list): data.json as served plus _request (the match id asked for), or the sdv-internal-refs capture shape of a page when return_parsed=False.

col_nametypedescription
match_idintegerGenius match id of the game. data.json does not carry it: it is the match_id asked for, stamped by the runtime (the global match sequence shared by every Genius customer).
tnointegerTeam number within this game: 1 = the team listed first (home on the hosted schedule and widget), 2 = the other, 0 = no team. In-game only: not a team id.
pnointegerPlayer number within this game, the key of the team's player map; 0 = no player. In-game only: not a person id and not the shirt number.
namecharacterDisplay name ('T. Nichols')
first_namecharacterGiven name in the competition's own script and spelling (Greek, Hebrew, Czech, ... as entered)
family_namecharacterFamily name in the competition's own script
international_first_namecharacterGiven name in Latin script
international_family_namecharacterFamily name in Latin script (often upper case)
scoreboard_namecharacterShort display name ('T. Nichols'), in the local script when the org enters one
shirt_numbercharacterShirt number as a string ('0' and '00' differ)
playing_positioncharacterPlaying position code (PG, SG, SF, PF, C, G, F, ...); empty string when not entered
starterinteger1 when the player started the game, else 0
captaininteger1 for the team captain, else 0; absent in some orgs
activeinteger1 when the player is on court now (at game end: on court at the final whistle), else 0
minutescharacterMinutes as the feed prints them, an 'mm:ss' text (can exceed 59 for a team; '199:60' happens); the text of an integer when the feed sends one.
seconds_playedintegerSeconds played parsed from the printed mm:ss text as minutes * 60 + seconds (so '224:60' gives 13500); null when the feed sent an integer, whose unit is unknown.
field_goals_madeintegerField goals the player made in the game (two- and three-pointers together; a count).
field_goals_attemptedintegerField goals the player attempted in the game (two- and three-pointers together; a count).
field_goals_percentagenumericField-goal percentage, 0-100, rounded to an integer by the feed
three_pointers_madeintegerThree-pointers made
three_pointers_attemptedintegerThree-pointers attempted
three_pointers_percentagenumericThree-point percentage, 0-100, rounded to an integer
two_pointers_madeintegerTwo-pointers made
two_pointers_attemptedintegerTwo-pointers attempted
two_pointers_percentagenumericTwo-point percentage, 0-100, rounded to an integer
free_throws_madeintegerFree throws the player made in the game (a count).
free_throws_attemptedintegerFree throws the player attempted in the game (a count).
free_throws_percentagenumericFree-throw percentage, 0-100, rounded to an integer
rebounds_defensiveintegerDefensive rebounds
rebounds_offensiveintegerOffensive rebounds
rebounds_totalintegerTotal rebounds (offensive plus defensive) the player collected in the game.
assistsintegerAssists credited to the player in the game.
turnoversintegerTurnovers committed by the player in the game.
stealsintegerSteals credited to the player in the game.
blocksintegerShots the player blocked in the game (blocks made, not received).
blocks_receivedintegerOwn shots blocked by an opponent
fouls_personalintegerPersonal fouls committed
fouls_onintegerFouls drawn: personal fouls committed against the player in the game.
pointsintegerPoints the player scored in the game, free throws included.
points_from_turnoversintegerPoints off turnovers
points_second_chanceintegerSecond-chance points
points_fast_breakintegerFast-break points
points_in_the_paintintegerPoints the player scored in the paint in the game (the feed's sPointsInThePaint).
plus_minus_pointsintegerPlus/minus: team point margin while the player was on court
eff_1integerGenius efficiency formula 1. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_2integerGenius efficiency formula 2. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_3numericGenius efficiency formula 3. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_4numericGenius efficiency formula 4. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_5integerGenius efficiency formula 5. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_6integerGenius efficiency formula 6. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_7integerGenius efficiency formula 7. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site. Absent in the 2014-15 era sample (WBBL 12248), which carries eff_1..eff_6 on players and no team tot_eff_*

Raises

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. Genius has nothing for the request (an unknown match id or ORG, an org without hosted pages, a competition with no games).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (the CloudFront block, a rate limit, a 5xx), the game is not finished, or the body is for another match, competition or ORG. The match is not a game of this competition (another org's game, or a cup or play-off of FRB), or the scope check could not run (the /u/ shell request failed twice or names no competition).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example

from sportsdataverse.basketball.genius import lnbm_schedule, lnbm_player_box
games = lnbm_schedule()
lnbm_player_box(match_id=int(games['match_id'][0]))

lnbm_schedule​

lnbm_schedule(season: 'Optional[int]' = None, comp_id: 'Optional[int]' = None, round_number: 'Optional[int]' = -1, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'Union[pl.DataFrame, pd.DataFrame, Dict]'

Every match of one Liga Nationala de Baschet Masculin (Romania) season (hosted WebStats): ids, status, venue, teams and scores.

Liga Nationala de Baschet Masculin (Romania) (men's); season rule: END year; Genius year + 1 (2016-17 = 2017).

Convenience wrapper: a thin binding of genius_schedule to this competition, minted from the competition registry (tools/codegen/basketball_competitions.yaml).

Read before use: Access (sdv-internal-refs/genius-livestats/README.md): the Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set the optional GENIUS_PROXY environment variable to an http(s) proxy URL (it is never logged or printed). The wrappers space requests at least one second apart and read only the Genius hosts; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts. The competition is picked from FRB's chooser by the label rule include='lnbm|liga nationala de baschet masculin' exclude='^$'; cups and play-offs have their own comp_id.

Parameters

ParameterTypeDefaultDescription
seasonOptional[int]NoneEND-year season (see the season rule above). Omitted = the newest season the org lists.
comp_idOptional[int]NoneGenius competition id; skips the season lookup (needed when the label rule matches several competitions).
round_numberOptional[int]-1Round to list; -1 (default) lists every round.
return_parsedboolTrueparse into a polars DataFrame (default True); False returns the raw body.
return_as_pandasboolFalsewith return_parsed, return a pandas DataFrame instead of polars.

Returns

A polars/pandas DataFrame by default; the schedule page record (dict): the sdv-internal-refs capture shape of the page when return_parsed=False.

col_nametypedescription
match_idintegerFrom the block id extfix_. Genius match id: the {matchId} of data.json and /u/; one global sequence across every Genius customer (~0.3 M in 2016, ~2.9 M in Oct 2026)
link_match_idintegerMatch id of the block's /match//summary link; equals match_id (the capture refuses a page where it does not); null when the org hides match pages (FFBB)
comp_idintegerCompId of the match link, or of the team links when the org hides match pages (FFBB); equals the {compId} asked for. A 'To be determined' slot (no team or match link) takes the {compId} the page's other blocks prove
orgcharacterORG code of the match link (or the team links, as comp_id)
statuscharacterStatus from the block class STATUS_*: COMPLETE, SCHEDULED, POSTPONED, ...
date_timecharacterTip-off as displayed, 'Mon D, YYYY, h:mm AM' (local time, zone not stated); null when unscheduled
venue_idintegerGenius venue id (the /venue/{id} of hosted pages); null when the venue is plain text (FFBB)
venue_namecharacterVenue name as entered (local script)
home_team_idintegerHome team: Genius team id (warehouse key space, global across orgs and seasons; the /team/{id} of hosted pages, the tid of the widget, the teamId of data/competition). data.json carries no team id: join on name/code
home_team_namecharacterHome team full name
home_team_codecharacterHome team code (local script possible)
home_scoreintegerHome points; null before tip-off (typed integer only on a route whose 3 sampled rows were all played)
away_team_idintegerAway team: Genius team id (warehouse key space, global across orgs and seasons; the /team/{id} of hosted pages, the tid of the widget, the teamId of data/competition). data.json carries no team id: join on name/code
away_team_namecharacterAway team full name
away_team_codecharacterAway team code (local script possible)
away_scoreintegerAway points; null before tip-off (typed integer only on a route whose 3 sampled rows were all played)

Raises

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. Genius has nothing for the request (an unknown match id or ORG, an org without hosted pages, a competition with no games). The org lists no matching competition.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (the CloudFront block, a rate limit, a 5xx), the game is not finished, or the body is for another match, competition or ORG.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. The season matches several competitions (pass comp_id).

Example

from sportsdataverse.basketball.genius import lnbm_schedule
lnbm_schedule(season=2026)

lnbm_shots​

lnbm_shots(match_id: 'int', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'Union[pl.DataFrame, pd.DataFrame, Dict]'

Shot chart of a finished Liga Nationala de Baschet Masculin (Romania) game.

Liga Nationala de Baschet Masculin (Romania) (men's); season rule: END year; Genius year + 1 (2016-17 = 2017).

Convenience wrapper: a thin binding of genius_shots to this competition, minted from the competition registry (tools/codegen/basketball_competitions.yaml).

Read before use: Access (sdv-internal-refs/genius-livestats/README.md): the Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set the optional GENIUS_PROXY environment variable to an http(s) proxy URL (it is never logged or printed). The wrappers space requests at least one second apart and read only the Genius hosts; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts. Genius match ids are one global sequence shared by every customer, and data.json names no competition, so the id is checked on the game's LiveStats shell (/u/FRB/<match_id>/: one extra request per game, cached per process): its competition name must pass the label rule. genius_shots(match_id=...) reads any game unchecked.

Parameters

ParameterTypeDefaultDescription
match_idintGenius match id (match_id in the schedule) of a game of this competition.
return_parsedboolTrueparse into a polars DataFrame (default True); False returns the raw body.
return_as_pandasboolFalsewith return_parsed, return a pandas DataFrame instead of polars.

Returns

A polars/pandas DataFrame by default; the body or page record (dict / list): data.json as served plus _request (the match id asked for), or the sdv-internal-refs capture shape of a page when return_parsed=False.

col_nametypedescription
match_idintegerGenius match id of the game. data.json does not carry it: it is the match_id asked for, stamped by the runtime (the global match sequence shared by every Genius customer).
tnointegerTeam number within this game: 1 = the team listed first (home on the hosted schedule and widget), 2 = the other, 0 = no team. In-game only: not a team id.
pnointegerPlayer number within this game, the key of the team's player map; 0 = no player. In-game only: not a person id and not the shirt number.
action_numberintegerAction sequence number, unique within the game (gaps where actions were deleted); a shot joins its play-by-play row on it. Null in the 2014-15 feed.
periodintegerPeriod number; restarts at 1 for the first overtime (read it with period_type).
period_typecharacterPeriod type: REGULAR or OVERTIME.
action_typecharacterShot value: 2pt or 3pt
sub_typecharacterShot type (layup, drivinglayup, jumpshot, pullupjumpshot, dunk, ...)
resultintegerShot result: 1 = made, 0 = missed.
xnumericCourt x, PERCENT of the full court length (0-100, float), along the long axis. Not normalised to one basket: a team attacks one end in periods 1-2 and the other end in periods 3-4 (ESAKE 2902690: team 1 mean x 90 and 86 in P1-P2, 11 and 19 in P3-P4). Which end x = 0 is, and which end team 1 starts at, are unverified
ynumericCourt y, PERCENT of the full court width (0-100, float), across the court (observed 1.7-97.2). Origin side unverified
playercharacterShooter's display name as the org enters it, in the local script when it uses one.
shirt_numbercharacterShooter's shirt number (string)

Raises

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. Genius has nothing for the request (an unknown match id or ORG, an org without hosted pages, a competition with no games).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (the CloudFront block, a rate limit, a 5xx), the game is not finished, or the body is for another match, competition or ORG. The match is not a game of this competition (another org's game, or a cup or play-off of FRB), or the scope check could not run (the /u/ shell request failed twice or names no competition).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example

from sportsdataverse.basketball.genius import lnbm_schedule, lnbm_shots
games = lnbm_schedule()
lnbm_shots(match_id=int(games['match_id'][0]))

lnbm_team_box​

lnbm_team_box(match_id: 'int', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'Union[pl.DataFrame, pd.DataFrame, Dict]'

Team box score of a finished Liga Nationala de Baschet Masculin (Romania) game.

Liga Nationala de Baschet Masculin (Romania) (men's); season rule: END year; Genius year + 1 (2016-17 = 2017).

Convenience wrapper: a thin binding of genius_team_box to this competition, minted from the competition registry (tools/codegen/basketball_competitions.yaml).

Read before use: Access (sdv-internal-refs/genius-livestats/README.md): the Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set the optional GENIUS_PROXY environment variable to an http(s) proxy URL (it is never logged or printed). The wrappers space requests at least one second apart and read only the Genius hosts; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts. Genius match ids are one global sequence shared by every customer, and data.json names no competition, so the id is checked on the game's LiveStats shell (/u/FRB/<match_id>/: one extra request per game, cached per process): its competition name must pass the label rule. genius_team_box(match_id=...) reads any game unchecked.

Parameters

ParameterTypeDefaultDescription
match_idintGenius match id (match_id in the schedule) of a game of this competition.
return_parsedboolTrueparse into a polars DataFrame (default True); False returns the raw body.
return_as_pandasboolFalsewith return_parsed, return a pandas DataFrame instead of polars.

Returns

A polars/pandas DataFrame by default; the body or page record (dict / list): data.json as served plus _request (the match id asked for), or the sdv-internal-refs capture shape of a page when return_parsed=False.

col_nametypedescription
match_idintegerGenius match id of the game. data.json does not carry it: it is the match_id asked for, stamped by the runtime (the global match sequence shared by every Genius customer).
tnointegerTeam number within this game: 1 = the team listed first (home on the hosted schedule and widget), 2 = the other, 0 = no team. In-game only: not a team id.
namecharacterTeam name as the org enters it
name_internationalcharacterTeam name in Latin script
short_namecharacterShort team name (shortName in the feed), in the competition's own script when the org enters one.
codecharacterTeam code, three letters as entered (may be in the local script, e.g. Greek 'ΑΕΚ')
code_internationalcharacterTeam code in Latin script
coachcharacterHead coach display name
scoreintegerTeam points (current or final); a numeric string in the 2014-15 era sample (WBBL 12248), an integer since
full_scoreintegerTeam points including overtime; equal to score in every sample (a numeric string in the 2014-15 era)
p1_scoreintegerPoints scored in period 1 (a numeric string in the 2014-15 era)
p2_scoreintegerPoints scored in period 2 (a numeric string in the 2014-15 era)
p3_scoreintegerPoints scored in period 3 (a numeric string in the 2014-15 era)
p4_scoreintegerPoints scored in period 4 (a numeric string in the 2014-15 era)
ot_scoreintegerPoints the team scored in overtime; null without overtime. Whether several overtimes are summed is unverified.
foulsintegerTeam fouls in the current (last) period
timeoutsintegerTimeouts counter of the current period (unverified: remaining vs taken); 0 in every sampled (finished) game
minutescharacterMinutes as the feed prints them, an 'mm:ss' text (can exceed 59 for a team; '199:60' happens); the text of an integer when the feed sends one.
seconds_playedintegerSeconds played parsed from the printed mm:ss text as minutes * 60 + seconds (so '224:60' gives 13500); null when the feed sent an integer, whose unit is unknown.
field_goals_madeintegerTeam total: field goals made
field_goals_attemptedintegerTeam total: field goals attempted
field_goals_percentagenumericTeam total: field-goal percentage, 0-100, rounded to an integer by the feed
three_pointers_madeintegerTeam total: three-pointers made
three_pointers_attemptedintegerTeam total: three-pointers attempted
three_pointers_percentagenumericTeam total: three-point percentage, 0-100, rounded to an integer
two_pointers_madeintegerTeam total: two-pointers made
two_pointers_attemptedintegerTeam total: two-pointers attempted
two_pointers_percentagenumericTeam total: two-point percentage, 0-100, rounded to an integer
free_throws_madeintegerTeam total: free throws made
free_throws_attemptedintegerTeam total: free throws attempted
free_throws_percentagenumericTeam total: free-throw percentage, 0-100, rounded to an integer
rebounds_defensiveintegerTeam total: defensive rebounds
rebounds_offensiveintegerTeam total: offensive rebounds
rebounds_totalintegerTeam total: total rebounds
assistsintegerTeam total: assists
turnoversintegerTeam total: turnovers
stealsintegerTeam total: steals
blocksintegerTeam total: blocks made
blocks_receivedintegerTeam total: own shots blocked by an opponent
fouls_personalintegerTeam total: personal fouls committed
fouls_onintegerTeam total: fouls drawn
pointsintegerTeam total: points
points_from_turnoversintegerTeam total: points off turnovers
points_second_chanceintegerTeam total: second-chance points
points_fast_breakintegerTeam total: fast-break points
points_in_the_paintintegerTeam total: points in the paint
eff_1integerGenius efficiency formula 1. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site (team total). Absent in the 2014-15 era sample (WBBL 12248), which carries eff_1..eff_6 on players and no team tot_eff_*
eff_2integerGenius efficiency formula 2. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site (team total). Team tot_eff_2 is 2 in every 2016+ sample (a constant, not a stat). Absent in the 2014-15 era sample (WBBL 12248), which carries eff_1..eff_6 on players and no team tot_eff_*
eff_3numericGenius efficiency formula 3. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site (team total). Absent in the 2014-15 era sample (WBBL 12248), which carries eff_1..eff_6 on players and no team tot_eff_*
eff_4numericGenius efficiency formula 4. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site (team total). Absent in the 2014-15 era sample (WBBL 12248), which carries eff_1..eff_6 on players and no team tot_eff_*
eff_5integerGenius efficiency formula 5. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site (team total). Absent in the 2014-15 era sample (WBBL 12248), which carries eff_1..eff_6 on players and no team tot_eff_*
eff_6integerGenius efficiency formula 6. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site (team total). Absent in the 2014-15 era sample (WBBL 12248), which carries eff_1..eff_6 on players and no team tot_eff_*
eff_7integerGenius efficiency formula 7. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site (team total). Absent in the 2014-15 era sample (WBBL 12248), which carries eff_1..eff_6 on players and no team tot_eff_*
bench_pointsintegerTeam total: points scored by non-starters
biggest_leadintegerTeam total: biggest lead, points
biggest_scoring_runintegerTeam total: biggest unanswered scoring run, points
lead_changesintegerTeam total: lead changes in the game (same value on both teams)
times_scores_levelintegerTeam total: times the score was tied (same value on both teams)
time_leadingnumericTeam total: minutes the team led, decimal minutes (33.58 = 33 min 35 s)
fouls_teamintegerTeam total: team (bench) fouls
fouls_totalintegerTeam total: all fouls committed (personal + technical + team bench)
rebounds_teamintegerTeam total: team rebounds (credited to no player)
rebounds_team_defensiveintegerTeam total: team defensive rebounds
rebounds_team_offensiveintegerTeam total: team offensive rebounds
turnovers_teamintegerTeam total: team turnovers (credited to no player, e.g. shot clock)

Raises

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. Genius has nothing for the request (an unknown match id or ORG, an org without hosted pages, a competition with no games).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (the CloudFront block, a rate limit, a 5xx), the game is not finished, or the body is for another match, competition or ORG. The match is not a game of this competition (another org's game, or a cup or play-off of FRB), or the scope check could not run (the /u/ shell request failed twice or names no competition).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example

from sportsdataverse.basketball.genius import lnbm_schedule, lnbm_team_box
games = lnbm_schedule()
lnbm_team_box(match_id=int(games['match_id'][0]))

lub_competitions​

lub_competitions(*, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'Union[pl.DataFrame, pd.DataFrame, Dict]'

Every competition of the FUBB Genius org, with its END-year season.

Liga Uruguaya de Basquetbol (men's); season rule: END year; Genius year + 1 (2025-26 = 2026).

Convenience wrapper: a thin binding of genius_competitions to this competition, minted from the competition registry (tools/codegen/basketball_competitions.yaml).

Read before use: Access (sdv-internal-refs/genius-livestats/README.md): the Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set the optional GENIUS_PROXY environment variable to an http(s) proxy URL (it is never logged or printed). The wrappers space requests at least one second apart and read only the Genius hosts; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts.

Parameters

ParameterTypeDefaultDescription
return_parsedboolTrueparse into a polars DataFrame (default True); False returns the raw body.
return_as_pandasboolFalsewith return_parsed, return a pandas DataFrame instead of polars.

Returns

A polars/pandas DataFrame by default; the chooser page record (dict): the sdv-internal-refs capture shape plus _request (the org asked for) when return_parsed=False.

col_nametypedescription
orgcharacterORG code the request used (the hosted ORG, or the LiveStats ORG for the /u/ shell).
comp_idintegerGenius competition id (compId): one per org competition-season; the {compId} of hosted and data/competition paths
labelcharacterCompetition label as the org typed it, free text in any language: may or may not carry a season ('BASKET LEAGUE 2019 - 20', '1st division', 'Κύπελλο Ελλάδας' = Greek Cup, 'Μαυροσκούφεια' = Mavroskoufeia youth tournament)
league_idintegerGenius league id of the org (ESAKE = 115; IBBA has two: 187 and 549)
yearintegerGenius season year of the competition: the START year of a two-year season (BNXT '2023-2024' = 2023), the year itself for a calendar season. null when the page gives none
seasonintegersdv END-year season of the competition (2026 = 2025-26) from the label span, else the Genius year; null when no rule applies. See season_rule.
season_rulecharacterWhich rule produced season: 'label span', 'genius year + 1 (split)', 'genius year (calendar)', 'label year (calendar)' or 'unknown'.
selectedlogicalTrue for the competition the hosted chooser pre-selects (the org's default, not always the newest).

Raises

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. Genius has nothing for the request (an unknown match id or ORG, an org without hosted pages, a competition with no games).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (the CloudFront block, a rate limit, a 5xx), the game is not finished, or the body is for another match, competition or ORG.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example

from sportsdataverse.basketball.genius import lub_competitions
lub_competitions()

lub_pbp​

lub_pbp(match_id: 'int', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'Union[pl.DataFrame, pd.DataFrame, Dict]'

Play-by-play of a finished Liga Uruguaya de Basquetbol game.

Liga Uruguaya de Basquetbol (men's); season rule: END year; Genius year + 1 (2025-26 = 2026).

Convenience wrapper: a thin binding of genius_pbp to this competition, minted from the competition registry (tools/codegen/basketball_competitions.yaml).

Read before use: Access (sdv-internal-refs/genius-livestats/README.md): the Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set the optional GENIUS_PROXY environment variable to an http(s) proxy URL (it is never logged or printed). The wrappers space requests at least one second apart and read only the Genius hosts; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts. Genius match ids are one global sequence shared by every customer, and data.json names no competition, so the id is checked on the game's LiveStats shell (/u/FUBB/<match_id>/: one extra request per game, cached per process): its competition name must pass the label rule. genius_pbp(match_id=...) reads any game unchecked.

Parameters

ParameterTypeDefaultDescription
match_idintGenius match id (match_id in the schedule) of a game of this competition.
return_parsedboolTrueparse into a polars DataFrame (default True); False returns the raw body.
return_as_pandasboolFalsewith return_parsed, return a pandas DataFrame instead of polars.

Returns

A polars/pandas DataFrame by default; the body or page record (dict / list): data.json as served plus _request (the match id asked for), or the sdv-internal-refs capture shape of a page when return_parsed=False.

col_nametypedescription
match_idintegerGenius match id of the game. data.json does not carry it: it is the match_id asked for, stamped by the runtime (the global match sequence shared by every Genius customer).
row_indexintegerPosition of the action in the feed order, 0 = the newest action by game time (normally the game end row). The feed is not strictly sorted by action_number, so sort on action_number for entry order.
action_numberintegerAction sequence number, unique within the game (gaps where actions were deleted); a shot joins its play-by-play row on it. Null in the 2014-15 feed.
previous_actionintegeraction_number of the linked earlier action (the shot an assist or rebound belongs to); null when the feed sends an empty string.
periodintegerPeriod number; restarts at 1 for the first overtime (read it with period_type).
period_typecharacterPeriod type: REGULAR or OVERTIME.
gtcharacterGame clock, 'mm:ss' remaining in the period
clockcharacterGame clock with hundredths, 'mm:ss:cc' remaining in the period; absent in older feeds (the 2014-15 WBBL sample has gt only)
tnointegerTeam number within this game: 1 = the team listed first (home on the hosted schedule and widget), 2 = the other, 0 = no team. In-game only: not a team id.
pnointegerPlayer number within this game, the key of the team's player map; 0 = no player. In-game only: not a person id and not the shirt number.
playercharacterPlayer display name; '' when no player
shirt_numbercharacterPlayer shirt number (string); '' when no player
first_namecharacterGiven name in the competition's own script and spelling (Greek, Hebrew, Czech, ... as entered)
family_namecharacterFamily name in the competition's own script
international_first_namecharacterGiven name in Latin script
international_family_namecharacterFamily name in Latin script (often upper case)
scoreboard_namecharacterShort display name ('T. Nichols'), in the local script when the org enters one
action_typecharacterAction type: 2pt, 3pt, freethrow, rebound, assist, turnover, steal, block, foul, foulon (foul drawn), substitution, timeout, jumpball, period, game, headcoachchallenge
sub_typecharacterAction subtype, free-text code per actionType: shot type for 2pt/3pt (layup, drivinglayup, jumpshot, pullupjumpshot, turnaroundjumpshot, ...), 'in'/'out' for substitutions, 'start'/'end' for period and game, foul kind for fouls; empty string when none
qualifiercharacterQualifier codes of the action joined with commas (pointsinthepaint, fromturnover, 2ndchance, fastbreak, blocked, ...); null when none.
successinteger1 = made / successful, 0 = missed (shots, free throws); 1 for other actions
scoringinteger1 when the action is a scoring attempt (shot or free throw), else 0
score_1integerTeam 1 score after the action, always an integer (the feed sends a string in most games).
score_2integerTeam 2 score after the action, always an integer (the feed sends a string in most games).
leadintegerScore margin after the action, team 1 minus team 2 (negative when team 2 leads)

Raises

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. Genius has nothing for the request (an unknown match id or ORG, an org without hosted pages, a competition with no games).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (the CloudFront block, a rate limit, a 5xx), the game is not finished, or the body is for another match, competition or ORG. The match is not a game of this competition (another org's game, or a cup or play-off of FUBB), or the scope check could not run (the /u/ shell request failed twice or names no competition).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example

from sportsdataverse.basketball.genius import lub_schedule, lub_pbp
games = lub_schedule()
lub_pbp(match_id=int(games['match_id'][0]))

lub_player_box​

lub_player_box(match_id: 'int', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'Union[pl.DataFrame, pd.DataFrame, Dict]'

Player box score of a finished Liga Uruguaya de Basquetbol game.

Liga Uruguaya de Basquetbol (men's); season rule: END year; Genius year + 1 (2025-26 = 2026).

Convenience wrapper: a thin binding of genius_player_box to this competition, minted from the competition registry (tools/codegen/basketball_competitions.yaml).

Read before use: Access (sdv-internal-refs/genius-livestats/README.md): the Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set the optional GENIUS_PROXY environment variable to an http(s) proxy URL (it is never logged or printed). The wrappers space requests at least one second apart and read only the Genius hosts; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts. Genius match ids are one global sequence shared by every customer, and data.json names no competition, so the id is checked on the game's LiveStats shell (/u/FUBB/<match_id>/: one extra request per game, cached per process): its competition name must pass the label rule. genius_player_box(match_id=...) reads any game unchecked.

Parameters

ParameterTypeDefaultDescription
match_idintGenius match id (match_id in the schedule) of a game of this competition.
return_parsedboolTrueparse into a polars DataFrame (default True); False returns the raw body.
return_as_pandasboolFalsewith return_parsed, return a pandas DataFrame instead of polars.

Returns

A polars/pandas DataFrame by default; the body or page record (dict / list): data.json as served plus _request (the match id asked for), or the sdv-internal-refs capture shape of a page when return_parsed=False.

col_nametypedescription
match_idintegerGenius match id of the game. data.json does not carry it: it is the match_id asked for, stamped by the runtime (the global match sequence shared by every Genius customer).
tnointegerTeam number within this game: 1 = the team listed first (home on the hosted schedule and widget), 2 = the other, 0 = no team. In-game only: not a team id.
pnointegerPlayer number within this game, the key of the team's player map; 0 = no player. In-game only: not a person id and not the shirt number.
namecharacterDisplay name ('T. Nichols')
first_namecharacterGiven name in the competition's own script and spelling (Greek, Hebrew, Czech, ... as entered)
family_namecharacterFamily name in the competition's own script
international_first_namecharacterGiven name in Latin script
international_family_namecharacterFamily name in Latin script (often upper case)
scoreboard_namecharacterShort display name ('T. Nichols'), in the local script when the org enters one
shirt_numbercharacterShirt number as a string ('0' and '00' differ)
playing_positioncharacterPlaying position code (PG, SG, SF, PF, C, G, F, ...); empty string when not entered
starterinteger1 when the player started the game, else 0
captaininteger1 for the team captain, else 0; absent in some orgs
activeinteger1 when the player is on court now (at game end: on court at the final whistle), else 0
minutescharacterMinutes as the feed prints them, an 'mm:ss' text (can exceed 59 for a team; '199:60' happens); the text of an integer when the feed sends one.
seconds_playedintegerSeconds played parsed from the printed mm:ss text as minutes * 60 + seconds (so '224:60' gives 13500); null when the feed sent an integer, whose unit is unknown.
field_goals_madeintegerField goals the player made in the game (two- and three-pointers together; a count).
field_goals_attemptedintegerField goals the player attempted in the game (two- and three-pointers together; a count).
field_goals_percentagenumericField-goal percentage, 0-100, rounded to an integer by the feed
three_pointers_madeintegerThree-pointers made
three_pointers_attemptedintegerThree-pointers attempted
three_pointers_percentagenumericThree-point percentage, 0-100, rounded to an integer
two_pointers_madeintegerTwo-pointers made
two_pointers_attemptedintegerTwo-pointers attempted
two_pointers_percentagenumericTwo-point percentage, 0-100, rounded to an integer
free_throws_madeintegerFree throws the player made in the game (a count).
free_throws_attemptedintegerFree throws the player attempted in the game (a count).
free_throws_percentagenumericFree-throw percentage, 0-100, rounded to an integer
rebounds_defensiveintegerDefensive rebounds
rebounds_offensiveintegerOffensive rebounds
rebounds_totalintegerTotal rebounds (offensive plus defensive) the player collected in the game.
assistsintegerAssists credited to the player in the game.
turnoversintegerTurnovers committed by the player in the game.
stealsintegerSteals credited to the player in the game.
blocksintegerShots the player blocked in the game (blocks made, not received).
blocks_receivedintegerOwn shots blocked by an opponent
fouls_personalintegerPersonal fouls committed
fouls_onintegerFouls drawn: personal fouls committed against the player in the game.
pointsintegerPoints the player scored in the game, free throws included.
points_from_turnoversintegerPoints off turnovers
points_second_chanceintegerSecond-chance points
points_fast_breakintegerFast-break points
points_in_the_paintintegerPoints the player scored in the paint in the game (the feed's sPointsInThePaint).
plus_minus_pointsintegerPlus/minus: team point margin while the player was on court
eff_1integerGenius efficiency formula 1. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_2integerGenius efficiency formula 2. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_3numericGenius efficiency formula 3. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_4numericGenius efficiency formula 4. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_5integerGenius efficiency formula 5. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_6integerGenius efficiency formula 6. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site
eff_7integerGenius efficiency formula 7. The feed carries seven formulas (eff_1..eff_7) with no labels; the definitions are not published. In samples eff_1/eff_6/eff_7 often agree (an index-rating style total), eff_3/eff_4 are decimals. Unverified: do not treat any as PIR/EFF without checking against a league site. Absent in the 2014-15 era sample (WBBL 12248), which carries eff_1..eff_6 on players and no team tot_eff_*

Raises

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. Genius has nothing for the request (an unknown match id or ORG, an org without hosted pages, a competition with no games).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (the CloudFront block, a rate limit, a 5xx), the game is not finished, or the body is for another match, competition or ORG. The match is not a game of this competition (another org's game, or a cup or play-off of FUBB), or the scope check could not run (the /u/ shell request failed twice or names no competition).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example

from sportsdataverse.basketball.genius import lub_schedule, lub_player_box
games = lub_schedule()
lub_player_box(match_id=int(games['match_id'][0]))

lub_schedule​

lub_schedule(season: 'Optional[int]' = None, comp_id: 'Optional[int]' = None, round_number: 'Optional[int]' = -1, *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'Union[pl.DataFrame, pd.DataFrame, Dict]'

Every match of one Liga Uruguaya de Basquetbol season (hosted WebStats): ids, status, venue, teams and scores.

Liga Uruguaya de Basquetbol (men's); season rule: END year; Genius year + 1 (2025-26 = 2026).

Convenience wrapper: a thin binding of genius_schedule to this competition, minted from the competition registry (tools/codegen/basketball_competitions.yaml).

Read before use: Access (sdv-internal-refs/genius-livestats/README.md): the Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set the optional GENIUS_PROXY environment variable to an http(s) proxy URL (it is never logged or printed). The wrappers space requests at least one second apart and read only the Genius hosts; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts. The competition is picked from FUBB's chooser by the label rule include='liga uruguaya|^lub' exclude='amistosos|femenina'; cups and play-offs have their own comp_id.

Parameters

ParameterTypeDefaultDescription
seasonOptional[int]NoneEND-year season (see the season rule above). Omitted = the newest season the org lists.
comp_idOptional[int]NoneGenius competition id; skips the season lookup (needed when the label rule matches several competitions).
round_numberOptional[int]-1Round to list; -1 (default) lists every round.
return_parsedboolTrueparse into a polars DataFrame (default True); False returns the raw body.
return_as_pandasboolFalsewith return_parsed, return a pandas DataFrame instead of polars.

Returns

A polars/pandas DataFrame by default; the schedule page record (dict): the sdv-internal-refs capture shape of the page when return_parsed=False.

col_nametypedescription
match_idintegerFrom the block id extfix_. Genius match id: the {matchId} of data.json and /u/; one global sequence across every Genius customer (~0.3 M in 2016, ~2.9 M in Oct 2026)
link_match_idintegerMatch id of the block's /match//summary link; equals match_id (the capture refuses a page where it does not); null when the org hides match pages (FFBB)
comp_idintegerCompId of the match link, or of the team links when the org hides match pages (FFBB); equals the {compId} asked for. A 'To be determined' slot (no team or match link) takes the {compId} the page's other blocks prove
orgcharacterORG code of the match link (or the team links, as comp_id)
statuscharacterStatus from the block class STATUS_*: COMPLETE, SCHEDULED, POSTPONED, ...
date_timecharacterTip-off as displayed, 'Mon D, YYYY, h:mm AM' (local time, zone not stated); null when unscheduled
venue_idintegerGenius venue id (the /venue/{id} of hosted pages); null when the venue is plain text (FFBB)
venue_namecharacterVenue name as entered (local script)
home_team_idintegerHome team: Genius team id (warehouse key space, global across orgs and seasons; the /team/{id} of hosted pages, the tid of the widget, the teamId of data/competition). data.json carries no team id: join on name/code
home_team_namecharacterHome team full name
home_team_codecharacterHome team code (local script possible)
home_scoreintegerHome points; null before tip-off (typed integer only on a route whose 3 sampled rows were all played)
away_team_idintegerAway team: Genius team id (warehouse key space, global across orgs and seasons; the /team/{id} of hosted pages, the tid of the widget, the teamId of data/competition). data.json carries no team id: join on name/code
away_team_namecharacterAway team full name
away_team_codecharacterAway team code (local script possible)
away_scoreintegerAway points; null before tip-off (typed integer only on a route whose 3 sampled rows were all played)

Raises

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. Genius has nothing for the request (an unknown match id or ORG, an org without hosted pages, a competition with no games). The org lists no matching competition.
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (the CloudFront block, a rate limit, a 5xx), the game is not finished, or the body is for another match, competition or ORG.
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help. The season matches several competitions (pass comp_id).

Example

from sportsdataverse.basketball.genius import lub_schedule
lub_schedule(season=2026)

lub_shots​

lub_shots(match_id: 'int', *, return_parsed: 'bool' = True, return_as_pandas: 'bool' = False, **kwargs: 'Any') -> 'Union[pl.DataFrame, pd.DataFrame, Dict]'

Shot chart of a finished Liga Uruguaya de Basquetbol game.

Liga Uruguaya de Basquetbol (men's); season rule: END year; Genius year + 1 (2025-26 = 2026).

Convenience wrapper: a thin binding of genius_shots to this competition, minted from the competition registry (tools/codegen/basketball_competitions.yaml).

Read before use: Access (sdv-internal-refs/genius-livestats/README.md): the Genius hosts publish no robots.txt and no terms. CloudFront refuses datacenter IPs on the LiveStats and hosted hosts: from a server set the optional GENIUS_PROXY environment variable to an http(s) proxy URL (it is never logged or printed). The wrappers space requests at least one second apart and read only the Genius hosts; keep crawls slow and incremental. Some league sites (the NZ NBL) forbid AI crawlers in their own robots.txt, which does not cover these hosts. Genius match ids are one global sequence shared by every customer, and data.json names no competition, so the id is checked on the game's LiveStats shell (/u/FUBB/<match_id>/: one extra request per game, cached per process): its competition name must pass the label rule. genius_shots(match_id=...) reads any game unchecked.

Parameters

ParameterTypeDefaultDescription
match_idintGenius match id (match_id in the schedule) of a game of this competition.
return_parsedboolTrueparse into a polars DataFrame (default True); False returns the raw body.
return_as_pandasboolFalsewith return_parsed, return a pandas DataFrame instead of polars.

Returns

A polars/pandas DataFrame by default; the body or page record (dict / list): data.json as served plus _request (the match id asked for), or the sdv-internal-refs capture shape of a page when return_parsed=False.

col_nametypedescription
match_idintegerGenius match id of the game. data.json does not carry it: it is the match_id asked for, stamped by the runtime (the global match sequence shared by every Genius customer).
tnointegerTeam number within this game: 1 = the team listed first (home on the hosted schedule and widget), 2 = the other, 0 = no team. In-game only: not a team id.
pnointegerPlayer number within this game, the key of the team's player map; 0 = no player. In-game only: not a person id and not the shirt number.
action_numberintegerAction sequence number, unique within the game (gaps where actions were deleted); a shot joins its play-by-play row on it. Null in the 2014-15 feed.
periodintegerPeriod number; restarts at 1 for the first overtime (read it with period_type).
period_typecharacterPeriod type: REGULAR or OVERTIME.
action_typecharacterShot value: 2pt or 3pt
sub_typecharacterShot type (layup, drivinglayup, jumpshot, pullupjumpshot, dunk, ...)
resultintegerShot result: 1 = made, 0 = missed.
xnumericCourt x, PERCENT of the full court length (0-100, float), along the long axis. Not normalised to one basket: a team attacks one end in periods 1-2 and the other end in periods 3-4 (ESAKE 2902690: team 1 mean x 90 and 86 in P1-P2, 11 and 19 in P3-P4). Which end x = 0 is, and which end team 1 starts at, are unverified
ynumericCourt y, PERCENT of the full court width (0-100, float), across the court (observed 1.7-97.2). Origin side unverified
playercharacterShooter's display name as the org enters it, in the local script when it uses one.
shirt_numbercharacterShooter's shirt number (string)

Raises

ExceptionDescription
NoDataErrorThe host answered 404 -- the requested resource does not exist. Genius has nothing for the request (an unknown match id or ORG, an org without hosted pages, a competition with no games).
AssetFetchErrorThe fetch failed (a non-2xx answer or a connection failure after retries, e.g. 401/403/429/5xx, or an empty or unreadable 200 body) -- the answer is unknown, not empty. The fetch failed (the CloudFront block, a rate limit, a 5xx), the game is not finished, or the body is for another match, competition or ORG. The match is not a game of this competition (another org's game, or a cup or play-off of FUBB), or the scope check could not run (the /u/ shell request failed twice or names no competition).
ValueErrorThe host answered 400 / 422 -- the request is wrong; retrying cannot help.

Example

from sportsdataverse.basketball.genius import lub_schedule, lub_shots
games = lub_schedule()
lub_shots(match_id=int(games['match_id'][0]))