R scripts to analyze and visualize data from World Endurance Championship races.
source("WEC_Analysis.R") # load WEC.Analysis(...) function
source("WEC_Races.R") # load WEC races
source("Lap_Chart.R") # lap chart and position chart functions
source("Pit_Analysis.R") # pitstop analysis functions
The race data is placed in the Data/
directory. Each race is in its own directory of Data/<race name>
.
Race data for 2016 are pre-loaded in the Data/
folder.
Each race directory should contain the following files:
Analysis.csv
: Chronological analysisClassification.csv
: Race classificationGrid.csv
: Starting grid, scan ofGrid.pdf
The starting grid is converted from the PDF file Grid.pdf
using Tabula.
The command line automation is provided by tabula-java, and it is needed for the Python script.
Downloads data provided by fiawec.alkamelsystems.com.
Examples:
$ python download.py -s 2016 -e 'LE MANS' -p Data/2016_Le_Mans
$ python download.py -s 2016 -e 'CIRCUIT OF THE AMERICAS' -p Data/2016_COTA
R script to perform analysis on the downloaded data. It provides:
Grid
andClassification
Positions
: Grid vs finishing positionsAnalysis
: The chronological analysis dataEvents
: Events for lap and sector arrivals
Maintains a list of WEC races.
Interactive app for exploring lap time distribution and finishing positions of WEC races. Requires Shiny to run.
Code to generate lap charts for each race.