2 releases
new 0.1.1 | Mar 19, 2025 |
---|---|
0.1.0 | Mar 19, 2025 |
#209 in Command line utilities
200 downloads per month
61KB
1K
SLoC
f1-telemetry-cli: F1 Telemetry Analysis Tool
f1-telemetry-cli
is a command-line tool designed for analyzing Formula 1 racing telemetry data. It simplifies the process of creating and executing Jupyter Notebooks to explore various aspects of F1 race data, such as driver performance, track comparisons, pit stop strategies, and more.
Features
- Interactive Session Selection: Choose the year, Grand Prix, and specific session (Sprint Qualifying, Sprint Race, Qualifying, Race) you want to analyze through an interactive CLI interface.
- Automated Notebook Creation: Automatically generates a Jupyter Notebook or modifies an existing one, pre-populating it with necessary Python code and data loading instructions.
- Virtual Environment Management:
- Helps you create a virtual environment (
venv
) or use an existing one. - Installs all required Python packages (numpy, pandas, matplotlib, seaborn, fastf1, ing_theme_matplotlib, mplcyberpunk, nbconvert) in the
requirements.txt
automatically.
- Helps you create a virtual environment (
- Driver Analysis: Easily choose a driver and get analysis on them.
- Driver Position and Pit Stop Analysis: Analyze driver positions during the race and view pit stop data.
- Fastest Speed Analysis: Get data on the fastest speeds achieved during the race session.
- Track Comparison: Enables you to compare driver performance on different parts of the track.
- Plot Generation: Generates common telemetry plots.
- Seamless Notebook Execution: It automates the process of running the generated Jupyter Notebook through the use of
nbconvert
. - Customizable: Ability to select which driver, session, and GP to analyze.
Dependencies
- Rust: This project is built using Rust. Make sure you have Rust installed.
- Python: Python is required for the telemetry analysis, and a virtual environment is recommended.
- Python Packages: The following packages are automatically installed in the virtual environment:
numpy
pandas
matplotlib
seaborn
fastf1
ing_theme_matplotlib
mplcyberpunk
nbconvert
- Python Virtual Environment: Ensure
python3-venv
is installed before running the tool.
Installation
1. Install via Crates.io
You can install f1-telemetry-cli
directly from crates.io using Cargo:
2. Installing from Source (Using Cargo)
-
Install Rust: If you don't have Rust installed, follow the instructions on the official Rust website: https://www.rust-lang.org/tools/install
-
Ensure Python and
python3-venv
are Installed:sudo apt update # For Debian/Ubuntu sudo apt install python3 python3-venv -y
-
Clone the Repository:
git clone https://github.com/SohamDesai1/f1-telemetry-cli.git cd f1-telemetry-cli
-
Build the Project:
cargo build --release
-
Run the Executable:
./target/release/f1-telemetry-cli
3. Installing the Prebuilt Executable
If you don’t want to compile from source, you can download a prebuilt executable (if available).
-
Download the Executable:
Download the latest release from the Releases page.1.1 For Linux/Debian/Ubuntu users Download the .deb package and write the following command in terminal:
sudo dpkg -i <PATH/TO/.deb>
-
Ensure Python and
python3-venv
are Installed:sudo apt update # For Debian/Ubuntu sudo apt install python3 python3-venv -y
-
Make the Executable Runnable:
chmod +x f1-telemetry-cli
-
Run the Executable:
./f1-telemetry-cli
Usage
- Select a Jupyter Notebook: Upon execution, the tool will prompt you to select an existing Jupyter Notebook or start with a new one.
- Virtual Environment Setup: It will then guide you through setting up a virtual environment (or selecting an existing one) and installing the required Python packages.
- Interactive Prompts: Follow the prompts to select:
- The year of the race.
- The Grand Prix.
- The session (Sprint Qualifying, Sprint Race, Qualifying, or Race).
- Optionally, the drivers to analyze.
- Notebook Population: The tool will populate the notebook with Python code to:
- Import necessary libraries.
- Load the selected session data.
- Display session information and results.
- Add plots.
- Include driver and other analysis, if selected.
- Notebook Execution: After generating the notebook content, the tool will run it and display the results. You can also open the Jupyter Notebook manually to explore or modify it.
- Repeat the Process for different sessions.
Example Workflow
- Run the executable
- Select a Jupyter Notebook
- Create a new virtual environment
- Wait for all dependencies to be installed
- Choose the year, session, and GP to analyze
- Add analysis for the session, if desired
- Watch the notebook run and print the analysis
Contributing
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Make your changes and commit them.
- Push your branch to your forked repository.
- Submit a pull request.
License
This project is licensed under the Apache-2.0 License. See the LICENSE
file for details.
Contact
For any questions or support, please contact Soham Desai.
Dependencies
~5–16MB
~222K SLoC