This R package contains a Shiny app to visualize F1 results since the year 1958 to this date. The results are extracted from Ergast Developer API
To install and use this package, you can follow these steps:
-
Install
devtools
Package (if not already installed):If you haven't already installed the
devtools
package, you can do so using the following command in your R console:install.packages("devtools")
-
Load the
devtools
Library: After installingdevtools
, load the library in your R session:library("devtools")
-
Install Package from Github: Use the install_github function from devtools to install the "F1-stats" package directly from this GitHub repository:
devtools::install_github("hugo-morvan/F1_stats")
This command will download and install the package along with its dependencies from this GitHub repository.
-
Load the Installed Package: Once the installation is complete, load the package into your R session:
library("F1_stats")
After loading the package, you can use its functions and features in your R environment.
- Load and Install Shiny:
Ensure that the package shiny is installed and loaded:
library("shiny")
- Launch the Shiny App: To run the shiny app, simply run the following commands :
runGitHub("F1_stats", "hugo-morvan", subdir = "R/")
- Explore the Dataset ! The app contains F1 driver and constructor standings since 1958. Have fun exploring its content !
The API used for this project is the Ergast F1 Standings API.
To list the driver or constructor standings after a specific race use the following URLs with the required year and round number:
http://ergast.com/api/f1/2008/5/driverStandings
http://ergast.com/api/f1/2008/5/constructorStandings
To list the driver or constructor standings at the end of a specific season use the following URLs with the required year. If the season hasn’t ended you will get the current standings:
http://ergast.com/api/f1/2008/driverStandings
http://ergast.com/api/f1/2008/constructorStandings
Current standings can always be obtained using the following static URLs: