Simple parser for advanced analytics of the Garmin TCX files
Project description
YATCX_parser
Yet Another TCX Parser
yatsx_parser in a more advanced parser of the Garmin data files that was influenced by python-tcxparser.
The main difference from the rest of the available parser is in the core idea of the project that is connected to the OpenLAPP framework (to be published) that requires interaction with a more low-lever data with more advanced data aggregations.
Current version extracts the following properties:
featuresdictionary of the available features in the .tcx filehas_powersflag that shows availability of the power measurements in the filespowerslist of the extracted power measurementsgradeslist of the extracted slope grades in degreesdistanceslist of the passed distancemoveslist of the moves during a single measurementlow_altitude_distancepassed distance on a low-altitude (by default, 1500m)high_altitude_distancepassed distance on a high-altitudee (by default, 1500m)elevationslist of the elevationstotal_elevationtotal elevation (or some of the positive climbs)heart_ratelist of the heart rate measurementsmean_heart_rateaverage heart rate during the sessionspeedslist of the speedsaltitudeslist of the altitudescadenceslist of the cadenceshigh_altitude_timetotal time on the high-altitude(by default, 1500m)total_distancetotal distance passed during the sessioncaloriestotal caloriestotal_timetotal session timedatetimesession start timedatesession dateget_path(path, namespace)Read a value of a random value that could be found in thepathinside of thenamespaceread_xpath_property(xpath_obj, name)Read a numeric property name in the given xpath_obj object
Import statement
from yatcxparser import TcxParser
Default namespaces
Default namespaces from Garmin
Init parameters
file_name mandatory parameter with a path to the .tcx file
pre_read flag that makes a pre-initiation of the data for a quicker access if the same properties are expected to be called many times. Default: False
params dictionary of parameters
recovery flag to perform data recovery with a linear interpolation. Alternatively set by the params. Default: True
Default parameters
By default, the parameters are set as following:
default_params = {
'high_altitude': 1500,
'recovery': True
}
That corresopnds to a default min altitude of 1500 meters and replace all the missing values with a linear interplation model.
Usage
from yatcxparser import TcxParser
filename = '1.tcx'
tcxparser = TcxParser(filename, pre_read=True)
tcxparser.powers
# get list of the powers [0,0 ... , 0, 0]
Compatibility
| 3.6 | 3.7 | 3.8 | 3.9 |
| + | + | + | + |
'+' confirmed compatibility
License
MIT
Authors
Primary author: Aleksei Karetnikov
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 yatcxparser-0.0.1b0.tar.gz.
File metadata
- Download URL: yatcxparser-0.0.1b0.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea1da94f39f3646531cf201956b34805eece8913eb1ae25803e48ddcdec0c1cf
|
|
| MD5 |
c30e135bf1749b6c7719a2607b756d16
|
|
| BLAKE2b-256 |
ec6bb18eece104a76445e8240b2060180befa01f2fe9e42dfc894e2c06340ce8
|
File details
Details for the file yatcxparser-0.0.1b0-py2.py3-none-any.whl.
File metadata
- Download URL: yatcxparser-0.0.1b0-py2.py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ba4b6e9bcaeceab7eb0ada23196360f20c3e357b90d1daf68f41b936381c45bd
|
|
| MD5 |
c24ecb2a605c3e61b4a9fb244b361e36
|
|
| BLAKE2b-256 |
1ac36d4895808a43e7fa991a6d50654b75d2f9028c1545f81cdaae57a3308212
|