Riders
Access rider details, including results and statistics.
Examples
>>> Rider(18655).year_results(2020).results_df.iloc[0]
Date 8.11
Pos 1
GC NaN
Race_Country ESP
Race Vuelta a España
CAT 2.UWT
UCI 850.0
Unnamed: 8 Show more
Race_ID 23
Name: 0, dtype: object
- class first_cycling_api.rider.rider.Rider(ID)
Wrapper to load information on riders.
- ID
The firstycling.com ID for the rider from the URL of their profile page.
- Type:
int
- year_results(year=None)
Get rider details and results for given year.
- Parameters:
year (int) – Year for which to collect information. If None, collects information for latest unloaded year in which rider was active.
- Return type:
- best_results()
Get the rider’s best results.
- Return type:
- victories(world_tour=None, uci=None)
Get the rider’s victories.
- Parameters:
world_tour (bool) – True if only World Tour wins wanted
uci (bool) – True if only UCI wins wanted
- Return type:
- grand_tour_results()
Get the rider’s results in grand tours.
- Return type:
- monument_results()
Get the rider’s results in monuments.
- Return type:
- team_and_ranking()
Get the rider’s historical teams and rankings.
- Return type:
- race_history(race_id=None)
Get the rider’s history at a certain race.
- Parameters:
race_id (int) – The firstcycling.com ID for the desired race, from the race profile URL. If None, loads rider’s race history at UCI races.
- Return type:
- one_day_races()
Get the rider’s results at major one-day races.
- Return type:
- stage_races()
Get the rider’s results at major stage races.
- Return type:
- teams()
Get the rider’s historical teams.
- Return type:
- class first_cycling_api.rider.endpoints.RiderEndpoint(response)
Rider profile page response. Extends Endpoint.
- years_active
List of years in which rider was active.
- Type:
list[int]
- header_details
Details from page header, including rider name and external links.
- Type:
dict
- sidebar_details
Details from right sidebar, including nation, date of birth, height, and more.
- Type:
dict
- get_json()
Get JSON representation of endpoint response.
- response
Raw response from firstcycling.com.
- class first_cycling_api.rider.endpoints.RiderYearResults(response)
Rider’s results in a certain year. Extends RiderEndpoint.
- year_details
The year-specific rider details from the page, including the team, division, UCI points, and more.
- Type:
dict
- results_df
Table of rider’s results from the year.
- Type:
pd.DataFrame
- get_json()
Get JSON representation of endpoint response.
- response
Raw response from firstcycling.com.