Skip to main content

GPX, TCX and FIT data extraction for Python

Project description

gpxtractor

GPX, TCX and FIT data extraction for Python

License: MIT

Description

Features

Installation

git clone 
cd gpxtractor
pip install .

Usage Example

Use the gpxtractor.extract_data function that returns a gpxtractor.Activity instance.

import gpxtractor

activity = gpxtractor.extract_data("your-gpx-tcx-or-fit_file.gpx")

print(activity.sport) # Output: name of the sport in the file as a string

The records attribute is a pandas.DataFrame holding the records extracted from the file\n with the gpxtractor.extract_data function. So the usual pandas.DataFrame methods can be applied

print(activity.records.head())

Once an instance of an Activity as been created with the extract_data function, the method\n transform_records can be used to calculate distance and speed if missing from the file as well as\n elevation incremental difference, gradient and in the case of running activities, pace.

activity.transform_records()
print(activity.records.head())

And once the records have been transformed with transform_records, it is possible to use the 2\n following methods to calculate aggregated data for kilometre and lap splits.

activity.compute_km_splits()
print(activity.km_splits)

activity.compute_lap_splits()
print(activity.lap_splits)

Note: the compute_lap_splits will only compute lap splits if the file contains lap data which is not\n the case for GPX files. It does not update the lap_splits attribute otherwise.

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

gpxtractor-0.1.0.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gpxtractor-0.1.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file gpxtractor-0.1.0.tar.gz.

File metadata

  • Download URL: gpxtractor-0.1.0.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for gpxtractor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3696c6b1915497d2e5068fe1a40b359384ad0a21973f14f45309c65700027ae4
MD5 dae6ec1908c504cb324e3c2e40b882cc
BLAKE2b-256 96cfd820f7e632805c4b31b65a1a6d32cd26b6ffb58f99c98942473d6ef6a125

See more details on using hashes here.

File details

Details for the file gpxtractor-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gpxtractor-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for gpxtractor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 464387655a49b1eed832c51ececd079ebe73a786674c4d73f4737cbfe13e22f1
MD5 c818aae93449a2cb65b5dc5ca2ea4886
BLAKE2b-256 1e05f5ae868da3ee4e48d79a9d0aa5698b11b8c534ffe5d12f99b88423902e65

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page