racing-telemetry


Nameracing-telemetry JSON
Version 0.1.6 PyPI version JSON
download
home_pagehttps://github.com/b4mad/racing-telemetry
SummaryA library for telemetry data analysis
upload_time2024-08-07 19:16:51
maintainerNone
docs_urlNone
authorMarcel Hild
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
pip install racing-telemetry
```

## Usage

Here are some examples of how to use the Telemetry library:

### Basic Usage

```python
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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/b4mad/racing-telemetry",
    "name": "racing-telemetry",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "Marcel Hild",
    "author_email": "hild@b4mad.net",
    "download_url": "https://files.pythonhosted.org/packages/39/4d/b62c87e9b09aa499173aa8e98dac7430d21e0106e75305b0f319f279b85c/racing_telemetry-0.1.6.tar.gz",
    "platform": null,
    "description": "# Racing-Telemetry\n\nRacing-Telemetry is a Python library for analyzing racing data, providing tools for data retrieval, processing, and visualization.\n\n## Installation\n\nYou can install the library using pip:\n\n```bash\npip install racing-telemetry\n```\n\n## Usage\n\nHere are some examples of how to use the Telemetry library:\n\n### Basic Usage\n\n```python\nfrom racing_telemetry import Telemetry\nfrom racing_telemetry.plot.plots import lap_fig, plot_2d_map\nfrom racing_telemetry.analysis.streaming import Streaming\n\n# Initialize Telemetry\nt = Telemetry()\n\n# Set Pandas adapter for data conversion\nt.set_pandas_adapter()\n\n# Set filter for specific session and driver\nt.set_filter({'session_id': 1719933663, 'driver': 'durandom'})\n\n# Retrieve telemetry data\nlap_data = t.get_telemetry_df()\n\n# Calculate average speed\nfrom racing_telemetry.analysis import average_speed\navg_speed = average_speed(lap_data)\nprint(f\"Average speed: {avg_speed:.2f} m/s\")\n\n# Create a lap figure\nfig = lap_fig(lap_data, columns=[\"SpeedMs\", \"Throttle\", \"Brake\"])\nfig.show()\n\n# Create a 2D map\nmap_fig = plot_2d_map(lap_data)\nmap_fig.show()\n\n# Use streaming analysis\nstreaming = Streaming()\nfor index, row in lap_data.iterrows():\n    streaming.notify(row.to_dict())\n    features = streaming.get_features()\n    print(f\"Lap time: {row['CurrentLapTime']:.2f}, Average speed: {features['average_speed'][-1]:.2f}, Coasting time: {features['coasting_time'][-1]:.2f}\")\n```\n\n## Features\n\n- Data retrieval from various sources (GraphQL, InfluxDB, PostgreSQL)\n- Data adaptation and conversion\n- Basic statistical analysis\n- Real-time streaming analysis\n- Visualization tools for lap data and track maps\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the GPL License - see the LICENSE file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A library for telemetry data analysis",
    "version": "0.1.6",
    "project_urls": {
        "Homepage": "https://github.com/b4mad/racing-telemetry"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fb447b6f48536061a958b5d669f898058392838630d88b3f9cdea9b5dbf5670d",
                "md5": "b3222d70737ecb9398f84c4df924d721",
                "sha256": "7363e98ccb93bc10e4e420603a804efac7b665173b42e3fa36fd3f500f8765d9"
            },
            "downloads": -1,
            "filename": "racing_telemetry-0.1.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b3222d70737ecb9398f84c4df924d721",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 32911,
            "upload_time": "2024-08-07T19:16:49",
            "upload_time_iso_8601": "2024-08-07T19:16:49.374259Z",
            "url": "https://files.pythonhosted.org/packages/fb/44/7b6f48536061a958b5d669f898058392838630d88b3f9cdea9b5dbf5670d/racing_telemetry-0.1.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "394db62c87e9b09aa499173aa8e98dac7430d21e0106e75305b0f319f279b85c",
                "md5": "5db87f541a80439b6152ceedaaeee04b",
                "sha256": "acdc9835e65ed2cabda71dcfadd20eceab7ddfdf27f86ce9142466964b3b024a"
            },
            "downloads": -1,
            "filename": "racing_telemetry-0.1.6.tar.gz",
            "has_sig": false,
            "md5_digest": "5db87f541a80439b6152ceedaaeee04b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 32345,
            "upload_time": "2024-08-07T19:16:51",
            "upload_time_iso_8601": "2024-08-07T19:16:51.231776Z",
            "url": "https://files.pythonhosted.org/packages/39/4d/b62c87e9b09aa499173aa8e98dac7430d21e0106e75305b0f319f279b85c/racing_telemetry-0.1.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-07 19:16:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "b4mad",
    "github_project": "racing-telemetry",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "racing-telemetry"
}
        
Elapsed time: 0.32161s