data_tools.lap_tools.FSGPDayLaps#
- class data_tools.lap_tools.FSGPDayLaps(day: int)#
Bases:
object- __init__(day: int)#
Methods
__init__(day)get_finish_utc(lap)Get lap finish time as a UTC datetime object
Get lap finish time as a UTC timestamp
get_lap_driver(lap)Get the name of a driver for a lap
get_lap_mph(lap)Get the average lap speed in mph
get_pit_time(lap)Get pit time before lap in minutes as a decimal, or 0.
get_start_utc(lap)Get lap start time as a UTC datetime object
get_start_utc_string(lap)Get lap start time as a UTC timestamp
get_time(lap)Get lap time as an HH:MM:SS timestamp
get_time_minutes(lap)Get lap time in minutes as a decimal
- get_finish_utc(lap: int) <module 'datetime' from '/home/docs/.asdf/installs/python/3.12.12/lib/python3.12/datetime.py'>#
Get lap finish time as a UTC datetime object
- Parameters:
lap – Lap number from the race day
- Returns:
Finish time as a UTC datetime object
- get_finish_utc_string(lap: int) str#
Get lap finish time as a UTC timestamp
- Parameters:
lap – Lap number from the race day
- Returns:
Finish time in %Y-%m-%dT%H:%M:%SZ format e.g. 2024-07-16T20:46:32Z
- get_lap_count() int#
- get_lap_driver(lap: int) str#
Get the name of a driver for a lap
- Parameters:
lap – Lap number from the race day
- Returns:
Name of driver, e.g. ‘Diego’
- get_lap_mph(lap: int) float#
Get the average lap speed in mph
- Parameters:
lap – Lap number from the race day
- Returns:
Speed in mph, e.g. 26.745
- get_pit_time(lap: int) float#
Get pit time before lap in minutes as a decimal, or 0. if Brightside didn’t pit
- Parameters:
lap – Lap number from the race day
- Returns:
Pit time before lap in minutes as a decimal, e.g. 3.583
- get_start_utc(lap: int) <module 'datetime' from '/home/docs/.asdf/installs/python/3.12.12/lib/python3.12/datetime.py'>#
Get lap start time as a UTC datetime object
- Parameters:
lap – Lap number from the race day
- Returns:
Start time as a UTC datetime object
- get_start_utc_string(lap: int) str#
Get lap start time as a UTC timestamp
- Parameters:
lap – Lap number from the race day
- Returns:
Start time in %Y-%m-%dT%H:%M:%SZ format e.g. 2024-07-16T20:46:32Z
- get_time(lap: int) str#
Get lap time as an HH:MM:SS timestamp
- Parameters:
lap – Lap number from the race day
- Returns:
Time in HH:MM:SS format e.g. 00:06:59
- get_time_minutes(lap: int) float#
Get lap time in minutes as a decimal
- Parameters:
lap – Lap number from the race day
- Returns:
Time in minutes as a decimal, e.g. 6.324