RamParameswaran / pyAFL

Python AFL (Australian Football League) library for collecting/analysing AFL data from AFLtables.com
MIT License
15 stars 10 forks source link

Season stats #13

Closed DavidJArnold closed 2 years ago

DavidJArnold commented 2 years ago

New feature for season statistics, with match and ladder information, from afltables.com/afl/season/\.html.

Relates to this issue however I thought it would be useful to have a simple way to access match scores and results, leaving detailed team and player statistics to the existing classes.

Usage:

season = Season(1990)
season_stats = season.get_season_stats()

Outputs: season_stats.season_ladders list of abbreviated ladders (dataframes) at end of each round season_stats.season_matches list of Match object for each match in the season season_stats.match_summary dataframe summary of all matches in the season season_stats.final_ladder dataframe for the final season ladder (empty list if season is unfinished)

The Match class is a representation of a match, and has a __repr__ function. Match objects hold a bunch of information about a match, listed in

RamParameswaran commented 2 years ago

Thanks for the great contribution @DavidJArnold :+1: Looks great! I think the Match class (in particular) is much needed and opens up potential for adding some match analytics functionality.

Happy to guide or help or take recommendations for any further contributions you can make!