A website that keeps track of official and live (accounting for in-progress games) standings for a variety of sports/leagues, with various playoff outcomes calculated based on each. Data is tracked and stored at the game level for easy real-time tracking and fast calculations of live standings, as well as (eventually) more granular predictive/data science-y coolness.
- Playoff spot odds
- Winning/Losing magic numbers
- Tiebreakers
- Strength of schedule
- Most important games
- What if?
- Clinching options
- Elimination options
- Standings rules (tiebreakers)
- Some leagues use coin flips
- Games (schedule/records)
- Teams (conferences/divisions)
- Playoff rules
- Name
- Statistics represented in standings, derived from Games
- Currently playing (to look up for live standings/odds)
- Data source ID
- State
- Scheduled
- Start time
- In Progress
- Game clock
- Complete
- Postponed/rescheduled/suspended
- Intermission/halftime?
- Scheduled
- Score
- Home team
- Away team
- Sport/league-specific, standings-relevant stats
- MLS
- Home/away goals for/against
- Disciplinary points
- NHL
- Goals for/against
- MLS
- Data source ID
- Pull in schedules once they're live, as Games
- Around midnight each day, use Game Start Time to pull list of IDs for day's games
- Shortly before each Game's Start Time, spawn a worker to periodically ping for current game state until state becomes Complete/Final
- Pull values we care about (keeping track of in Game) and compare to known state
- If changes, update Game
- Rate limit based on number of live Games/workers
- Pull values we care about (keeping track of in Game) and compare to known state
- Periodically update Live Standings based on known Game states
- Method 1: Naive tallying of outcomes
- Each game's possible outcome (eg A def B, B def A, tie, A def B (OT), B def A (OT), A def B (SO), B def A (SO)) is simulated
- Final standings of each path calculated
- Probabilities calculated as number of final states with Team X in Position >= Y
- Method 2: Weighting of outcome type
- Same as above, but eg shootouts are weighted to historical probabilities with equal odds of victory
- Could also take into account strength of schedule, historic matchups, etc
- Method 3: Full weighting of potential outcomes
- Same as above, with added odds of victory based on team performance, loosely defined
- Requires a good deal of planning/analysis to decide on weighting algo
- To consider: Messi effects, etc
- Pick a league or two to start with (done; NHL, MLS)
- Create Game/Team/Season objects, relationships to get from games to standings (done)
- Create methods to pull in real historical data (done)
- Create methods to pull in and parse live game data into official/live calculations (in progress)
- standardize game statuses (scheduled, live, final, postponed/suspended, etc) (NHL done, MLS todo)
- NHL: how to handle tie games in live standings? (don't count game or 1 point each until update? latter doesn't help tiebreakers - would need to positively choose OTL/SOL to make sense. also, handle ties in regulation differently from OT/SO having already started?)
- Create methods to calculate standings, including tiebreakers where possible (done)
- add s/x/y/e, etc to relevant teams
- Create methods to persist game data (done)
- Create methods to simulate unplayed games (in progress)
- Create methods for additional probabilistic calculations listed above
- Create systems for polling of live games, intelligent handling of off-days to minimize requests, etc
- Create wrappers for league data sources
- Create test suite
- Create front-end
- Let user assign outcome odds or pick winners/losers, see how it changes outcomes (would probably require some JS magic, might not be worth pursuing)
- Feed outcomes into wagering bot?