Calculate Strength of Schedule (SOS)
calculate_sos.RdCalculate strength of schedule using team ratings and schedule, created using
calculate_team_ratings() and get_fixtures()
Arguments
- ratings
- dataframe containing - teamand- rating
- schedule
- dataframe containing - team,- opponent, and- home_or_away
Examples
if (FALSE) {
remaining_schedule <-
  worldfootballR::fb_match_results(
    country = "ENG", gender = "M", season_end_year = 2024
    ) |>
  get_fixtures(remaining = TRUE)
team_ratings <-
  worldfootballR::fb_season_team_stats(
    country = "ENG", gender = "M", season_end_year = 2024,
    stat_type = "standard", tier = "1st"
    ) |>
  calculate_team_ratings()
calculate_sos(ratings = team_ratings, schedule = remaining_schedule)
}