Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account for tiebreakers in simulation_utils.sort_standings() #17

Open
DesiPilla opened this issue Nov 10, 2022 · 1 comment
Open

Account for tiebreakers in simulation_utils.sort_standings() #17

DesiPilla opened this issue Nov 10, 2022 · 1 comment

Comments

@DesiPilla
Copy link
Owner

DesiPilla commented Nov 10, 2022

When getting a league's standings table, the current code only sort's it by wins and points for, regardless of what the actual tiebreaker is for a league:

# ASSUME Playoff Seeding Tie Breaker is "Total Points For"
# since API doesn't seem to get this data correctly
standings = standings.sort_values(by=["wins", "points_for"], ascending=False)

Issue cwendt94/espn-api#399 pointed out the error in the API and has since been resolved, meaning that league.settings.playoff_seed_tie_rule now contains correct information.

This function needs to be updated to properly seed teams based on the true tiebreaker.

@DesiPilla
Copy link
Owner Author

Per a new update in espn-api, there are now helper functions to sort teams according to a league's specific tiebreaking scenarios. The League().standings_weekly() method can get historical standings tables (which would be good to add to the website), but a new method would have to be created in simulations.py to sort simulated results. It would just be a copy of the function practically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant