Skip to main content

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 telemetry import Telemetry
from telemetry.plot.plots import lap_fig, plot_2d_map
from 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 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 MIT 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.1.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

racing_telemetry-0.1.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file racing_telemetry-0.1.1.tar.gz.

File metadata

  • Download URL: racing_telemetry-0.1.1.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for racing_telemetry-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d96efd28ada133e8ead4feed1144afd6cc7c718d777a17b76d73dd5ff639fb13
MD5 be25aeab2cc680579429047bca569cff
BLAKE2b-256 ab1111319ff70cd8fb1481ea02c634f7662f80d5d9add26ff4fffa186e78a3dd

See more details on using hashes here.

File details

Details for the file racing_telemetry-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for racing_telemetry-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9616c674f31300fac6ae92f7f43b8d08db72cb658aedb8efad56a06def1df2a8
MD5 9321058e8c59747f9f635a47fccde86e
BLAKE2b-256 944cbadae43beeab59df0de8ebebc87678e851a79f1528d3f2eaeb27428544f8

See more details on using hashes here.

Supported by

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