Spaces:
Runtime error
Runtime error
kbberendsen
commited on
Merge branch 'experimental'
Browse files- .gitignore +1 -1
- __pycache__/app.cpython-311.pyc +0 -0
- app.py +20 -36
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/car_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/driver_info.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/position_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/race_control_messages.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/session_status_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/timing_app_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/timing_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/track_status_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/weather_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/car_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/driver_info.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/lap_count.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/position_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/race_control_messages.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/session_status_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/timing_app_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/timing_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/track_status_data.ff1pkl +3 -0
- cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/weather_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/car_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/driver_info.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/position_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/race_control_messages.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/session_status_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/timing_app_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/timing_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/track_status_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/weather_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/car_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/driver_info.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/lap_count.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/position_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/race_control_messages.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/session_status_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/timing_app_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/timing_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/track_status_data.ff1pkl +3 -0
- cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/weather_data.ff1pkl +3 -0
- modules/__pycache__/drivers.cpython-311.pyc +0 -0
- modules/__pycache__/plot.cpython-311.pyc +0 -0
- modules/__pycache__/sidebar.cpython-311.pyc +0 -0
- modules/__pycache__/test_module.cpython-311.pyc +0 -0
- modules/drivers.py +19 -0
- modules/test_module.py +32 -0
.gitignore
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
|
2 |
.venv/
|
3 |
.DS_Store
|
|
|
1 |
+
/pycache/*
|
2 |
.venv/
|
3 |
.DS_Store
|
__pycache__/app.cpython-311.pyc
CHANGED
Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ
|
|
app.py
CHANGED
@@ -1,11 +1,12 @@
|
|
1 |
import os
|
2 |
-
from shiny import App, ui, render, reactive
|
3 |
import fastf1 as ff1
|
4 |
import matplotlib.pyplot as plt
|
5 |
from matplotlib.collections import LineCollection
|
6 |
from matplotlib import cm
|
7 |
import numpy as np
|
8 |
import shinyswatch
|
|
|
9 |
|
10 |
# Define cache folder path
|
11 |
cache_path = os.getcwd() + "/cache"
|
@@ -17,50 +18,32 @@ ff1.Cache.enable_cache(cache_path)
|
|
17 |
ff1.Cache.offline_mode(enabled=True)
|
18 |
|
19 |
# Define drivers
|
20 |
-
drivers_2023 =
|
21 |
-
|
22 |
-
'ALO': 'Fernando Alonso', 'LEC': 'Charles Leclerc', 'STR': 'Lance Stroll',
|
23 |
-
'MAG': 'Kevin Magnussen', 'TSU': 'Yuki Tsunoda', 'ALB': 'Alexander Albon',
|
24 |
-
'ZHO': 'Guanyu Zhou', 'HUL': 'Nico Hülkenberg', 'OCO': 'Esteban Ocon',
|
25 |
-
'HAM': 'Lewis Hamilton', 'SAI': 'Carlos Sainz', 'RUS': 'George Russel',
|
26 |
-
'BOT': 'Valteri Bottas', 'PIA': 'Oscar Piastri', 'VRI': 'Nyck de Vries',
|
27 |
-
'SAR': 'Logan Sargeant', 'RIC': 'Daniel Ricciardo'}
|
28 |
-
|
29 |
-
drivers_2022 = {'Fastest driver': 'Fastest driver', 'VER': 'Max Verstappen',
|
30 |
-
'NOR': 'Lando Norris', 'GAS': 'Pierre Gasly', 'PER': 'Sergio Perez',
|
31 |
-
'ALO': 'Fernando Alonso', 'LEC': 'Charles Leclerc', 'STR': 'Lance Stroll',
|
32 |
-
'MAG': 'Kevin Magnussen', 'TSU': 'Yuki Tsunoda', 'ALB': 'Alexander Albon',
|
33 |
-
'ZHO': 'Guanyu Zhou', 'HUL': 'Nico Hülkenberg', 'OCO': 'Esteban Ocon',
|
34 |
-
'HAM': 'Lewis Hamilton', 'SAI': 'Carlos Sainz', 'RUS': 'George Russel',
|
35 |
-
'BOT': 'Valteri Bottas', 'VRI': 'Nyck de Vries', 'VET': 'Sebastian Vettel',
|
36 |
-
'RIC': 'Daniel Ricciardo', 'MSC': 'Mick Schumacher',
|
37 |
-
'LAT': 'Nicolas Latifi'}
|
38 |
|
39 |
app_ui = ui.page_fluid(
|
40 |
-
{"style": "padding: 10px"},
|
41 |
shinyswatch.theme.minty(),
|
42 |
ui.include_css("styles.css"),
|
43 |
ui.panel_title("Gear usage in fastest lap"),
|
44 |
ui.layout_sidebar(
|
45 |
ui.panel_sidebar(
|
46 |
ui.input_select(
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
),
|
63 |
-
|
64 |
ui.panel_main(
|
65 |
ui.row(
|
66 |
ui.column(
|
@@ -157,6 +140,7 @@ def server(input, output, session):
|
|
157 |
def get_data_2():
|
158 |
try:
|
159 |
ui.notification_show("Data takes a couple seconds to load.", duration=3, type = 'default')
|
|
|
160 |
f1_session = ff1.get_session(int(input.year()), input.track_select(), input.session_type())
|
161 |
f1_session.load()
|
162 |
|
|
|
1 |
import os
|
2 |
+
from shiny import App, ui, render, reactive, module
|
3 |
import fastf1 as ff1
|
4 |
import matplotlib.pyplot as plt
|
5 |
from matplotlib.collections import LineCollection
|
6 |
from matplotlib import cm
|
7 |
import numpy as np
|
8 |
import shinyswatch
|
9 |
+
from modules import drivers
|
10 |
|
11 |
# Define cache folder path
|
12 |
cache_path = os.getcwd() + "/cache"
|
|
|
18 |
ff1.Cache.offline_mode(enabled=True)
|
19 |
|
20 |
# Define drivers
|
21 |
+
drivers_2023 = drivers.drivers_2023
|
22 |
+
drivers_2022 = drivers.drivers_2022
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
app_ui = ui.page_fluid(
|
|
|
25 |
shinyswatch.theme.minty(),
|
26 |
ui.include_css("styles.css"),
|
27 |
ui.panel_title("Gear usage in fastest lap"),
|
28 |
ui.layout_sidebar(
|
29 |
ui.panel_sidebar(
|
30 |
ui.input_select(
|
31 |
+
"track_select", "Select track:",
|
32 |
+
choices = ["Austria", "Hungary", "Spain", "Bahrain", "United-Kingdom", "Netherlands"],
|
33 |
+
selected = "Austria"
|
34 |
+
),
|
35 |
+
ui.input_radio_buttons(
|
36 |
+
"session_type", "Session type:",
|
37 |
+
choices = {"R": "Race", "Q": "Qualification"},
|
38 |
+
selected = "R"
|
39 |
+
),
|
40 |
+
ui.input_radio_buttons(
|
41 |
+
"year", "Year:",
|
42 |
+
choices = ["2023", "2022"],
|
43 |
+
selected = "2023"
|
44 |
+
),
|
45 |
+
width=2
|
46 |
),
|
|
|
47 |
ui.panel_main(
|
48 |
ui.row(
|
49 |
ui.column(
|
|
|
140 |
def get_data_2():
|
141 |
try:
|
142 |
ui.notification_show("Data takes a couple seconds to load.", duration=3, type = 'default')
|
143 |
+
|
144 |
f1_session = ff1.get_session(int(input.year()), input.track_select(), input.session_type())
|
145 |
f1_session.load()
|
146 |
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/car_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:16e2ce5c7812c643704e1898a77f365c83cd90b01cfecc632b2060d8ff9cb567
|
3 |
+
size 22334795
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/driver_info.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:04c5ee3c0780a8cf02ea3899855a383c2798e48b3599976dfa7348fe90872734
|
3 |
+
size 5130
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/position_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:32c2f3bff8c8aa56ab2e3e85bc8ab6bb3cb70161ccf4c94af1b4fef0d2425dba
|
3 |
+
size 21372759
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/race_control_messages.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:473de25c75a4238f3e8e69e8931e283b9fbf185f64dc6ad80ad73f24c644a72e
|
3 |
+
size 2569
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/session_status_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6c08aa968f55d79bfe5d1bd1502b1e610727884ad29332bef8710ff85fdd30a8
|
3 |
+
size 453
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/timing_app_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:49b0ed5d034aadb6e42dd9a293ec159b073dc053d972dac097a6dde2d2c53575
|
3 |
+
size 37094
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/timing_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfeb5e8fc8ae6483c8781a32d1643adaf68c216d7be2471494e07c6f3e3d18ae
|
3 |
+
size 75238
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/track_status_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0142cf62a71a1696a7dd50eec19b2eaea765cd05151d4d99edcd135807f13c11
|
3 |
+
size 296
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-03_Qualifying/weather_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:46374e8aec8fd39f634e46ba4f82a9b56a0b3809baa50e123652153a590943b5
|
3 |
+
size 5576
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/car_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ee5975be747ef5b933373235481a8d2d5df8459062e32481047120c86e8fb9cc
|
3 |
+
size 43051775
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/driver_info.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9c2a1a6e6c953ab9bcb6779814354025a3b2c2170bdf8bb7ad3e4a4cf617ea8a
|
3 |
+
size 5130
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/lap_count.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0ea5f8b29c307d4775d44827a4be802c5db0a2460c45a6eed5ecf7b98b96ab14
|
3 |
+
size 1460
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/position_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ef51b00094f9d69d3a8ea2e40fa11fce51f02de38a07b943e85b9f14e2df10d3
|
3 |
+
size 47042135
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/race_control_messages.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:501796adbe5baf1721059dd80efd58b9088e6b3fb572bf306d86fc67592f09d7
|
3 |
+
size 9860
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/session_status_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d4593182392f84a54b84c1563e627390229bee8db9d393ca0ecf4d9642a50ec1
|
3 |
+
size 216
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/timing_app_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d6e6bd8979d2e4f521ef958fb1511f23c9869cc232571d94b03d531ba89cf99b
|
3 |
+
size 124642
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/timing_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d68c478ba5d07df29e0975d68fa9b432c987469119a60416ae3df8d8a63915e5
|
3 |
+
size 1277125
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/track_status_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9787a6b8b3ef3ba34a8b68bb5294b64abec84584db218a850ab3e0b280386a41
|
3 |
+
size 508
|
cache/2022/2022-09-04_Dutch_Grand_Prix/2022-09-04_Race/weather_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f16667f0ee806f71cb0a52932ffb9e0a7adaf11f10724ade7740dbf9de59171f
|
3 |
+
size 10571
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/car_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0553819ceb2c84feb7012569321f67d40af4714e572958857d3b022f1c729bb2
|
3 |
+
size 26565437
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/driver_info.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:863adef263f9ac1506fe35791e49a1254479cbebe3b5bd76861d1a7881c5a596
|
3 |
+
size 5112
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/position_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5ea575204fc4b6f94adf4e5602157da29fa581b4354b63a8318ec21c060f29a5
|
3 |
+
size 25257321
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/race_control_messages.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b436a0302d2cae767af521953fc9d1da689330e60892d3a6289019e30aefdbca
|
3 |
+
size 5133
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/session_status_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c21633e9a0a0c8cb656de936b132cbde626531a2456c82a13315ee6dbbf4d16c
|
3 |
+
size 532
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/timing_app_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ad69e9a54c08d742b053202a190d8fcd91d9cd80758b4171aa3fc71cf5b25fc5
|
3 |
+
size 58827
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/timing_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ecf477200ed5484810bcb6adc77aa7e8374eceae1c325d33e6d8da1a851a5430
|
3 |
+
size 137891
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/track_status_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:79fe0545b11709c515a68f5c025a995e5c08846227b49f0c8e10924ad5f77b32
|
3 |
+
size 295
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-26_Qualifying/weather_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2e6bb27913b8a2f5bdb7fd83741a20ad39ef61a6ad315222219768a5f520a194
|
3 |
+
size 6570
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/car_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:4422a47d95831f8bdfaa2c765839c857700be0719229ee1da44208c65a654970
|
3 |
+
size 55273617
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/driver_info.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1698c3c63ec51726caf4f6e7f8521b4868bc79978f5195a45130aceafa2b2213
|
3 |
+
size 5112
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/lap_count.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:0b635cbedcb44aa75b0c6f9047c535b44806c091e35149bfec50655f0149e05e
|
3 |
+
size 1468
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/position_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7830a2abe835f692c3540e81d03ca4c2e5400af8e01b9f99fcc0a2f348c6dfaa
|
3 |
+
size 60375496
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/race_control_messages.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8f2be01bc4c5bb914c9166d0933d08065f803a4b52c7cdc492de6be85c4ddb19
|
3 |
+
size 6747
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/session_status_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:fd8645d8fb4c3cd91220cc14cafbddec68e50eeecbbcdd38425b378201cfcc08
|
3 |
+
size 268
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/timing_app_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b73411cf00cb94c0415a72af3a1cd7eb9521ad764ab10e803105b56efcef6251
|
3 |
+
size 134433
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/timing_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:e9f31029d3219e033e7fefe13bf819e3838e6fc62154e277d52723b9a1984b6f
|
3 |
+
size 1270451
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/track_status_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1d873f94c8d117b76d02d2194160bd608c2b2aaed763923a0bb5947975db46ce
|
3 |
+
size 562
|
cache/2023/2023-08-27_Dutch_Grand_Prix/2023-08-27_Race/weather_data.ff1pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:6e9e9db86aa559b4e8359f03044fc6f92fb35cfdbc4bb905e7250d28643ceae4
|
3 |
+
size 13536
|
modules/__pycache__/drivers.cpython-311.pyc
ADDED
Binary file (1.49 kB). View file
|
|
modules/__pycache__/plot.cpython-311.pyc
ADDED
Binary file (5.17 kB). View file
|
|
modules/__pycache__/sidebar.cpython-311.pyc
ADDED
Binary file (1.84 kB). View file
|
|
modules/__pycache__/test_module.cpython-311.pyc
ADDED
Binary file (2.01 kB). View file
|
|
modules/drivers.py
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Define drivers
|
2 |
+
drivers_2023 = {'Fastest driver': 'Fastest driver', 'VER': 'Max Verstappen',
|
3 |
+
'NOR': 'Lando Norris', 'GAS': 'Pierre Gasly', 'PER': 'Sergio Perez',
|
4 |
+
'ALO': 'Fernando Alonso', 'LEC': 'Charles Leclerc', 'STR': 'Lance Stroll',
|
5 |
+
'MAG': 'Kevin Magnussen', 'TSU': 'Yuki Tsunoda', 'ALB': 'Alexander Albon',
|
6 |
+
'ZHO': 'Guanyu Zhou', 'HUL': 'Nico Hülkenberg', 'OCO': 'Esteban Ocon',
|
7 |
+
'HAM': 'Lewis Hamilton', 'SAI': 'Carlos Sainz', 'RUS': 'George Russel',
|
8 |
+
'BOT': 'Valteri Bottas', 'PIA': 'Oscar Piastri', 'DEV': 'Nyck de Vries',
|
9 |
+
'SAR': 'Logan Sargeant', 'RIC': 'Daniel Ricciardo'}
|
10 |
+
|
11 |
+
drivers_2022 = {'Fastest driver': 'Fastest driver', 'VER': 'Max Verstappen',
|
12 |
+
'NOR': 'Lando Norris', 'GAS': 'Pierre Gasly', 'PER': 'Sergio Perez',
|
13 |
+
'ALO': 'Fernando Alonso', 'LEC': 'Charles Leclerc', 'STR': 'Lance Stroll',
|
14 |
+
'MAG': 'Kevin Magnussen', 'TSU': 'Yuki Tsunoda', 'ALB': 'Alexander Albon',
|
15 |
+
'ZHO': 'Guanyu Zhou', 'HUL': 'Nico Hülkenberg', 'OCO': 'Esteban Ocon',
|
16 |
+
'HAM': 'Lewis Hamilton', 'SAI': 'Carlos Sainz', 'RUS': 'George Russel',
|
17 |
+
'BOT': 'Valteri Bottas', 'DEV': 'Nyck de Vries', 'VET': 'Sebastian Vettel',
|
18 |
+
'RIC': 'Daniel Ricciardo', 'MSC': 'Mick Schumacher',
|
19 |
+
'LAT': 'Nicolas Latifi'}
|
modules/test_module.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
from shiny import module, App, ui, render, reactive
|
3 |
+
import fastf1 as ff1
|
4 |
+
import matplotlib.pyplot as plt
|
5 |
+
from matplotlib.collections import LineCollection
|
6 |
+
from matplotlib import cm
|
7 |
+
import numpy as np
|
8 |
+
import shinyswatch
|
9 |
+
|
10 |
+
@module.ui
|
11 |
+
def test_ui():
|
12 |
+
return ui.div(
|
13 |
+
ui.h2("Number + 5"),
|
14 |
+
ui.input_text(id="num_input", label="Enter number:"),
|
15 |
+
ui.output_text_verbatim(id="answer"),
|
16 |
+
)
|
17 |
+
|
18 |
+
|
19 |
+
@module.server
|
20 |
+
|
21 |
+
def test_server(input, output, session):
|
22 |
+
@reactive.Calc
|
23 |
+
def calculation():
|
24 |
+
try:
|
25 |
+
return int(input.num_input()) + 5
|
26 |
+
except:
|
27 |
+
return "..."
|
28 |
+
|
29 |
+
@output
|
30 |
+
@render.text
|
31 |
+
def answer():
|
32 |
+
return f"The answer is {calculation()}"
|