query_pcs | R Documentation |
query_pcs
scrapes PCS data (rider profiles and results)
for a given vector of rider names.
query_pcs(rider_names, seasons = NULL)
rider_names |
Character vector containing one or more rider names. |
seasons |
Integer vector of years ("seasons") to collect results from. Will return all years if |
List of two data frames (profiles
and results
).
The results
data frame contains the following:
date: Date of race.
result: Race result.
gc_result_on_stage: If a race was a stage race, gives the rider's placement overall following the stage.
race: Race name.
distance: Race distance (km).
pointspcs: PCS points awarded.
pointsuci: UCI points awarded.
stage: Type of race (one day, stage race, etc).
rider: Rider name.
team: Team name.
The profiles
data frame contains the following:
rider: Rider name.
dob: Date of birth.
Nationality
pob: Place of birth.
current_team: Current team.
weight: Weight in kg.
height: Height in m.
one_day_races: Career points awarded for success in one day races.
gc: Career points awarded for success in grand tours.
tt: Career points awarded for success in time trials.
sprint: Career points awarded for success in sprint-focused races.
climber: Career points awarded for success in climbing-focused races.
# race results for two riders in the 2021 season
query_pcs(c("Peter Sagan","Adam Yates"), seasons = 2021)
# two riders, two seasons
query_pcs(c("Peter Sagan","Adam Yates"), seasons = c(2020,2021))
# two riders, all seasons
query_pcs(c("Peter Sagan","Adam Yates"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.