tracinginsights commited on
Commit
f5aae28
1 Parent(s): 81f934b

Create Max_Throttle.py

Browse files
Files changed (1) hide show
  1. pages/Max_Throttle.py +38 -0
pages/Max_Throttle.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from repo_directory import Max_Throttle
3
+ from repo_directory import button
4
+
5
+
6
+
7
+ # selections
8
+ YEAR = st.selectbox(
9
+ 'Select Year',
10
+ (2023, 2022, 2021, 2020, 2019, 2018))
11
+
12
+ def total_rounds(YEAR):
13
+ if YEAR == 2023:
14
+ return (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23)
15
+ if YEAR == 2022:
16
+ return (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
17
+ if YEAR == 2021:
18
+ return (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
19
+ if YEAR == 2020:
20
+ return (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17)
21
+ if YEAR == 2019:
22
+ return (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
23
+ if YEAR == 2018:
24
+ return (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
25
+
26
+ RACE = st.selectbox(
27
+ 'Select Race',
28
+ total_rounds(YEAR))
29
+
30
+
31
+ SESSION = st.selectbox(
32
+ 'Select Session',
33
+ ('FP1', 'FP2', 'FP3', 'Q', 'SQ','SS', 'R'))
34
+
35
+
36
+
37
+ Max_Throttle.plot(YEAR, RACE, SESSION, )
38
+ Max_Throttle.plot_teams(YEAR, RACE, SESSION, )