Spaces:
Running
Running
File size: 948 Bytes
ebbd6bd 0b9b1ca ebbd6bd 482e129 ebbd6bd 482e129 ebbd6bd 482e129 e94482d 4a57d1b e94482d 51be303 e94482d 7a53495 e94482d fae15c0 e94482d 266a8ef 8d9b961 e94482d |
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 30 31 32 33 34 35 36 |
import streamlit as st
from repo_directory import PitStops
from repo_directory import button
import datetime
YEAR_SELECTED = st.selectbox(
'Select Year',
(2023, 2022, 2021, 2020, 2019, 2018))
season_events, events_list = PitStops.get_season_events(YEAR_SELECTED)
RACE_SELECTED = st.selectbox(
'Select Race',
events_list)
event_id = PitStops.get_event_id(season_events, RACE_SELECTED)
df = PitStops.get_pitstops(event_id) #dhl pitstops
race_names_df, pit_stops_df, drivers_df = PitStops.load_data()
event_date = PitStops.get_event_date(season_events, RACE_SELECTED)
ergast_pitstops, grandprix = PitStops.get_pitstops_by_date(pit_stops_df,drivers_df,race_names_df,event_date)
df_agg = PitStops.combine_dfs(ergast_pitstops, df)
PitStops.plot_event_ratings(df_agg, grandprix)
PitStops.plot_event_pitstops(df, RACE_SELECTED)
PitStops.plot_full_season_median(YEAR_SELECTED)
PitStops.plot_event_ratings(df_agg, grandprix)
|