tracinginsights commited on
Commit
339f0b1
1 Parent(s): 527c475

Create Finish_Start_Speed_Difference

Browse files
Files changed (1) hide show
  1. pages/Finish_Start_Speed_Difference +34 -0
pages/Finish_Start_Speed_Difference ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from repo_directory import Start_Finish_Speed
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, 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','SS', 'R'))
32
+
33
+ Start_Finish_Speed.plot(YEAR, RACE, SESSION)
34
+ Start_Finish_Speed.plot_teams(YEAR, RACE, SESSION)