athlytics
๐ An R package for advanced sports performance analysis and training load monitoring using Strava data.
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
โCITATION.cff file
-
โcodemeta.json file
Found codemeta.json file -
โ.zenodo.json file
Found .zenodo.json file -
โDOI references
Found 1 DOI reference(s) in README -
โAcademic publication links
Links to: biorxiv.org -
โAcademic email domains
-
โInstitutional organization owner
-
โJOSS paper metadata
-
โScientific vocabulary similarity
Low similarity (13.8%) to scientific vocabulary
Repository
๐ An R package for advanced sports performance analysis and training load monitoring using Strava data.
Basic Info
- Host: GitHub
- Owner: HzaCode
- License: mit
- Language: R
- Default Branch: main
- Homepage: https://hezhiang.com/Athlytics/
- Size: 6.49 MB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
# Athlytics
*An R Framework for Longitudinal Analysis of Exercise Physiology*
Athlytics is an R framework for the longitudinal analysis of exercise physiology using Strava data. It is designed to remove the primary bottleneck for sports scientists: the programmatic acquisition and consistent processing required to turn raw, high-frequency ecological data into quantitative insights.
โจ Core Features
| Feature | Description |
| ----------------------------- | ------------------------------------------------------------------------------------------------------- |
| ๐ Longitudinal Quantification | Automated calculation of configurable metrics (ACWR, EF). Enables longitudinal tracking of physiological adaptation. |
| ๐ High-Resolution Decoupling | Robust cardiovascular drift analysis from raw stream data. Methodologically superior to metrics from simple averages. |
| ๐งน Tidy & Modeling-Ready Outputs | Clean tibbles from every function. Eliminates data cleaning. Primed for ggplot2 visualization and statistical modeling. |
| ๐ Reproducible Data Acquisition | Programmatic Strava API workflow. Guarantees full methodological reproducibility and eliminates manual download errors. |
To see how these features come together in a full research case study, check out our Complete Analysis Example.
๐ Quick Start
1. Installation
```r
CRAN (stable)
install.packages("Athlytics")
GitHub (recommended for the latest features)
install.packages("remotes")
remotes::install_github("HzaCode/Athlytics") ```
2. Authentication with Strava (click to expand)
`athlytics` leverages the `rStrava` package for handling the OAuth 2.0 authentication process with the Strava API. This requires a one-time setup of a Strava API application to obtain a **Client ID** and **Client Secret**. **Steps** 1. **Create a Strava API Application:** Go to your Strava settings โ **My API Application** ([https://www.strava.com/settings/api](https://www.strava.com/settings/api)). Set the **Authorization Callback Domain** to `localhost`. 2. **Authenticate in R:** Use `rStrava::strava_oauth()` to generate the token. Using `cache = TRUE` is highly recommended for reproducible workflows. ```r library(athlytics) library(rStrava) # Recommended: keep secrets out of scripts # Sys.setenv(STRAVA_CLIENT_ID = "YOUR_CLIENT_ID") # Sys.setenv(STRAVA_CLIENT_SECRET = "YOUR_CLIENT_SECRET") stoken <- rStrava::strava_oauth( app_name = "MyResearchApp", app_client_id = Sys.getenv("STRAVA_CLIENT_ID"), app_secret = Sys.getenv("STRAVA_CLIENT_SECRET"), app_scope = "activity:read_all", cache = TRUE ) ```
๐ Compute โ Plot
Note on Workflow: Computation is decoupled from plotting. This design reduces API calls and accelerates analysis by allowing a single, computed data object to be used for multiple visualizations.
1) ACWR โ Load Ramp Monitoring
r
acwr_data <- calculate_acwr(stoken = stoken, load_metric = "duration_mins")
plot_acwr(acwr_df = acwr_data, highlight_zones = TRUE)
2) Exposure โ ATL vs. CTL
r
expo_data <- calculate_exposure(stoken = stoken, activity_type = "Ride", load_metric = "tss", user_ftp = 280)
plot_exposure(exposure_df = expo_data, risk_zones = TRUE)
3) Efficiency Factor โ Aerobic Adaptation
r
ef_data <- calculate_ef(stoken = stoken, activity_type = c("Run", "Ride"), ef_metric = "Pace_HR")
plot_ef(ef_df = ef_data, activity_type = c("Run", "Ride"), add_trend_line = TRUE)
4) Personal Bests โ Peak Performance
r
pbs_data <- calculate_pbs(stoken = stoken, activity_type = "Run", distance_meters = c(1000, 5000, 10000))
plot_pbs(pbs_df = pbs_data, activity_type = "Run", distance_meters = c(1000, 5000, 10000))
5) Aerobic Decoupling โ Cardiovascular Drift
r
decoupling_data <- calculate_decoupling(stoken = stoken, activity_type = "Run", max_activities = 20)
plot_decoupling(decoupling_df = decoupling_data, activity_type = "Run")
๐ค Contributing
Pull requests are welcome! Please see CONTRIBUTING.md for details and follow the code of conduct in CODE_OF_CONDUCT.md.
Owner
- Name: Ang
- Login: HzaCode
- Kind: user
- Repositories: 1
- Profile: https://github.com/HzaCode
GitHub Events
Total
- Watch event: 2
- Delete event: 2
- Push event: 140
- Pull request event: 7
- Create event: 9
Last Year
- Watch event: 2
- Delete event: 2
- Push event: 140
- Pull request event: 7
- Create event: 9
Issues and Pull Requests
Last synced: 10 months ago
Packages
- Total packages: 1
-
Total downloads:
- cran 524 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 1
- Total maintainers: 1
cran.r-project.org: Athlytics
Advanced Sports Performance Analysis for 'Strava' Data
- Homepage: https://hezhiang.com/Athlytics/
- Documentation: http://cran.r-project.org/web/packages/Athlytics/Athlytics.pdf
- License: MIT + file LICENSE
-
Latest release: 0.1.2
published about 1 year ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v4 composite
- actions/upload-artifact v4 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite