An interactive web app for creating custom Formula 1 visualisations.
This repository holds the code and development reporting for an interactive web app. Specifically, the app allows for custom visualisations of various aspects of Formula 1 (F1) data.
This project is written in R, and utilizes several R packages:
LIBRARY | USAGE | DOCS |
---|---|---|
shiny |
Framework for building web applications with R. | (link)[https://www.rdocumentation.org/packages/shiny/versions/1.8.1.1] |
shinydashboard |
Additional user interface controls for Shiny. | (link)[https://rstudio.github.io/shinydashboard/index.html] |
dplyr |
Data manipulation functions. | (link)[https://www.rdocumentation.org/packages/dplyr/versions/1.0.10] |
ggplot2 |
Plotting library for outputting visualisations. | (link)[https://ggplot2.tidyverse.org/reference/] |
tidyr |
Data management functions. | (link)[https://www.rdocumentation.org/packages/tidyr/versions/1.3.1] |
These can be installed together with:
install.packages(c("shiny", "shinydashboard", "dplyr", "ggplot2", "tidyr"))
The current site can be accessed live here.
Alternatively, the project can be run locally (after downloading the project and installing the required packages) with the following command:
runApp("F1-Analyser/global.r", port = 1234, launch.browser = TRUE)
This project contains 3 R files, the several previously described data files, and some deployment files, including:
global.r
– Main project file to be run, loads data and sub-files to be compiled into the application.ui.r
– Describes the various user interface (UI) elements for input selection and graphing output.server.r
– Takes selected input features and calculates corresponding outputs.~.csv
– Various .csv files from the dataset./rsconnect/
- Directory for deployment configurations.
This project uses the Formula 1 World Championship (1950 – 2023) dataset made publicly available on Kaggle. This dataset extensively details data on all races, drivers, constructors, qualifying sessions, race sessions, circuits, lap times, pit stops, and championships from 1950 (F1’s inaugural season) to 2023 (The most recent complete season). The data is compiled from the commonly used community-run Ergast API, which is updated live as seasons progress.
This project uses a subset of this dataset as follows:
File Name | Features (Including IDs) |
---|---|
constructor_standings.csv |
raceId, constructorId, points, position |
constructors.csv |
constructorId, name, nationality |
driver_standings.csv |
raceId, driverId, points, position |
drivers.csv |
driverId, forename, surname, dob, nationality |
races.csv |
raceId, year, round |
results.csv |
resultId, raceId, driverId, constructorId, position, points, statusId |
All project development completed by Sam Mata as part of a final project submission for the postgraduate programming project for DATA-472.