Skip to main content

Analyze geospacial data tracks

Project description

Testing Build Documentation 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: 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 for further details and examples how to use the visualizations.

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

geo_track_analyzer-1.6.0.tar.gz (144.7 kB view details)

Uploaded Source

Built Distribution

geo_track_analyzer-1.6.0-py3-none-any.whl (153.0 kB view details)

Uploaded Python 3

File details

Details for the file geo_track_analyzer-1.6.0.tar.gz.

File metadata

  • Download URL: geo_track_analyzer-1.6.0.tar.gz
  • Upload date:
  • Size: 144.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.10

File hashes

Hashes for geo_track_analyzer-1.6.0.tar.gz
Algorithm Hash digest
SHA256 bbb6ea8c442eaa4bd0ffb4e6fb9a5092f48b9b60422425d1918dc72968a299f2
MD5 21f7bd318d447989009ffc21352114b2
BLAKE2b-256 b7209b3c1ac362bdd6cadf0418c0dee5bab34804ccd38f7fc2df68aba33f2a77

See more details on using hashes here.

File details

Details for the file geo_track_analyzer-1.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for geo_track_analyzer-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6fc2c95849a766dd817b25c8cefd114b05cb11a176f8f6700114a83c98d8d0e1
MD5 386090a2c1074effcf6a17a8231ddbd6
BLAKE2b-256 e8c7f1739409857854ce6a73f8c31cf9d9c335b1ed7c8b121854920a9eb4079e

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