F1-analysis / pages /Top_Speed_at_Speed_Trap.py
tracinginsights's picture
Update pages/Top_Speed_at_Speed_Trap.py
e9751ec verified
raw
history blame
634 Bytes
import streamlit as st
from repo_directory import Top_Speed_at_Speed_Trap
from repo_directory import button, utils
YEAR = st.selectbox(
'Select Year',
(2024,2023, 2022, 2021, 2020, 2019, 2018))
RACE = st.selectbox(
'Select Race',
utils.get_events(YEAR))
SESSION = st.selectbox(
'Select Session',
utils.get_sessions(YEAR, RACE))
laps = Top_Speed_at_Speed_Trap.get_laps(YEAR, RACE, SESSION)
fastest_st = Top_Speed_at_Speed_Trap.get_fastest_speedtrap(laps)
max_speeds = Top_Speed_at_Speed_Trap.get_max_speeds(fastest_st, laps,YEAR)
Top_Speed_at_Speed_Trap.plot(max_speeds, fastest_st, YEAR, RACE, SESSION)