tracinginsights commited on
Commit
3f1b25c
1 Parent(s): 4f48321

Create Laps_In_Top_10.py

Browse files
Files changed (1) hide show
  1. pages/Laps_In_Top_10.py +23 -0
pages/Laps_In_Top_10.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from repo_directory import Laps_In_Top_10
3
+ from repo_directory import button
4
+ import pandas as pd
5
+
6
+ YEAR_SELECTED = st.selectbox(
7
+ 'Select Year',
8
+ (2023, 2022, 2021, 2020, 2019, 2018))
9
+
10
+
11
+ race_names_df, lap_times_df, teams_df, results_df, pit_stops_df, drivers_df = Laps_In_Top_10.load_data()
12
+
13
+ events = Laps_In_Top_10.get_events(YEAR_SELECTED, race_names_df)
14
+
15
+ RACE_SELECTED = st.selectbox(
16
+ 'Select Race',
17
+ events.tolist())
18
+
19
+
20
+ try:
21
+ Laps_In_Top_10.plot(YEAR_SELECTED, RACE_SELECTED, race_names_df, lap_times_df, teams_df, results_df, pit_stops_df, drivers_df)
22
+ except:
23
+ pass