(Re-calculate) the TBA rankings from qualifying match scores
Source:R/calculate_tba_ranking.R
calculate_tba_ranking_2024.RdNote that rankings for historic events can be sourced from TBA with a call of the form
get_records("/event/{event_key}/rankings")$rankings
Examples
# example code
# get all matches for one event:
clash_matches <- get_records("event/2024cttd/matches")
# get the score breakdown for each of the teams in each match
clash_details <- get_match_details(clash_matches)
# now get the rankings:
calculate_tba_ranking_2024(clash_details)
#> # A tibble: 42 × 9
#> team_key ranking event ranking_score avg_coop avg_match avg_auto avg_stage
#> <chr> <int> <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 frc3284 1 2024cttd 3.12 0.875 56.2 21.5 4.38
#> 2 frc3928 2 2024cttd 2.62 0.75 54.4 25.1 5.38
#> 3 frc5126 3 2024cttd 2.5 0.875 53.1 20.2 3.5
#> 4 frc1769 4 2024cttd 2.38 0.375 44.6 17.9 4.25
#> 5 frc6424 5 2024cttd 2.25 0.625 57.5 21.4 6.38
#> 6 frc1987 6 2024cttd 2 0.625 54 27.4 4.62
#> 7 frc1982 7 2024cttd 2 0.5 47 17.9 4.12
#> 8 frc2357 8 2024cttd 1.88 0.875 56.6 24.2 7
#> 9 frc1108 9 2024cttd 1.88 0.625 58.2 24 5.38
#> 10 frc5013 10 2024cttd 1.88 0.375 50.1 17.8 3.88
#> # ℹ 32 more rows
#> # ℹ 1 more variable: record <chr>