geo-track-analyzer


Namegeo-track-analyzer JSON
Version 1.3.2 PyPI version JSON
download
home_pagehttps://github.com/kschweiger/track_analyzer
SummaryAnalyze geospacial data tracks
upload_time2024-04-09 19:24:25
maintainerNone
docs_urlNone
authorKorbinian Schweiger
requires_python<3.13,>=3.10
licenseMIT
keywords fit gpx visualization analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![Testing](https://github.com/kschweiger/track_analyzer/actions/workflows/test.yml/badge.svg)](https://github.com/kschweiger/track_analyzer/actions/workflows/test.yml)
[![Build Documentation](https://github.com/kschweiger/track_analyzer/actions/workflows/doc.yml/badge.svg)](https://github.com/kschweiger/track_analyzer/actions/workflows/doc.yml)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/geo-track-analyzer)
![PyPI - License](https://img.shields.io/pypi/l/geo-track-analyzer)
![PyPI - Version](https://img.shields.io/pypi/v/geo-track-analyzer)


# Track analyzer

The focus of this package lies on analyzing and visualizing tracks of cycling or similar activities. Depending on the usecase settings like `stopped_speed_threshold` or `max_speed_percentile` may not be appropriate.

Installing the package with **cli** extra, I.e. using `pip install geo-track-analyzer[cli]`, add utility tools. See the [documentation](https://kschweiger.github.io/track_analyzer/cli/) for details.

## From files

Tracks my be initialized from ``.gpx`` and ``.fit`` files using the ``GPXFileTrack`` and ``FITTrack`` object, respectively.


## Programmatically

You can instanciate tracks programmatically inside your code using the `PyTrack` class.

```python
PyTrack(
        points: list[tuple[float, float]] = ...,
        elevations: None | list[float] = ...,
        times: None | list[datetime] = ...,
        heartrate: None | list[int] = None,
        cadence: None | list[int] = None,
        power: None | list[int] = None,
    )
```
## Extracting track data

The data of the track can be extracted into a pandas DataFrame object with the columns:

* **latitude**: Track point latitude value
* **longitude**: Track point longitude value
* **elevation**: Track point elevation value
* **speed**: Speed in m/s calculated relative to previous point. Requires time to be present in track.
* **distance**: Distance in m relative to previous point
* **heartrate**: Heartrate in bpm (if present in input)
* **cadence**: Cadence in rmp(if present in input)
* **power**: Power in W (if present in input)
* **time**: Time in seconds relative to previous point. Time must be present in track.
* **cum_time**: Cummulated time of the track/segment in seconds.  Requires time to be present in track.
* **cum_time_moving**: Cummulated moving time of the track/segment in seconds.  Requires time to be present in track.
* **cum_distance**: Cummulated distance in track/segement in meters.
* **cum_distance_moving**:  Cummulated moving distance in track/segement in meters.
* **cum_distance_stopped**:  Cummulated stopped distance in track/segement in meters.
* **moving**: Bool flag specifing if the `stopped_speed_threshold` was exceeded for the point.

Because some values are relative to previous points, the first point in the segment is not represented in this dataframe.

----------------

Furthermore an summary of the segments and tracks can be generated in the form of a `SegmentOverview` containing:

* Time in seconds (moving and totoal)
* Distance in meters and km (moving and totoal)
* Maximum and average velocity in m/s and km/h
* Maximum and minimum elevation in meters
* Uphill and downhill elevation in meters

## Visualizing the track

Visualizations of a track can be generated via the `plot` method and the ``kind`` parameter. See [documentation](https://kschweiger.github.io/track_analyzer/visualizations/) for further details and examples how to use the visualizations.
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/kschweiger/track_analyzer",
    "name": "geo-track-analyzer",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.13,>=3.10",
    "maintainer_email": null,
    "keywords": "fit, gpx, visualization, analysis",
    "author": "Korbinian Schweiger",
    "author_email": "korbinian.schweiger@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/b7/92/d40967767c823785ea7f56ddfa818ef4d3ec198547b1ea98c4cf17416584/geo_track_analyzer-1.3.2.tar.gz",
    "platform": null,
    "description": "[![Testing](https://github.com/kschweiger/track_analyzer/actions/workflows/test.yml/badge.svg)](https://github.com/kschweiger/track_analyzer/actions/workflows/test.yml)\n[![Build Documentation](https://github.com/kschweiger/track_analyzer/actions/workflows/doc.yml/badge.svg)](https://github.com/kschweiger/track_analyzer/actions/workflows/doc.yml)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/geo-track-analyzer)\n![PyPI - License](https://img.shields.io/pypi/l/geo-track-analyzer)\n![PyPI - Version](https://img.shields.io/pypi/v/geo-track-analyzer)\n\n\n# Track analyzer\n\nThe focus of this package lies on analyzing and visualizing tracks of cycling or similar activities. Depending on the usecase settings like `stopped_speed_threshold` or `max_speed_percentile` may not be appropriate.\n\nInstalling the package with **cli** extra, I.e. using `pip install geo-track-analyzer[cli]`, add utility tools. See the [documentation](https://kschweiger.github.io/track_analyzer/cli/) for details.\n\n## From files\n\nTracks my be initialized from ``.gpx`` and ``.fit`` files using the ``GPXFileTrack`` and ``FITTrack`` object, respectively.\n\n\n## Programmatically\n\nYou can instanciate tracks programmatically inside your code using the `PyTrack` class.\n\n```python\nPyTrack(\n        points: list[tuple[float, float]] = ...,\n        elevations: None | list[float] = ...,\n        times: None | list[datetime] = ...,\n        heartrate: None | list[int] = None,\n        cadence: None | list[int] = None,\n        power: None | list[int] = None,\n    )\n```\n## Extracting track data\n\nThe data of the track can be extracted into a pandas DataFrame object with the columns:\n\n* **latitude**: Track point latitude value\n* **longitude**: Track point longitude value\n* **elevation**: Track point elevation value\n* **speed**: Speed in m/s calculated relative to previous point. Requires time to be present in track.\n* **distance**: Distance in m relative to previous point\n* **heartrate**: Heartrate in bpm (if present in input)\n* **cadence**: Cadence in rmp(if present in input)\n* **power**: Power in W (if present in input)\n* **time**: Time in seconds relative to previous point. Time must be present in track.\n* **cum_time**: Cummulated time of the track/segment in seconds.  Requires time to be present in track.\n* **cum_time_moving**: Cummulated moving time of the track/segment in seconds.  Requires time to be present in track.\n* **cum_distance**: Cummulated distance in track/segement in meters.\n* **cum_distance_moving**:  Cummulated moving distance in track/segement in meters.\n* **cum_distance_stopped**:  Cummulated stopped distance in track/segement in meters.\n* **moving**: Bool flag specifing if the `stopped_speed_threshold` was exceeded for the point.\n\nBecause some values are relative to previous points, the first point in the segment is not represented in this dataframe.\n\n----------------\n\nFurthermore an summary of the segments and tracks can be generated in the form of a `SegmentOverview` containing:\n\n* Time in seconds (moving and totoal)\n* Distance in meters and km (moving and totoal)\n* Maximum and average velocity in m/s and km/h\n* Maximum and minimum elevation in meters\n* Uphill and downhill elevation in meters\n\n## Visualizing the track\n\nVisualizations of a track can be generated via the `plot` method and the ``kind`` parameter. See [documentation](https://kschweiger.github.io/track_analyzer/visualizations/) for further details and examples how to use the visualizations.",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Analyze geospacial data tracks",
    "version": "1.3.2",
    "project_urls": {
        "Documentation": "https://kschweiger.github.io/track_analyzer/",
        "Homepage": "https://github.com/kschweiger/track_analyzer",
        "Repository": "https://github.com/kschweiger/track_analyzer"
    },
    "split_keywords": [
        "fit",
        " gpx",
        " visualization",
        " analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "db69749bf26e13a9592912a32ddcbdbca0b00d296b1ab530a582095e42ff898f",
                "md5": "b8724b8cf47e3f9a9a8cb160c036cc73",
                "sha256": "f8f05f08b2bf6072c56eb610d0b708cf54838757e5003881f1dfc5b5252040e9"
            },
            "downloads": -1,
            "filename": "geo_track_analyzer-1.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b8724b8cf47e3f9a9a8cb160c036cc73",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.13,>=3.10",
            "size": 44878,
            "upload_time": "2024-04-09T19:24:23",
            "upload_time_iso_8601": "2024-04-09T19:24:23.551459Z",
            "url": "https://files.pythonhosted.org/packages/db/69/749bf26e13a9592912a32ddcbdbca0b00d296b1ab530a582095e42ff898f/geo_track_analyzer-1.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b792d40967767c823785ea7f56ddfa818ef4d3ec198547b1ea98c4cf17416584",
                "md5": "ae6eb47533bcffb118e063d21dacc041",
                "sha256": "2bd6611bc1b4d4cf412ab8150b1a7a9194901b4fc311474ef4d8d08f835a8b74"
            },
            "downloads": -1,
            "filename": "geo_track_analyzer-1.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "ae6eb47533bcffb118e063d21dacc041",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.13,>=3.10",
            "size": 38541,
            "upload_time": "2024-04-09T19:24:25",
            "upload_time_iso_8601": "2024-04-09T19:24:25.243047Z",
            "url": "https://files.pythonhosted.org/packages/b7/92/d40967767c823785ea7f56ddfa818ef4d3ec198547b1ea98c4cf17416584/geo_track_analyzer-1.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-09 19:24:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "kschweiger",
    "github_project": "track_analyzer",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "geo-track-analyzer"
}
        
Elapsed time: 0.21948s