tracinginsights commited on
Commit
34e3b5f
·
1 Parent(s): f08547f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -11
app.py CHANGED
@@ -23,7 +23,7 @@ if not os.path.exists('repo_directory'):
23
 
24
 
25
  import streamlit as st
26
- from repo_directory import main
27
 
28
  import pandas as pd
29
 
@@ -39,7 +39,7 @@ SESSION_SELECTED = st.selectbox(
39
  'Select Session',
40
  ('FP1', 'FP2', 'FP3', 'Q', 'SQ', 'R'))
41
 
42
- laps_with_weather, weather_data, f1session = main.get_laps_with_weather(YEAR_SELECTED, RACE_SELECTED, SESSION_SELECTED)
43
  laps_with_weather.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
44
  st.dataframe(pd.read_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv'))
45
  with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv') as f:
@@ -48,22 +48,22 @@ with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv') as f:
48
 
49
 
50
 
51
- weather_data.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-weather.csv')
52
- st.dataframe(pd.read_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-weather.csv'))
53
 
54
- with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-weather.csv') as f:
55
- st.download_button('Click to Download Weather Data', f, file_name=f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-weather.csv')
56
 
57
- telemetry = main.get_pos_car_data(f1session)
58
 
59
 
60
 
61
- telemetry.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv')
62
- st.dataframe(pd.read_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv'))
63
 
64
 
65
- with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv') as f:
66
- st.download_button('Click to Download Telemetry Data', f, file_name=f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv')
67
 
68
 
69
  # from repo_directory.st_functions import st_button, load_css
 
23
 
24
 
25
  import streamlit as st
26
+ from repo_directory.main import get_laps_with_weather
27
 
28
  import pandas as pd
29
 
 
39
  'Select Session',
40
  ('FP1', 'FP2', 'FP3', 'Q', 'SQ', 'R'))
41
 
42
+ laps_with_weather, weather_data, f1session = get_laps_with_weather(YEAR_SELECTED, RACE_SELECTED, SESSION_SELECTED)
43
  laps_with_weather.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv')
44
  st.dataframe(pd.read_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv'))
45
  with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}.csv') as f:
 
48
 
49
 
50
 
51
+ # weather_data.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-weather.csv')
52
+ # st.dataframe(pd.read_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-weather.csv'))
53
 
54
+ # with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-weather.csv') as f:
55
+ # st.download_button('Click to Download Weather Data', f, file_name=f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-weather.csv')
56
 
57
+ # telemetry = main.get_pos_car_data(f1session)
58
 
59
 
60
 
61
+ # telemetry.to_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv')
62
+ # st.dataframe(pd.read_csv(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv'))
63
 
64
 
65
+ # with open(f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv') as f:
66
+ # st.download_button('Click to Download Telemetry Data', f, file_name=f'{YEAR_SELECTED}-{RACE_SELECTED}-{SESSION}-Tel.csv')
67
 
68
 
69
  # from repo_directory.st_functions import st_button, load_css