MyNixOS website logo
Description

Access COROS Training Hub Fitness Data.

Provides a tidy interface to the 'COROS' Training Hub API (<https://coros.com/traininghub>), the web platform that accompanies 'COROS' GPS sports watches. Retrieves activities, daily wellness metrics (heart rate variability, resting heart rate, VO2 max and training load), workout programmes and training calendars. All results are returned as tibbles, ready for analysis with 'dplyr' and 'ggplot2'. Both the US and EU regional endpoints are supported.

rCoros

R-CMD-check Lifecycle:experimental

rCoros provides a tidy interface to the COROS Training Hub API. Authenticate once, then pull activities, daily wellness metrics, HRV, workout programmes, and training calendars — all as tibbles ready for dplyr and ggplot2.

Installation

Install the development version from GitHub:

# install.packages("pak")
pak::pak("mattyoreilly/rCoros")

Setup

Add your credentials to ~/.Renviron so they are never in your scripts. The easiest way to open that file is:

usethis::edit_r_environ()

Add these two lines, save, and restart R:

[email protected]
COROS_PASSWORD=secret

Usage

library(rCoros)
library(dplyr)
library(ggplot2)

# Authenticate (reads COROS_EMAIL / COROS_PASSWORD from env)
auth <- coros_login()

# Activities from the last 30 days — all pages fetched automatically
acts <- coros_activities(auth)

# Running and trail running only
runs <- acts |> filter(sport_type %in% c(100L, 102L))

# Lap splits and HR zones for the most recent run
detail <- coros_activity_detail(
  auth,
  activity_id = runs$activity_id[[1]],
  sport_type  = runs$sport_type[[1]]
)
detail$laps
detail$hr_zones

# 28-day wellness metrics: HRV, RHR, VO2max, training load
metrics <- coros_daily_metrics(auth)

# HRV vs. baseline
ggplot(metrics, aes(date)) +
  geom_ribbon(aes(ymin = hrv_baseline - 5, ymax = hrv_baseline + 5),
              fill = "steelblue", alpha = 0.2) +
  geom_line(aes(y = hrv_baseline), colour = "steelblue") +
  geom_point(aes(y = hrv)) +
  labs(x = NULL, y = "HRV (ms)")

# Upcoming training schedule
coros_schedule(auth)

Functions

FunctionDescription
coros_login()Authenticate; returns a reusable coros_auth object
coros_activities()List activities with auto-pagination
coros_activity_detail()Lap splits, HR zones, and full summary for one activity
coros_daily_metrics()Per-day HRV, RHR, VO2max, training load, stamina
coros_hrv()Recent overnight HRV readings (quick dashboard endpoint)
coros_workouts()Structured workout library
coros_schedule()Planned training calendar

API regions

COROS operates separate endpoints for US and EU accounts. If your account was created in Europe, pass region = "eu" to coros_login().

Learn more

See vignette("rCoros") for a full walkthrough including plots, training-load analysis, and joining activities to wellness data.

Metadata

Version

0.1.0

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows