A library for telemetry data analysis
Project description
Racing-Telemetry
Racing-Telemetry is a Python library for analyzing racing data, providing tools for data retrieval, processing, and visualization.
Installation
You can install the library using pip:
pip install racing-telemetry
Usage
Here are some examples of how to use the Telemetry library:
Basic Usage
from racing_telemetry import Telemetry
from racing_telemetry.plot.plots import lap_fig, plot_2d_map
from racing_telemetry.analysis.streaming import Streaming
# Initialize Telemetry
t = Telemetry()
# Set Pandas adapter for data conversion
t.set_pandas_adapter()
# Set filter for specific session and driver
t.set_filter({'session_id': 1719933663, 'driver': 'durandom'})
# Retrieve telemetry data
lap_data = t.get_telemetry_df()
# Calculate average speed
from racing_telemetry.analysis import average_speed
avg_speed = average_speed(lap_data)
print(f"Average speed: {avg_speed:.2f} m/s")
# Create a lap figure
fig = lap_fig(lap_data, columns=["SpeedMs", "Throttle", "Brake"])
fig.show()
# Create a 2D map
map_fig = plot_2d_map(lap_data)
map_fig.show()
# Use streaming analysis
streaming = Streaming()
for index, row in lap_data.iterrows():
streaming.notify(row.to_dict())
features = streaming.get_features()
print(f"Lap time: {row['CurrentLapTime']:.2f}, Average speed: {features['average_speed'][-1]:.2f}, Coasting time: {features['coasting_time'][-1]:.2f}")
Features
- Data retrieval from various sources (GraphQL, InfluxDB, PostgreSQL)
- Data adaptation and conversion
- Basic statistical analysis
- Real-time streaming analysis
- Visualization tools for lap data and track maps
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the GPL License - see the LICENSE file for details.
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
racing_telemetry-0.1.6.tar.gz
(32.3 kB
view details)
Built Distribution
File details
Details for the file racing_telemetry-0.1.6.tar.gz
.
File metadata
- Download URL: racing_telemetry-0.1.6.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | acdc9835e65ed2cabda71dcfadd20eceab7ddfdf27f86ce9142466964b3b024a |
|
MD5 | 5db87f541a80439b6152ceedaaeee04b |
|
BLAKE2b-256 | 394db62c87e9b09aa499173aa8e98dac7430d21e0106e75305b0f319f279b85c |
File details
Details for the file racing_telemetry-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: racing_telemetry-0.1.6-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7363e98ccb93bc10e4e420603a804efac7b665173b42e3fa36fd3f500f8765d9 |
|
MD5 | b3222d70737ecb9398f84c4df924d721 |
|
BLAKE2b-256 | fb447b6f48536061a958b5d669f898058392838630d88b3f9cdea9b5dbf5670d |