(The default driver is Sergio Perez, default lap is 30. I still need to implement user interface in this page so that it takes the driver, lap, circuit you want to test and output the predicted lap time)
The code I used for this project can be found in my GitHub Repository: https://github.com/andrejcc04/Portfolio/blob/main/FormulaOne.Rmd
Note: 1 second = 1000 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Bahrain Grand Prix: 1:38:73
## Root Mean Squared Error: 1513 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Saudi Arabian Grand Prix: 1:35:151
## Root Mean Squared Error: 1269 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Australian Grand Prix: 1:21:268
## Root Mean Squared Error: 2551 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Japanese Grand Prix: 1:37:471
## Root Mean Squared Error: 1740 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Chinese Grand Prix: 1:41:449
## Root Mean Squared Error: 1187 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Miami Grand Prix: 1:31:51
## Root Mean Squared Error: 2652 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Imola Grand Prix: 1:22:301
## Root Mean Squared Error: 1069 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Monaco Grand Prix: 1:17:860
## Root Mean Squared Error: 1472 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Canadian Grand Prix: 1:17:701
## Root Mean Squared Error: 862 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Canadian Grand Prix: 1:20:572
## Root Mean Squared Error: 3317 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Austrian Grand Prix: 1:11:125
## Root Mean Squared Error: 843 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 British Grand Prix: 1:32:890
## Root Mean Squared Error: 869 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Hungarian Grand Prix: 1:25:388
## Root Mean Squared Error: 894 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Belgian Grand Prix: 1:51:495
## Root Mean Squared Error: 1189 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Dutch Grand Prix: 1:14:588
## Root Mean Squared Error: 1411 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Italian Grand Prix: 1:26:820
## Root Mean Squared Error: 752 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Azerbaijan Grand Prix: 1:47:263
## Root Mean Squared Error: 1152 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Singapore Grand Prix: 1:40:160
## Root Mean Squared Error: 927 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 United States Grand Prix: 1:41:427
## Root Mean Squared Error: 1033 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Mexican Grand Prix: 1:23:885
## Root Mean Squared Error: 774 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Brazilian Grand Prix: 1:15:887
## Root Mean Squared Error: 818 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Las Vegas Grand Prix: 1:38:655
## Root Mean Squared Error: 1131 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Qatar Grand Prix: 1:28:359
## Root Mean Squared Error: 883 milliseconds
## Predicted lap time of Sergio Pérez on lap 30 in the 2024 Abu Dhabi Grand Prix: 1:26:812
## Root Mean Squared Error: 680 milliseconds
## forename surname year name lap Predicted Laptime Actual Laptime
## 1 Sergio Pérez 2024 Bahrain Grand Prix 30 98073 96313
## Off by 1760 milliseconds
## [[1]]
##
## [[2]]
##
## [[3]]
## forename surname year name lap Predicted Laptime
## 1 Sergio Pérez 2024 Saudi Arabian Grand Prix 30 95151
## Actual Laptime
## 1 92782
## Off by 2369 milliseconds
## [[1]]
##
## [[2]]
##
## [[3]]
## forename surname year name lap Predicted Laptime
## 1 Sergio Pérez 2024 Australian Grand Prix 30 81268
## Actual Laptime
## 1 82180
## Off by 912 milliseconds
## [[1]]
##
## [[2]]
##
## [[3]]
## forename surname year name lap Predicted Laptime
## 1 Sergio Pérez 2024 Japanese Grand Prix 30 97471
## Actual Laptime
## 1 97097
## Off by 374 milliseconds
## [[1]]
##
## [[2]]
##
## [[3]]
## forename surname year name lap Predicted Laptime Actual Laptime
## 1 Sergio Pérez 2024 Chinese Grand Prix 30 101449 141644
## Off by 40195 milliseconds (Safety Car lap 21-31)
## [[1]]
##
## [[2]]
##
## [[3]]
## forename surname year name lap Predicted Laptime Actual Laptime
## 1 Sergio Pérez 2024 Miami Grand Prix 30 91051 120593
## Off by 29542 milliseconds (Safety Car lap 28-32)
## [[1]]
##
## [[2]]
##
## [[3]]
## forename surname year name lap Predicted Laptime
## 1 Sergio Pérez 2024 Emilia Romagna Grand Prix 30 82301
## Actual Laptime
## 1 83263
## Off by 962 milliseconds
## [[1]]
##
## [[2]]
##
## [[3]]
## forename surname year name lap Predicted Laptime Actual Laptime
## 1 Sergio Pérez 2024 Monaco Grand Prix 30 77860 NA
## Off by NA milliseconds (Crashed out lap 1)
## [[1]]
##
## [[2]]
##
## [[3]]
## forename surname year name lap Predicted Laptime
## 1 Sergio Pérez 2024 Canadian Grand Prix 30 77701.42
## Actual Laptime
## 1 89333
## Off by 11631.58 milliseconds (Rain)
## [[1]]
##
## [[2]]
##
## [[3]]