Analyze geospacial data tracks
Project description
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_thresholdwas 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) - postgis: Add functions for integrating with a PostGIS instance provided in the
geo_track_analyzer.postgismodule - full: Install package will all extras
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geo_track_analyzer-2.0.0.tar.gz.
File metadata
- Download URL: geo_track_analyzer-2.0.0.tar.gz
- Upload date:
- Size: 55.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3763bd0e1ee617426ef6b9b9ed9cae518e29db1917f7cb3ed09c576c911a2994
|
|
| MD5 |
f1d2b0c161c669736061e27ea9828576
|
|
| BLAKE2b-256 |
df81a345b312db18154a5729b15a5d7821c470d6959a7e91fba60b99e29ec1c6
|
File details
Details for the file geo_track_analyzer-2.0.0-py3-none-any.whl.
File metadata
- Download URL: geo_track_analyzer-2.0.0-py3-none-any.whl
- Upload date:
- Size: 65.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb9365b3989499d5fec5b09a2a5ca516b512e597014c5736223f820c157d5b75
|
|
| MD5 |
55f81b92e7dcf2a934dda09099b175bf
|
|
| BLAKE2b-256 |
ade8645136b7a213684828349fb52a471f92fdd64a3821d499bb7a94f979fb55
|