tracinginsights commited on
Commit
9ccca80
·
1 Parent(s): 4fcc8cc

Create Car_Telemetry.py

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