Skip to main content

A command-line tool to analyze the best lap times of Formula 1

Project description

🏎️ Monaco F1 2018 Q1 Lap Report

A command-line tool to analyze the best lap times of Formula 1 drivers during Q1 (first qualification stage) of the Monaco Grand Prix 2018.

This tool parses log files with start and end timestamps of the best laps (first 20 minutes only), calculates lap durations, and generates a clean, formatted report of the top 15 drivers who advance to Q2 — and those who don't.


📁 Dataset

The application works with the following three files:

  • abbreviations.txt: contains driver abbreviations, full names, and team names.
  • start.log: contains timestamps of when each driver's start race.
  • end.log: contains timestamps of when each driver's end race.

Example entry for start.log and end.log files:

SVF2018-05-24_12:02:58.917

  • SVF: Driver abbreviation
  • 2018-05-24: Date
  • 12:02:58.917: Start or end time (used for lap duration calculation)

Example entry for abbreviations.txt:

DRR_Daniel Riccardo_RED BULL RACING TAG HEUER

  • DRR: Driver abbreviation
  • Daniel Riccardo: Driver name
  • RED BULL RACING TAG HEUER: Driver team

🏁 Report Example

After parsing and calculating lap times, the output will look like:

1. Daniel Ricciardo      | RED BULL RACING TAG HEUER     | 1:12.013

2. Sebastian Vettel      | FERRARI                                            | 1:12.415

3. ...

------------------------------------------------------------------------

16. Brendon Hartley   | SCUDERIA TORO ROSSO HONDA | 1:13.179

17. Marcus Ericsson  | SAUBER FERRARI                            | 1:13.265

Instalation

Report-of-monaco-2018 can be installed by running pip install report-of-monaco-2018==0.0.2. It requires Python 3.9+ to run.

🔧 Features

  • Calculates and sorts drivers by best lap time.
  • Separates top 15 drivers from the rest.
  • Command-line interface to choose sorting order or filter by driver.
  • Graceful error handling (missing files, invalid data).

💻 Usage

Install dependencies and run the CLI app:

python -m report_of_monaco_2018.main --file <data_folder> [--asc | --desc]

Options:
--file <path>: Path to the folder containing the start.log, end.log, and abbreviations.txt files.

--asc: Sort report in ascending order (default).

--desc: Sort in descending order.

--driver "<name>": Show info for a specific driver.

Examples:

  • python -m report_of_monaco_2018.main --file [path to your folder] --desc
  • python -m report_of_monaco_2018.main --file [path to your folder] --driver "Sebastian Vettel"

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

report_of_monaco_2018-0.0.2.tar.gz (46.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

report_of_monaco_2018-0.0.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file report_of_monaco_2018-0.0.2.tar.gz.

File metadata

  • Download URL: report_of_monaco_2018-0.0.2.tar.gz
  • Upload date:
  • Size: 46.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for report_of_monaco_2018-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b0b61b495570c9c7343da75e348a49d6b2dc59b2993822bed81c4b77c0129afb
MD5 1a4e0c2ce5c591d9d9db5ec090b286d1
BLAKE2b-256 830ff3efd5bb88c8ef3e5bd648969496d255446476a6319eaa1dae105a45e73c

See more details on using hashes here.

File details

Details for the file report_of_monaco_2018-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for report_of_monaco_2018-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b452719313386525e1dc5fea247fb76108e36e5e8e4b86a56a1f888b6ddb7ba5
MD5 0ce9b6b454632840e785432c3d923a06
BLAKE2b-256 1e658e9b1427302c497f8036d109a8e065aa9d93e0e01526cd56fc51894db691

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page