Skip to main content

Testing PyPI - Python Version PyPI - License PyPI - Version

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

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_ms: Speed in m/s calculated relative to previous point. Requires time to be present in track.
  • distance_m: 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_m: Cummulated distance in track/segement in meters.
  • cum_distance_moving_m: Cummulated moving distance in track/segement in meters.
  • cum_distance_stopped_m: 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 for further details and examples how to use the visualizations.

Extras

The following extras are provided by the lib and may be installed additionally:

  • cli: Adds cli tools for converting fit files to gpx files (extract-fit-track) and updating the elevation in a gpx file with via api (enhance-elevation)
  • full: Install package will all extras

Metadata

Release files for geo-track-analyzer 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for geo-track-analyzer 3.1.0
File Size Uploaded
geo_track_analyzer-3.1.0.tar.gz 51.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for geo-track-analyzer 3.1.0
File Interpreter ABI Platform
geo_track_analyzer-3.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 114.4 kB

Release files / geo_track_analyzer-3.1.0.tar.gz

Download URL geo_track_analyzer-3.1.0.tar.gz
Size 51.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a8ec1ab1773d69d04e948bd84cb7a536fb52070aec5c16af83777bec55c7a15b
BLAKE2b-256 checksum
How to use checksums
6c1af8db00b8ab4d67b98ff6ca7addec42c17203fd8e80eec460cdd8717fb042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / geo_track_analyzer-3.1.0-py3-none-any.whl

Download URL geo_track_analyzer-3.1.0-py3-none-any.whl
Size 62.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
257902924f76a833a6762694257c11fbe560951bb1ff3201da1e493717f56c03
BLAKE2b-256 checksum
How to use checksums
6e49077280dffef090fce3998f07f06c9fe32d64e061b16ecda6a2165b382e2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

3.1.1

2 release files

This release

3.1.0 This release

2 release files

3.0.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.7.1

2 release files

1.7.0

2 release files

1.6.3

2 release files

1.6.2

2 release files

1.6.0

2 release files

1.5.0

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.2

2 release files

1.3.1

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.2

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page