
An all-in-one, offline R toolkit for endurance analytics — from FIT/TCX/GPX & Strava exports to core models (ACWR, EF, Pa:Hr decoupling, PB, Exposure) with built-in QC & uncertainty.
🚀 Quick Start • 📊 Core Analyses • 📝 Citation
🎯 Overview
Athlytics is a powerful R package for analyzing your endurance training data from local Strava exports. It provides a complete, offline toolkit to transform your raw data into meaningful insights about fitness, fatigue, and performance.
Designed for athletes, coaches, and sports scientists, Athlytics standardizes the entire analysis process—from loading your data to generating publication-quality plots. Because it works offline without needing API keys, your data remains completely private and your workflows are stable and reproducible forever.

✨ Key Features
✅ 100% Local and Private: Works directly with your Strava ZIP export. No data is ever uploaded, and no internet connection or API keys are needed. You have full control over your information.
✅ All-in-One Analysis Pipeline: Handles everything from loading and cleaning raw data to calculating advanced metrics and creating visualizations. No more patching together different tools.
✅ Robust Scientific Metrics: Implements widely used metrics for performance analysis, including Acute-to-Chronic Workload Ratio (ACWR), Aerobic Efficiency (EF), and Cardiovascular Decoupling, with built-in quality checks.
✅ Powerful Cohort Analysis: Purpose-built for comparing multiple athletes. Easily load data for a team or group and benchmark an individual’s progress against the cohort.
✅ Reproducible and Shareable: Because the workflow is self-contained, your analysis scripts are easy to share and will produce the same results every time, making it ideal for reliable, long-term tracking.
📦 Installation
1. Stable Release (CRAN)
install.packages("Athlytics")Note: The CRAN version may not include the latest features like direct ZIP file support.
2. Development Version (GitHub - Recommended)
# First, install remotes if you don't have it
# install.packages("remotes")
# Install the latest development version from GitHub
remotes::install_github("HzaCode/Athlytics")📥 Step 1: Export Your Strava Data
- Navigate to Strava Settings → My Account.
- Under “Download or Delete Your Account,” click “Get Started” and then “Request Your Archive”.
- You will receive an email with a download link (it may take a little while).
- Download the ZIP file (e.g.,
export_12345678.zip). There is no need to unzip it.
💻 Step 2: Load and Analyze (Cohort Example)
This example shows a common workflow: loading data for several athletes, calculating their training load, and comparing one athlete to the group average.
library(Athlytics)
library(dplyr)
# 1. Load data for a cohort of athletes, adding unique IDs
athlete1 <- load_local_activities("path/to/athlete1_export.zip") %>% mutate(athlete_id = "A1")
athlete2 <- load_local_activities("path/to/athlete2_export.zip") %>% mutate(athlete_id = "A2")
cohort_data <- bind_rows(athlete1, athlete2)
# 2. Calculate ACWR for each athlete in the cohort
cohort_acwr <- cohort_data %>%
group_by(athlete_id) %>%
group_modify(~ calculate_acwr(.x, load_metric = "duration_mins")) %>%
ungroup()
# 3. Generate percentile bands to serve as a reference for the cohort
reference_bands <- cohort_reference(cohort_acwr, metric = "acwr_smooth")
# 4. Plot an individual's data against the cohort reference bands
individual_acwr <- cohort_acwr %>% filter(athlete_id == "A1")
plot_with_reference(individual = individual_acwr, reference = reference_bands)📊 Core Analyses
All functions return clean, tidy tibble data frames, making it easy to perform your own custom analysis or visualizations.
1️⃣ Training Load Monitoring (ACWR)
Track how your training load is progressing to avoid ramping up too quickly, which can help in managing injury risk.
2️⃣ Aerobic Efficiency (EF)
See how your aerobic fitness is changing over time by comparing your output (pace or power) to your effort (heart rate). A rising trend is a great sign of improving fitness.
📝 Citation
If you use Athlytics in your research, please cite the software. We also recommend citing the original methodological papers for any metrics used (see documentation for references).
@software{athlytics2025,
title = {Athlytics: A Computational Framework for Longitudinal Analysis of Exercise Physiology},
author = {Zhiang He},
year = {2025},
version = {1.0.0},
url = {https://github.com/HzaCode/Athlytics}
}🤝 Contributing
Contributions are welcome! Please read our CONTRIBUTING.md guide and follow our Code of Conduct.
- 🐛 Report an Issue: Open an Issue
- 💡 Suggest a Feature: Start a Discussion
- 🔧 Submit a Pull Request: We appreciate your help in improving Athlytics.


