Spaces:
Running
Running
tracinginsights
commited on
Commit
·
9a05d9a
1
Parent(s):
af506cf
Update pages/Download_Raw_Data.py
Browse files
pages/Download_Raw_Data.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
from repo_directory import Download_Raw_Data as dl
|
3 |
from repo_directory import button
|
|
|
4 |
|
5 |
YEAR_SELECTED = st.selectbox(
|
6 |
'Select Year',
|
@@ -15,7 +16,7 @@ SESSION = st.selectbox(
|
|
15 |
('FP1', 'FP2', 'FP3', 'Q', 'SQ', 'R'))
|
16 |
|
17 |
laps, drivers_list = dl.get_laps(YEAR_SELECTED, RACE_SELECTED, SESSION)
|
18 |
-
st.dataframe(data=laps)
|
19 |
|
20 |
laps.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
|
21 |
|
@@ -30,7 +31,7 @@ DRIVERS_SELECTED = st.multiselect(
|
|
30 |
drivers_list)
|
31 |
|
32 |
telemetry = dl.selected_telemetry(DRIVERS_SELECTED, laps)
|
33 |
-
st.dataframe(data=telemetry)
|
34 |
telemetry.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv')
|
35 |
|
36 |
|
|
|
1 |
import streamlit as st
|
2 |
from repo_directory import Download_Raw_Data as dl
|
3 |
from repo_directory import button
|
4 |
+
import pandas as pd
|
5 |
|
6 |
YEAR_SELECTED = st.selectbox(
|
7 |
'Select Year',
|
|
|
16 |
('FP1', 'FP2', 'FP3', 'Q', 'SQ', 'R'))
|
17 |
|
18 |
laps, drivers_list = dl.get_laps(YEAR_SELECTED, RACE_SELECTED, SESSION)
|
19 |
+
st.dataframe(data=pd.DataFrame(laps))
|
20 |
|
21 |
laps.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
|
22 |
|
|
|
31 |
drivers_list)
|
32 |
|
33 |
telemetry = dl.selected_telemetry(DRIVERS_SELECTED, laps)
|
34 |
+
st.dataframe(data=pd.DataFrame(telemetry))
|
35 |
telemetry.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv')
|
36 |
|
37 |
|