What gets analyzed¶
Every time PeakLine ingests one of your activities, it runs the same analysis pipeline. This page is the map of that pipeline — what's calculated, what's needed, and where to read more.
The pipeline at a glance¶
Strava webhook / manual refresh
│
▼
1. Ownership and access check
2. Fetch streams (lat/lng, time, heartrate, watts, cadence, altitude, velocity, temp)
3. Fetch laps, zones, kudos, photos
4. Fetch historical weather (Open-Meteo)
5. Fetch air quality (OpenWeather)
6. Compute metrics
│
├── Power: NP, IF, TSS, zone time
├── HR: avg/max, zone time, TRIMP
├── Pace: GAP (grade-adjusted)
├── Climbs: auto-detect, gradient, VAM per climb
├── Terrain: flat | rolling | hilly | mountain | highmountain
├── PeakLine Score (0–1000) with tier
├── Stress Points (TSS-like)
├── Wind impact (% loss estimate)
├── Sun time (minutes in daylight)
└── Comparison vs. previous 10 same-type activities
│
▼
7. Cache result (cached_analysis table)
8. Optionally generate AI Coach summary (Gemini)
9. Optionally update Strava description (if auto-report enabled)
The whole thing runs in roughly 2–8 seconds for a typical 1–3 hour activity, then sits cached so repeat visits to the activity page are instant.
What you need for each metric¶
Some metrics need specific sensors. Here's what's required and what gracefully falls back.
| Metric | Requires | Falls back to |
|---|---|---|
| PeakLine Score | distance + time + elevation | — (always computed, rejects activities below thresholds) |
| Stress Points | NP (best), or HR, or pace, or speed | always computed at lower fidelity |
| NP, IF, TSS | power meter (watts stream, ≥30 points) |
HR-based IF estimate |
| Power zones (Z1–Z7) | power + FTP set in settings | none — zones hidden if no power |
| HR zones (Z1–Z5) | HR strap + max_hr in settings | uses default max_hr=190 if unset |
| TRIMP | HR + resting/max HR | duration-only estimate |
| GAP | pace + altitude streams | raw pace |
| Climb detection | altitude stream | not computed for indoor activities |
| VAM per climb | altitude + time | not computed for indoor activities |
| Weather | start lat/lng + start time | nothing if missing coords |
| AQI | start lat/lng + recent date | nothing if missing coords or too old |
| Wind impact | weather + speed | nothing |
| Sun time | start lat/lng + duration | nothing |
Want everything?
The most data-rich analysis comes from a road ride with a power meter and HR strap. Indoor activities, manual entries, and activities with no GPS get a reduced set of metrics — never an error.
Activity types we support¶
The Strava activity type drives several behaviors (which speed reference to use, which zone model, whether climbs make sense). PeakLine recognizes:
Cycling family: Ride, VirtualRide, MountainBikeRide, GravelRide, Velomobile, Handcycle. EBikeRide is recognized but excluded from PeakLine Score.
Running family: Run, TrailRun, VirtualRun.
Other: Hike, Walk, Swim, Workout, AlpineSki, Snowboard, BackcountrySki, Yoga, WeightTraining, RockClimbing, and ~30 more. These get basic analysis (distance, time, HR if recorded) but no PeakLine Score.
How caching works¶
The analysis result is keyed by (activity_id, settings_hash). If you change your FTP, all old analyses get re-run on next view. That avoids stale zone counts when you re-test.
Forcing a refresh: open any activity page and click the small ↻ button at the top right. It bypasses the cache and re-fetches everything from Strava.
Read more¶
- PeakLine Score — the headline number explained in detail
- Stress Points — training load that works without a power meter
- Power and HR zones — Coggan model, custom zones, time-in-zone
- Climbs, terrain, VAM — automatic climb detection and difficulty
- Weather and air quality — historical conditions, wind impact, sunrise/sunset
- AI Coach — Gemini-powered narrative summaries