Skip to content

Commit

Permalink
add current matchups (#156)
Browse files Browse the repository at this point in the history
  • Loading branch information
matsonj committed Apr 21, 2024
1 parent ecb3d74 commit 7708ca0
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions evidence/pages/nba/historical_matchups.md
Expand Up @@ -4,6 +4,30 @@ Ever wondered if the '86 Celtics could beat the '96 Bulls? Wonder no more!
```sql elo_history
select *
from nba_elo_history.nba_elo
union all
select
l.game_date as date,
'2024' as season,
null as nuetral,
null as playoff,
l.hmTm as team1,
l.VsTm as team2,
r.home_team_elo_rating as elo1_pre,
r.visiting_team_elo_rating as elo2_pre,
null as elo_prob1,
null as elo_prob2,
case when l.home_team_score > l.visiting_team_score
then r.home_team_elo_rating - r.elo_change
else r.home_team_elo_rating + r.elo_change
end as elo1_post,
case when l.home_team_score > l.visiting_team_score
then r.visiting_team_elo_rating + r.elo_change
else r.visiting_team_elo_rating - r.elo_change
end as elo2_post,
l.home_team_score as score1,
l.visiting_team_score as score2
from src_nba_elo_rollforward r
left join src_nba_results_log l on r.game_id = l.game_id
```

```sql seasons
Expand Down
1 change: 1 addition & 0 deletions evidence/sources/mdsbox/nba/src_nba_elo_rollforward.sql
@@ -0,0 +1 @@
from nba_elo_rollforward

0 comments on commit 7708ca0

Please sign in to comment.