Metadata-Version: 2.4
Name: hrcomparison
Version: 0.1.0
Summary: Tool for comparing heart rate data from multiple devices
Project-URL: Homepage, https://andgineer.github.io/hrcomparison/
Project-URL: Documentation, https://andgineer.github.io/hrcomparison/
Author-email: Andrey Sorokin <andrey@sorokin.engineer>
License: Copyright (c) 2025 Andrey Sorokin <andrey@sorokin.engineer>
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of
        this software and associated documentation files (the “Software”), to deal in
        the Software without restriction, including without limitation the rights to use,
        copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
        Software, and to permit persons to whom the Software is furnished to do so,
        subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
        EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
        OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
        NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
        HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
        WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
        FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
        OTHER DEALINGS IN THE SOFTWARE.
License-File: LICENSE.txt
Keywords: comparison,fit,garmin,gpx,heart-rate,hr,polar,suunto,tcx
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.11
Requires-Dist: click
Requires-Dist: fitparse
Requires-Dist: gpxpy
Requires-Dist: lxml
Requires-Dist: matplotlib
Requires-Dist: pillow>=10.3.0
Description-Content-Type: text/markdown

[![Build Status](https://github.com/andgineer/hrcomparison/workflows/ci/badge.svg)](https://github.com/andgineer/hrcomparison/actions)
[![Coverage](https://raw.githubusercontent.com/andgineer/hrcomparison/python-coverage-comment-action-data/badge.svg)](https://htmlpreview.github.io/?https://github.com/andgineer/hrcomparison/blob/python-coverage-comment-action-data/htmlcov/index.html)
# Heart Rate Monitor Comparison Tool

Compare heart rate readings from multiple devices by plotting data from TCX, GPX, or FIT files.
Perfect for validating heart rate monitor accuracy or comparing different devices worn simultaneously.

See example in the [Article comparing heart rate monitors (Garmin vs Coospo vs Scosche)](https://sorokin.engineer/posts/en/heart_rates_sensor_garmin_vs_coospo_vs_scosche)

## Supported Devices and Formats

### Heart Rate Recording Devices
- Chest Straps: Polar H9/H10, Garmin HRM-Pro/HRM-Dual, Wahoo TICKR
- Optical Sensors: Garmin/Polar/Suunto watches, Apple Watch

### File Formats
- TCX: Garmin, Polar, Suunto devices
- GPX: Strava, Komoot (with heart rate in extensions)
- FIT: Garmin, Wahoo, modern Polar and Suunto devices

### Compatible Apps
Export your data from:
- Garmin Connect
- Polar Flow
- Suunto app
- Strava
- Nike Run Club
- Training Peaks
- Zwift
- Endomondo (legacy)

With that tool was created [Article with heart rate monitor comparison](https://sorokin.engineer/posts/en/heart_rates_sensor_garmin_vs_coospo_vs_scosche)

## Installation

### From PyPI (recommended)
```bash
pip install hrcomparison
```

### From Source
```bash
git clone https://github.com/andgineer/hrcomparison.git
cd hrcomparison
source ./activate.sh  # Creates venv, installs dependencies and activates
```

## Usage

```bash
hrcomparison --help

Usage: hrcomparison [OPTIONS] [FOLDER]

  Create comparison chart with plots from files in the `folder`.

  FOLDER Folder with data files (.tcx, .gpx, or .fit). By default, current folder is used.

Options:
  -p, --prefix TEXT      Prefix to filter files in the FOLDER. If not
                         specified, all files will be used.
  -o, --output FILENAME  Output file name without extension. If not specified,
                         chart will be shown.
  --help                 Show this message and exit.
```

### Examples

Show chart on screen from files with names starting with `2018` in `tests/resources` folder:
```bash
hrcomparison tests/resources -p 2018
```

Save chart as PNG file from all files in current folder:
```bash
hrcomparison -o my_comparison
```

## Coverage report
* [Codecov](https://app.codecov.io/gh/andgineer/hrcomparison/tree/master/src)
* [Coveralls](https://coveralls.io/github/andgineer/hrcomparison)
