tracinginsights commited on
Commit
d3eedd9
1 Parent(s): b2763f7

Update pages/Race_Launch_Performance_Ratings.py

Browse files
pages/Race_Launch_Performance_Ratings.py CHANGED
@@ -6,17 +6,25 @@ YEAR_SELECTED = st.selectbox(
6
  'Select Year',
7
  (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))
14
 
15
-
16
  SESSION = st.selectbox(
17
  'Select Session',
18
  ('R', 'SQ'))
19
 
 
 
 
 
 
 
 
 
 
 
20
 
 
21
 
22
- rl.plot_ratings()
 
6
  'Select Year',
7
  (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))
12
 
 
13
  SESSION = st.selectbox(
14
  'Select Session',
15
  ('R', 'SQ'))
16
 
17
+ reaction_df, drivers = rl.get_laps_and_drivers(YEAR_SELECTED, RACE_SELECTED, SESSION)
18
+
19
+ DRIVERS_REMOVED = st.multiselect(
20
+ 'Remove drivers starting from pitlane',
21
+ drivers.tolist()
22
+ )
23
+ # # remove Driver = 'ZHO' from laps due to pit lane start
24
+ # laps = laps[~laps["Driver"].isin(DRIVERS_REMOVED)]
25
+
26
+ REMAINING_DRIVERS = drivers.tolist() - DRIVERS_REMOVED
27
 
28
+ ratings_df = rl.get_ratings(laps, drivers, reaction_df, REMAINING_DRIVERS)
29
 
30
+ rl.plot_ratings(ratings_df)