Game Results

Team Results

ncaa_scraper.ncaa_team_results(school, season):

Obtains the results of games for a given school in a given season, from stats.ncaa.org

School:

school name (str) or NCAA school_id (int)

Season:

season (int, YYYY) or NCAA season_id (int), valid 2013-2022

Return (pd.DataFrame):

boydsworld_scraper.boydsworld_team_results(school, start, end=None, vs="all", parse_dates=True):

A function to scrape Division I game results, from boydsworld.com

School (str):

team whose games to select

Start (int):

the start year of games, 1992 <= x <= 2022

End (int, optional):

the end season of games, 1992 <= x <= 2022

Vs (str, optional):

school to filter games against. default: β€˜all’

Parse_dates (bool, optional):

whether to parse data into datetime64

Return (pd.DataFrame):

of all games played for a given team inclusive of start & end

win_pct.calculate_actual_win_pct(games):

A function to calculate the winning percentage as # games won / # games plated

Games (pd.DataFrame):

from boydsworld_team_results()

Return (tuple):

of actual winning percentage (float), wins (int), ties (int), losses (int)

win_pct.calculate_pythagenpat_win_pct(games):

A function to calculate the the PythagenPat expectated winning percentage. Pythagenpat Expectation formula (developed by David Smyth and Patriot):

W% = R^x/(R^x + RA^x) where x = (RPG)^.287 Developed by David Smyth and Patriot

Games (pd.DataFrame):

from boydsworld_team_results()

Return (tuple):

of expected winning percentage as a float, total run differential as int