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:

img.png


🔧 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.1.tar.gz (46.0 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.1-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: report_of_monaco_2018-0.0.1.tar.gz
  • Upload date:
  • Size: 46.0 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.1.tar.gz
Algorithm Hash digest
SHA256 c73b81f2c7dc14f79e866f4adee0fd9c569214b967227f83677f5d7b61e2974b
MD5 ad40c556ee389e4aa3cc3be57eeadb99
BLAKE2b-256 5272228e40e3e8e37979f298b4fe2691d1a0775462a0b27d71c7f7a681ae413b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for report_of_monaco_2018-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 664964fa6fba40f5e109704d204f874f08a310dba51bda4bbad12b9505de5cf2
MD5 be85c134ba085a6bcc31e8e26de46ddc
BLAKE2b-256 ca2f2c27852aa0fb5c065ffd359bca756844fa7b40906643bd18764d5f43e0cd

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