Spaces:
Running
Running
tracinginsights
commited on
Commit
·
e4be364
1
Parent(s):
7d83c94
Create Fastest_Lap.py
Browse files- pages/Fastest_Lap.py +18 -0
pages/Fastest_Lap.py
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from repo_directory import Fastest_Lap
|
3 |
+
from repo_directory import button
|
4 |
+
|
5 |
+
df, f1session = Fastest_Lap.get_fastest_laps(YEAR_SELECTED,RACE_SELECTED, SESSION )
|
6 |
+
|
7 |
+
DRIVER = df.iloc[0, 0]
|
8 |
+
TIME = df.iloc[0, 1]
|
9 |
+
MINUTE = TIME.total_seconds() // 60
|
10 |
+
MINUTE = int(MINUTE)
|
11 |
+
|
12 |
+
SECONDS = TIME.total_seconds() % 60
|
13 |
+
SECONDS = int(SECONDS)
|
14 |
+
MICROSECONDS = TIME.microseconds // 1000
|
15 |
+
|
16 |
+
TOTAL_TIME = f"{MINUTE}:{SECONDS}.{MICROSECONDS}"
|
17 |
+
|
18 |
+
Fastest_Lap.plot(df, f1session)
|