Skip to main content

🏃‍♂️ TrackTales

A modern, interactive tool to parse, analyze, and visualize your Apple Health workout data. Built with NiceGUI, TrackTales transforms your fitness journey into rich interactive charts, segment analysis, and personalized insights. This is a personal project, but contributions are welcome!

codecov Quality Gate Status

👩‍💻 For Contributors

If you are contributing or maintaining the project, see MAINTAINERS.md.

✨ Features

  • ZIP Parsing: Directly select and parse your export.zip file from Apple Health.
  • Workout Extraction: Focused on running workouts with detailed metrics (distance, duration, METs, heart rate, power, etc.).
  • Visual Statistics: Real-time summary of total activities, distance, duration, elevation, and calories with interactive charts (pie/rose charts for activity breakdown, bar charts with trend lines for time-based analysis).
  • Interactive Charts: Every chart supports zoom and pan (mouse scroll, pinch, or trackpad gesture). Click the ⛶ fullscreen button on any chart to open it in a maximized view with a range-slider for precise zoom control. Tooltips are rich HTML with bold labels and value+unit on each axis hover.
  • Health Data Insights: Health Data tab combines workout activity timing (day/hour heat map) with period-based trends for resting heart rate, body mass, VO2 max, Critical Power (CP), and W'. Fast metrics load immediately and CP/W' fill in progressively in the background.
  • Best Segments Tab: Computes and displays best running segments from 100m to 100km with expandable runner-up rows, formatted durations, localized labels, and segment power confidence.
  • Robust Segment Distance Model: Segment search uses GPX speed integration with safeguards for export edge cases (window clipping, final unpaired pause trimming, strict reversal-only trace splits, and realistic workout-level distance normalization).
  • Activity Filtering: Filter your workout data by activity type (Running, Cycling, Walking, etc.).
  • Workout Detail Modal: Open per-workout details from the Activities table. The wider modal now includes six tabs: Overview, Activity, Route (Leaflet map with start/end markers for each route part), Charts (elevation + pace charting plus a heart-rate trace when workout HR samples are available), Intervals (including per-split average heart rate when available), and Comparisons (historical same-route ranking with rank and time gap). The Charts tab uses non-zero-based axes, centered axis titles, and top legend placement for readability. Type-specific Activity metrics vary by sport — Running: pace, cadence, stride length, vertical oscillation, ground contact time, step count; Walking: pace, cadence, step length, step count; Hiking: elevation gain, pace, cadence, step length, step count; Cycling: speed, cadence, power, functional threshold power; Swimming: pool/open-water location, lap length, total stroke count. Activity/route-dependent tabs are disabled when required data is unavailable.
  • Date Range Filtering: Analyze specific time periods using the date range picker to focus on your desired date ranges.
  • Trends Period Aggregation: Switch the Trends tab aggregation between week, month, quarter, or year.
  • Gap-Aware Time Series: Missing periods are preserved in health-data charts, so the x-axis remains continuous and missing measurements are explicit (not coerced to zero). For line charts, inferred bridge segments are visually distinct from measured segments.
  • Route Parts Handling: Workouts with multiple GPX route files are preserved as independent route parts for segment analysis and also exposed as a merged compatibility route.
  • Multilingual UI (EN/FR): gettext-based translations for labels, tabs, date picker locale labels, notifications, and loading/progress status messages.
  • Unit System Preference: Switch between Metric (km, kg, m) and Imperial (mi, lbs, ft) from the preferences menu; all stats, charts, and tables update accordingly.
  • Advanced Analytics Dashboard: The Trends tab surfaces period-based performance trends, seasonal workout patterns, training load, and ACWR-based recovery recommendations.
  • Data Export: Convert your data into clean CSV or JSON formats, or download a filtered Markdown analytics report with summary metrics and actionable insights.
  • All processing happens locally on your machine.
  • Modern UI: Dark/Light mode support with a responsive layout.

🚀 Installation

Prerequisites

  • Python 3.11 or higher.
  • An Apple Health export file (export.zip).

Setup

Clone the repository

git clone https://github.com/NicolasReyrolle/tracktales.git
cd tracktales

Create a virtual environment

# Windows
python -m venv .venv
.\.venv\Scripts\Activate.ps1

# Linux/macOS
python3 -m venv .venv
source .venv/bin/activate

Install the dependencies

pip install -r requirements.txt

🖥️ Usage

Start the application using the following command:

python -m nicegui src.tracktales
  1. Open your browser to http://localhost:8080.
  2. Click Browse to select your Apple Health export.zip.
  3. Click Load to parse the data.
  4. View the statistics in the Overview tab.
  5. Explore your data in the Activities tab (pie/rose charts grouped by activity type), Trends tab (period-based charts, seasonal patterns, training load, and recovery recommendations), Health Data tab (workout heat map plus line charts for resting heart rate, body mass, VO2 max, CP, and W'), and Running tab (distance/elevation pace analysis with best segments).
  6. In the Activities table, click the Details action to open the workout modal (Overview, Activity, Route map, Charts, Intervals, and Comparisons).
  7. Use the Activity filter in the left drawer to focus on specific workout types.
  8. Use the Date range picker to analyze specific time periods.
  9. Use the Aggregate by selector in the left drawer to change the aggregation period.
  10. Use the Preferences menu (tune icon in the header) to switch language (EN/FR) or unit system (Metric/Imperial).
  11. When using the packaged Windows executable, use Preferences → Quit TrackTales to stop the app gracefully before closing the browser window/tab.
  12. Export your data using the Export data menu to download CSV, JSON, or a Markdown analytics report. The selected activity, date range, and unit system are applied to the report.

Tip: You can set a permanent storage secret for sessions by using an environment variable: set STORAGE_SECRET=your_custom_secret (Windows)

📱 How to Get Your Export File

To analyze your data, you first need to export it from your iPhone:

  1. Open the Health app on your iPhone.
  2. Tap your Profile Picture or icon in the top-right corner.
  3. Scroll to the bottom and tap Export All Health Data.
  4. Tap Export to confirm. This process may take a few minutes depending on the amount of data.
  5. Once the export is ready, share the export.zip file to your computer (via AirDrop, iCloud Drive, OneDrive, GoogleDrive or any other mean).
  6. Use this file in the TrackTales app.

🛠️ Development & Testing

Maintainer and contributor documentation is centralized in MAINTAINERS.md.

For development setup, quality checks, release workflow, packaging validation, and architecture notes, use MAINTAINERS.md as the single source of truth.

🔒 Security

This application uses streaming XML parsing (iterparse) to remain memory-efficient even with large exports (GBs of data) and defusedxml.ElementTree to mitigate risks associated with untrusted XML data.

📄 License

This project is licensed under the GPL-3.0 License. See the LICENSE file for details.

Release files for tracktales 2026.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tracktales 2026.9.1
File Size Uploaded
tracktales-2026.9.1.tar.gz 150.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tracktales 2026.9.1
File Interpreter ABI Platform
tracktales-2026.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 304.9 kB

Release files / tracktales-2026.9.1.tar.gz

Download URL tracktales-2026.9.1.tar.gz
Size 150.5 kB
Tags Source
SHA-256 checksum
How to use checksums
76439d531c7d07c03cfd024cc2f82f13f695d78d4eeb7ef539d13854a30803e6
BLAKE2b-256 checksum
How to use checksums
465a8f1a9692f5a50cd180e1a06d94386cfcc67cc0d8913268f5fad711921a14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / tracktales-2026.9.1-py3-none-any.whl

Download URL tracktales-2026.9.1-py3-none-any.whl
Size 154.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c61b63087f0c3de5bd3b3c3464d8c825d201d8a10fd1c6243fca93a37b16e6dd
BLAKE2b-256 checksum
How to use checksums
88d687e382b979fc1a0cde4824a57808daf7254a52d85f1ed08105fc42848078
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2026.9.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page