Spaces:
Runtime error
Runtime error
tracinginsights
commited on
Commit
•
acc07c2
1
Parent(s):
1420ee6
Update pages/Pit_Stops.py
Browse files- pages/Pit_Stops.py +17 -10
pages/Pit_Stops.py
CHANGED
@@ -18,29 +18,36 @@ RACE_SELECTED = st.selectbox(
|
|
18 |
event_id = PitStops.get_event_id(season_events, RACE_SELECTED)
|
19 |
df = PitStops.get_pitstops(event_id) #dhl pitstops
|
20 |
|
21 |
-
race_names_df, pit_stops_df, drivers_df = PitStops.load_data()
|
22 |
-
|
23 |
-
event_date = PitStops.get_event_date(season_events, RACE_SELECTED)
|
24 |
-
|
25 |
-
ergast_pitstops, grandprix = PitStops.get_pitstops_by_date(pit_stops_df,drivers_df,race_names_df,event_date)
|
26 |
-
|
27 |
-
df_agg = PitStops.combine_dfs(ergast_pitstops, df)
|
28 |
-
|
29 |
try:
|
30 |
PitStops.plot_event_pitstops(df, RACE_SELECTED)
|
31 |
except:
|
32 |
pass
|
33 |
|
|
|
34 |
try:
|
35 |
-
PitStops.
|
36 |
except:
|
37 |
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
|
39 |
try:
|
40 |
-
PitStops.
|
41 |
except:
|
42 |
pass
|
43 |
|
|
|
44 |
try:
|
45 |
PitStops.plot_event_ratings(df_agg, grandprix)
|
46 |
except:
|
|
|
18 |
event_id = PitStops.get_event_id(season_events, RACE_SELECTED)
|
19 |
df = PitStops.get_pitstops(event_id) #dhl pitstops
|
20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
try:
|
22 |
PitStops.plot_event_pitstops(df, RACE_SELECTED)
|
23 |
except:
|
24 |
pass
|
25 |
|
26 |
+
|
27 |
try:
|
28 |
+
PitStops.plot_full_season_median(YEAR_SELECTED)
|
29 |
except:
|
30 |
pass
|
31 |
+
try:
|
32 |
+
|
33 |
+
race_names_df, pit_stops_df, drivers_df = PitStops.load_data()
|
34 |
+
|
35 |
+
event_date = PitStops.get_event_date(season_events, RACE_SELECTED)
|
36 |
+
|
37 |
+
ergast_pitstops, grandprix = PitStops.get_pitstops_by_date(pit_stops_df,drivers_df,race_names_df,event_date)
|
38 |
+
|
39 |
+
df_agg = PitStops.combine_dfs(ergast_pitstops, df)
|
40 |
+
except:
|
41 |
+
pass
|
42 |
+
|
43 |
+
|
44 |
|
45 |
try:
|
46 |
+
PitStops.plot_event_ratings(df_agg, grandprix)
|
47 |
except:
|
48 |
pass
|
49 |
|
50 |
+
|
51 |
try:
|
52 |
PitStops.plot_event_ratings(df_agg, grandprix)
|
53 |
except:
|