tracinginsights commited on
Commit
49f3230
·
1 Parent(s): d4bd3c8

Update pages/Tyre_Degradation.py

Browse files
Files changed (1) hide show
  1. pages/Tyre_Degradation.py +23 -23
pages/Tyre_Degradation.py CHANGED
@@ -1,32 +1,32 @@
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
- # colors_df = Tyre_Degradation.get_colors(YEAR_SELECTED)
10
 
11
- # RACE_SELECTED = st.selectbox(
12
- # 'Select Race',
13
- # (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22))
14
 
15
- # SESSION = st.selectbox(
16
- # 'Select Session',
17
- # ('R', 'SQ'))
18
 
19
- # laps, f1session, all_driver_compound, all_compounds_used = Tyre_Degradation.get_laps(YEAR_SELECTED, RACE_SELECTED, SESSION)
20
 
21
- # DRIVERS_SELECTED = st.multiselect(
22
- # 'Select Driver and Tyre',
23
- # all_driver_compound,
24
- # )
25
 
26
 
27
- # compounds_used = st.multiselect(
28
- # 'Select Tyres',
29
- # all_compounds_used,
30
- # all_compounds_used)
31
 
32
- # Tyre_Degradation.plot(DRIVERS_SELECTED,compounds_used, f1session, laps, colors_df)
 
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
+ colors_df = Tyre_Degradation.get_colors(YEAR_SELECTED)
10
 
11
+ RACE_SELECTED = st.selectbox(
12
+ 'Select Race',
13
+ (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22))
14
 
15
+ SESSION = st.selectbox(
16
+ 'Select Session',
17
+ ('R', 'SQ'))
18
 
19
+ laps, f1session, all_driver_compound, all_compounds_used = Tyre_Degradation.get_laps(YEAR_SELECTED, RACE_SELECTED, SESSION)
20
 
21
+ DRIVERS_SELECTED = st.multiselect(
22
+ 'Select Driver and Tyre',
23
+ all_driver_compound,
24
+ )
25
 
26
 
27
+ compounds_used = st.multiselect(
28
+ 'Select Tyres',
29
+ all_compounds_used,
30
+ all_compounds_used)
31
 
32
+ Tyre_Degradation.plot(DRIVERS_SELECTED,compounds_used, f1session, laps, colors_df)