Spaces:
Running
Running
tracinginsights
commited on
Commit
•
0877dd8
1
Parent(s):
baf8952
Create Tyre_Degradation.py
Browse files- pages/Tyre_Degradation.py +30 -0
pages/Tyre_Degradation.py
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from repo_directory import Tyre_Degradation
|
3 |
+
from repo_directory import button
|
4 |
+
|
5 |
+
YEAR_SELECTED = st.selectbox(
|
6 |
+
'Select year',
|
7 |
+
(2022, 2021, 2020, 2019, 2018))
|
8 |
+
|
9 |
+
RACE_SELECTED = st.selectbox(
|
10 |
+
'Select Race',
|
11 |
+
(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22))
|
12 |
+
|
13 |
+
SESSION = st.selectbox(
|
14 |
+
'Select Session',
|
15 |
+
('R', 'SQ'))
|
16 |
+
|
17 |
+
laps, f1session, all_driver_compound, all_compounds_used = Tyre_Degradation.get_laps()
|
18 |
+
|
19 |
+
DRIVERS_SELECTED = st.multiselect(
|
20 |
+
'Select Driver and Tyre',
|
21 |
+
all_driver_compound,
|
22 |
+
)
|
23 |
+
|
24 |
+
|
25 |
+
compounds_used = st.multiselect(
|
26 |
+
'Select Tyres',
|
27 |
+
all_compounds_used,
|
28 |
+
all_compounds_used)
|
29 |
+
|
30 |
+
Tyre_Degradation.plot(DRIVERS_SELECTED, f1session)
|