A suite of high-performance Command Line Interface (CLI) tools written in C for Formula 1 data analysis.
This toolkit was created as a personal challenge to push my limits in C and explore the "black box" of web-based data interaction. While modern frameworks abstract away the complexity of networking, I wanted to understand the foundational layers:
- Low-level Networking: Interacting with the OpenF1 API using
libcurlto handle HTTP protocols manually. - Manual Memory Management: Orchestrating dynamic memory allocation (
malloc/realloc) and ensuring zero memory leaks during complex JSON parsing. - Data Architecture: Implementing and traversing JSON structures using
cJSONto bridge the gap between web data and C structs - Backend Insights: Gaining a first-hand look at how data flows from a server to a low-level client.
A quick tool to retrieve detailed information about any driver by their racing number.
- Features: Fetches full name, team, and country code.
- Usage: Input a driver number (e.g.,
44for Lewis Hamilton) to get an instant profile.
Analyzes a driver's performance across an entire season using ASCII visualization.
- Features: Fetches all race results for a specific year and driver number.
- Visualization: Generates an ASCII bar chart representing finishing positions (longer bars = better results).
A comprehensive tool to explore historical race results.
- Features: Lists all GPs in a season, allows the user to select one, and displays the full race classification.
- Logic: Performs complex nested API calls to match driver keys with finishing positions.
You will need a C compiler (GCC/Clang) and the following libraries installed:
libcurl: For HTTP requests.cJSON: Included in the repository.
sudo apt-get install libcurl4-openssl-devpacman -S mingw-w64-x86_64-curlWe use a Makefile to simplify the compilation process. Run the following command in the root directory:
makeTo build a specific tool:
make f1_lookup
make f1_analyzer
make f1_explorerTo clean up binary files:
make cleanEnter driver number: 44
Driver Info
-------------------------
Number : 44
Name : Lewis HAMILTON
Team : Mercedes
Country: GBR
Driver Analyzer - Final Race Results
------------------------------------
United Kingdom | P1 | ####################
Hungary | P3 | ##################
Belgium | P1 | ####################
Race Sessions for 2024
---------------------------------
1 - Bahrain (2024-02-29T11:30:00)
2 - Saudi Arabia (2024-03-07T13:30:00)
...
Select a GP by number: 1
Bahrain GP Results
--------------------------------------------------
P1 - Max VERSTAPPEN (#1)
P2 - Sergio PEREZ (#11)
P3 - Carlos SAINZ (#55)
Author: Tolga Demir Last Updated: March 2026
⭐ Give it a star if you appreciate the beauty of low-level systems programming!