tracinginsights commited on
Commit
c93e49b
1 Parent(s): 9e5d5cd

Create Drivers_in_Traffic.py

Browse files
Files changed (1) hide show
  1. pages/Drivers_in_Traffic.py +28 -0
pages/Drivers_in_Traffic.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from repo_directory import Drivers_in_Traffic
3
+ from repo_directory import button
4
+
5
+ YEAR_SELECTED = st.selectbox(
6
+ 'Select year',
7
+ (2023, 2022, 2021, 2020, 2019, 2018))
8
+
9
+
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, 23))
14
+
15
+ SESSION = st.selectbox(
16
+ 'Select Session',
17
+ ('R', 'SQ', 'FP1', 'FP2', 'FP3', 'Q', 'SS'))
18
+
19
+ laps, f1session, drivers = Drivers_in_Traffic.get_data(YEAR_SELECTED, RACE_SELECTED, SESSION)
20
+
21
+ DRIVERS_SELECTED = st.multiselect(
22
+ 'Select Drivers',
23
+ drivers,
24
+ )
25
+
26
+ tel = Drivers_in_Traffic.get_tel(laps)
27
+
28
+ Drivers_in_Traffic.plot(tel, DRIVERS_SELECTED)