Retrieve a Crossfit Open leaderboard from the Crossfit API. Functions to further process this data are TODO
Usage
open_leaderboard(
year,
division = c("men", "women", "teams"),
athlete = NULL,
top_n = 50,
...
)
Arguments
- year
The year to request data for, as an integer
- division
The competition division to request data for. Currently supports "men", "women", and "teams"
- athlete
Optional parameter. If not
NULL
, then the unique ID number for the athlete. If provided, this will return the results (as a list) for that athlete. See lookup_athlete_id for a function to help determine the athlete's id.- ...
Additional request parameters passed to the API. These might include the region, or scaling status (i.e. were workouts completed as Rx or scaled).
Examples
if (FALSE) {
# will return the top 50 athletes
men_22 <- open_leaderboard(2022, division = "men")
north_am_women <- open_leaderboard(2022, division = "women", region = 31)
# the default is to return the top 50 finishers; if you want more than that, you can specify the number
top_200_w <- open_leaderboard(2022, division = "women", top_n = 200)
# specifying an individual athlete with an id number
# the number provided corresponds to laura horvath
# note that this returns a list
lh <- 591912
lh_open <- open_leaderboard(2022, division = "women", athlete = lh)
}