Processes racing data to generate a detailed report of racer statistics.
Project description
Report of Monaco 2018 Racing
This project processes racing data to generate a detailed report of racer statistics, including race times, rankings, and team information. It supports sorting results and filtering by specific drivers.
Features
- Command-line Interface: Configure input folder, sorting order, and driver filtering.
- Data Parsing: Reads racer data from structured files (
abbreviations.txt,start.log,end.log). - Time Calculations: Computes race durations accurately from start and end timestamps.
- Flexible Reporting: Displays full rankings or filtered statistics for a single driver.
Installation
Create and activate a virtual environment:
virtualenv venv
venv/scripts/activate
Install the package:
python -m pip install monaco_2018_report
Import the package:
import monaco_2018_report
Usage
Run the script from the command line with the following options:
python script.py --folder_path <path_to_data_folder> [--order <asc|desc>] [--driver <driver_name>]
Arguments:
- --folder_path (required): Path to the folder containing abbreviations.txt, start.log, and end.log.
- --order (optional): Sorting order of the report.
- Options:
- asc (default): Ascending order of race times.
- desc: Descending order of race times.
- Options:
- --driver (optional): Filter and show statistics for a specific driver.
Usage Exemple
python script.py --folder_path ./data --order desc --driver "Fernando Alonso"
Output
- Ranked Report: Displays all racers, sorted by race time, with a separator distinguishing the top 15 racers.
- Driver Statistics: Shows details of a specific driver's performance if --driver is specified
File Requirements
The input folder must contain:
- abbreviations.txt: Racer abbreviations, names, and team data.
- start.log: Start times for each racer.
- end.log: End times for each racer.
Error Handling
- Ensures all required files are present.
- Validates input data formats.
- Provides informative error messages for missing or invalid arguments.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file monaco_2018_report-0.3.1.tar.gz.
File metadata
- Download URL: monaco_2018_report-0.3.1.tar.gz
- Upload date:
- Size: 4.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5777726b7c4334afbb6cdaab4d6a4fd23ad427adf0a32271dd2f577c0cce520b
|
|
| MD5 |
415cd1d358fad995b113ac279a3d503a
|
|
| BLAKE2b-256 |
fa77263b4db51e5de2323372e241d66e3352cf5dc05c5c944a4b8de854ac0440
|
File details
Details for the file monaco_2018_report-0.3.1-py3-none-any.whl.
File metadata
- Download URL: monaco_2018_report-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.3 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1aa98b227fc944f91aa278143b0938bacc1eba9b032f03089c34b0ca352e9276
|
|
| MD5 |
2228f3acb09b57cc050b009d05feff2f
|
|
| BLAKE2b-256 |
08182aa093708ad02139ded6139bbffb172105a9d5428ee13fdce2599b168bf1
|