Function: parse_kenpom_page()
parse_kenpom_page(
raw,section?):Row[] |Record<string,Row[]>
Defined in: src/parsers/kenpom.ts:445
Parse a KenPom page into one table per HTML <table>, keyed by the table's id
(ratings_table, player_table, schedule_table, …). Two-row grouped
headers flatten to names like strength_of_schedule_net_rtg with the
unlabelled rank twin as …_rk; in-table header repeats and blank rows are
dropped; the tournament seed is split into ncaa_seed; fully-numeric text
columns become numbers. On team.php a depth_chart table is added from the
page's embedded script. Returns {} when the page has no data table (a
logged-out page, or a season / team that found nothing).
Parameters
raw
any
section?
string
One table by its id (e.g. "ratings_table") instead of the
dict; an id the page does not have throws, listing the ids it does have
(a page with no tables gives []).
Returns
Row[] | Record<string, Row[]>