Skip to content

Latest commit

Β 

History

History
94 lines (65 loc) Β· 3.34 KB

File metadata and controls

94 lines (65 loc) Β· 3.34 KB

tcxr

A parser for TCX files written in R

R build status CRAN version CRAN downloads DOI

πŸ“¦ Installation β€’ ✨ Features β€’ πŸš€ Usage β€’ πŸ’Ύ Datasets β€’ πŸ“– Further read β€’ πŸ”— Related packages/frameworks β€’ πŸ”‘ License

tcxr is an R package designed to parse Training Center XML (TCX) files and extract key activity metrics. This package helps analyze workout and training data from devices that export TCX format, providing insights such as total distance, duration, calories burned, altitude, and power values. The Ruby package tcxread was the inspiration for this R package.

πŸ“¦ Installation

Install CRAN release version:

install.packages("tcxr")

✨ Features

  • Parse TCX files to extract activity metrics
  • Compute total distance, duration, and calories burned
  • Analyze maximum altitude and power values
  • Works with TCX data exported from Garmin and similar devices

πŸš€ Usage

Load the package

library(tcxr)

Read a TCX file

# Provide the path to a TCX file
tcx <- TCXRead("activity.tcx")

tcx$summary      # aggregated activity metrics
tcx$raw_data     # full trackpoint dataframe

πŸ’Ύ Datasets

Datasets available and used in the examples on the following links: DATASET1, DATASET2, DATASET3.

πŸ“– Further read

[1] Awesome Computational Intelligence in Sports

πŸ”— Related packages/frameworks

[1] tcxreader: Python reader/parser for Garmin's TCX file format.

[2] sport-activities-features: A minimalistic toolbox for extracting features from sports activity files written in Python

[3] TCXReader.jl: Julia package designed for parsing TCX files

[4] TCXWriter: A Tiny Library for writing/creating TCX files on Arduino

πŸ”‘ License

This package is distributed under the MIT License. This license can be found online at http://www.opensource.org/licenses/MIT.

Disclaimer

This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!