File size: 821 Bytes
793b73e
34bd972
ffd1750
3017c9e
37827e3
 
 
 
 
 
 
 
 
 
fe8cc68
 
ddf0c63
d3eedd9
 
 
 
 
6af7771
d3eedd9
43b66bf
 
d3eedd9
34bd972
ad1101b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import streamlit as st
from repo_directory import Race_Launch_Performance_Ratings as rl
from repo_directory import button

YEAR_SELECTED = st.selectbox(
    'Select Year',
    (2022, 2021, 2020, 2019, 2018))

RACE_SELECTED = st.selectbox(
    'Select Race',
    (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22))

SESSION = st.selectbox(
    'Select Session',
    ('R', 'SQ'))

reaction_df, drivers, laps = rl.get_laps_and_drivers(YEAR_SELECTED, RACE_SELECTED, SESSION)

DRIVERS_REMOVED = st.multiselect(
    'Remove drivers starting from pitlane',
    drivers.tolist()
    )


REMAINING_DRIVERS = list(set(drivers.tolist()) - set(DRIVERS_REMOVED))

ratings_df = rl.get_ratings(laps, drivers, reaction_df, REMAINING_DRIVERS)

rl.plot_ratings(ratings_df,YEAR_SELECTED, RACE_SELECTED, SESSION)