Spaces:
Running
Running
tracinginsights
commited on
Commit
·
b0eab81
1
Parent(s):
b0d2f87
Update pages/Download_Raw_Data.py
Browse files- pages/Download_Raw_Data.py +14 -2
pages/Download_Raw_Data.py
CHANGED
@@ -14,8 +14,20 @@ SESSION = st.selectbox(
|
|
14 |
'Select Session',
|
15 |
('FP1', 'FP2', 'FP3', 'Q', 'SQ', 'R'))
|
16 |
|
17 |
-
laps = dl.get_laps(YEAR_SELECTED, RACE_SELECTED, SESSION)
|
18 |
laps.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
|
19 |
|
20 |
with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv') as f:
|
21 |
-
st.download_button('Click to Download LapTimes Data', f, file_name=f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
'Select Session',
|
15 |
('FP1', 'FP2', 'FP3', 'Q', 'SQ', 'R'))
|
16 |
|
17 |
+
laps, drivers_list = dl.get_laps(YEAR_SELECTED, RACE_SELECTED, SESSION)
|
18 |
laps.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
|
19 |
|
20 |
with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv') as f:
|
21 |
+
st.download_button('Click to Download LapTimes Data', f, file_name=f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
|
22 |
+
|
23 |
+
st.write('For Detailed Telemetry Data')
|
24 |
+
DRIVERS_SELECTED = st.multiselect(
|
25 |
+
'Select Driver',
|
26 |
+
drivers_list)
|
27 |
+
|
28 |
+
telemetry = dl.selected_telemetry()
|
29 |
+
|
30 |
+
telemetry.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv')
|
31 |
+
|
32 |
+
with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv') as f:
|
33 |
+
st.download_button('Click to Download Telemetry Data', f, file_name=f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv')
|