tracinginsights commited on
Commit
3686552
1 Parent(s): 508d01d

Create Corner_Analysis.py

Browse files
Files changed (1) hide show
  1. pages/Corner_Analysis.py +33 -0
pages/Corner_Analysis.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from repo_directory import Corner_Analysis
3
+ from repo_directory import button
4
+
5
+ YEAR_SELECTED = st.selectbox(
6
+ 'Select year',
7
+ (2023, 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, 23))
12
+
13
+ SESSION = st.selectbox(
14
+ 'Select Session',
15
+ ('FP1', 'FP2', 'FP3','SS', 'Q', 'SQ', 'R'))
16
+
17
+
18
+ laps, f1session, drivers = Corner_Analysis.get_data(YEAR_SELECTED, RACE_SELECTED, SESSION)
19
+
20
+
21
+ DRIVER_1 = st.selectbox(
22
+ 'Select Driver 1',
23
+ drivers)
24
+
25
+ DRIVER_2 = st.selectbox(
26
+ 'Select Driver 2',
27
+ drivers)
28
+
29
+ distance_range = st.slider(
30
+ 'Select a range for distance ',
31
+ 0, 7100, (1025, 2000))
32
+
33
+ Corner_Analysis.plot(driver_1, driver_2, distance_range, laps, f1session)