kylebennison / staturdays

college football data
8 stars 0 forks source link

elo weekly update running twice again #31

Closed kylebennison closed 4 years ago

kylebennison commented 4 years ago

if most_recent_elo == home_elo & most_recent_elo_away == away_elo then don't run.

Need to check whether most_recent_elo is accurate - remember you are mutating elo table week + 1 then joining, so week 4 final rating is week 5 starting rating.

kylebennison commented 4 years ago

if(week_of_games_just_played > 0 & !any(current_week %>% filter(!(is.na(home_points) & is.na(away_points))) %>% pull(week) == elo_ratings %>% filter(season == max(season)) %>% filter(week == max(week)) %>% pull(week))){ #& (length(current_week$home_points) != length(is.na(current_week$home_points))))

Check if elo_ratings from github match the current week of games just played (i.e. are the games i'm about to update from week 6 and elo ratings from this season already have a week 6?