Skip to content

Graduate analytics capstone · CIS 627 · Spring 2026

Coach AI

Athlete Performance Analytics & Decision-Support Dashboard

I tracked my own sprint times, lifts and daily recovery for 78 days, analysed the data in Python, and wrote Coach AI: a rule-based system that turns each morning's recovery numbers into a training call. This page shows the real data, the real rules, and what the evidence does and doesn't support.

  • 78days of recovery data
  • 199sprint reps planned
  • 498strength sets planned
  • 13data issues found and documented

Daily readiness call

Drag through the log to see what Coach AI recommended each day.

Feb 9, 2026 Phase A
Version 1 · that day only –

Version 2 · 3-day trend –

These are the outputs of the original capstone rules on the logged data. Rule-based guidance, not medical advice.

Project summary

Problem

Athletes collect training and recovery numbers but rarely turn them into day-to-day decisions.

What I built

A tracking system in Google Sheets, a Python analysis in Google Colab, and Coach AI: rules that turn each morning's recovery data into a training call.

Key results

  • In the first 39 days, lower HRV went with higher fatigue (r = -0.72).
  • Sprints and lifts improved: 10-yard average 1.85 → 1.69 s, trap bar deadlift 315 → 375 lb.
  • The trend-based version flagged only 2 of 28 high-stress days, so a same-day check is needed.

My role

Everything in the capstone: designed the sheets, logged the data, and wrote the analysis and Coach AI rules in Python. This page was built afterwards with AI assistance.

Step 1 of 7

The problem

Athletes log a lot of numbers and rarely turn them into decisions. Sprint times sit in one place, lifts in another, and how you slept or how sore you feel is mostly kept in your head.

As a professional football player I wanted to know whether my own recovery data could tell me when to push, when to hold steady and when to back off. Coach AI was my CIS 627 analytics capstone: collect three kinds of training data in one structured place, look for real patterns, and build a system that turns each day's inputs into a clear recommendation.

Why recovery data matters

Training only pays off if the body adapts. Sleep, heart-rate variability (HRV), resting heart rate, soreness and fatigue are common, cheap signals of how well someone is recovering. If they move together with performance, they can support better day-to-day training choices. If they don't, that's worth knowing too.

What I did

  • Designed three Google Sheets tables for strength, sprints and daily recovery, and logged my own training into them.
  • Exported the data to CSV and analysed it in Python in Google Colab: descriptive statistics, a correlation heatmap, scatter plots and a linear regression.
  • Wrote the Coach AI rules in Python, first using one day's numbers, then a second version using 3-day trends.
  • Summarised the results and reported progress and challenges in a series of short write-ups.

Step 2 of 7

The data

Three tables from one Google Sheet. Every figure on this page is calculated from them; nothing is simulated.

Recovery log

78 days

Feb 9, 2026 – Apr 28, 2026

One row per morning: sleep (hours), HRV (ms, as logged), resting heart rate (bpm), soreness and fatigue (1–5 self-ratings) and hydration (1–5 urine-colour scale).

Sprint log

199 reps

101 timed, 15 dated sessions

Acceleration starts over 10, 20 and 30 yards, 20-yard flying sprints, 40 and 60-yard max-velocity runs and 100/200-yard tempo runs, each with intensity and start type.

Strength log

498 sets

282 with a weight, 30 training days

Exercise, set, reps, weight (lb), a per-set effort rating and session focus across 21 exercises. Sets I couldn't do are marked "Injury" rather than given a made-up number.

Data quality audit

Preparing this page meant re-checking the source sheets line by line. These issues were found, documented and handled transparently. Corrected values keep the original next to them.

    Two phases of recovery data

    From Mar 21, 2026, the recovery numbers start repeating a near-identical 10-day cycle: for 28 consecutive days, every HRV value is within ±2 of the value ten days earlier. That's unusual, so I checked those dates against my device app: the HRV, resting heart rate and sleep values match what's in the sheet.

    Some of my self-ratings in this stretch also nearly repeat: fatigue for Mar 31–Apr 9 and Apr 10–19 matches on 9 of 10 days, and hydration on 8 of 10. Those can't be checked against a device. Because the relationships between measures differ between the two stretches, the dashboard shows each phase separately.

    HRV by day. The shaded area is phase B. The dashed line is the same series shifted forward 10 days; in phase B the two lines almost overlap.

    Step 3 of 7

    Interactive analytics dashboard

    Pick a period and every recovery figure and chart below recalculates from the daily data.

    Period

    Recovery over time

    Daily value with a 3-day average

      Sprint performance

      Every timed rep, per session. Lower is faster.

      Strength progression

      Heaviest logged set per session

      Weekly training load and logging

      Two separate measures, so two charts. Volume = weight × reps for logged barbell and dumbbell sets.

      Logged volume (lb)

      Planned sets with a weight logged (%)

      Volume falls across the five weeks, but so does the share of sets that were logged. The drop is at least partly missing data, not lighter training.

      Recovery relationships

      Choose two measures. The line is a least-squares fit for the selected period.

      Correlation matrix (Pearson r)

      Blue = move in opposite directions, red = move together. Faded numbers aren't statistically significant (p ≥ 0.05).

      Correlation is not causation. These are one person's numbers over a few weeks. A strong r says two measures moved together here; it doesn't prove one caused the other, and it may not hold for anyone else.

      Did recovery predict sprint days?

      Each dot is one sprint session: its average time compared with that drill's overall average, against that morning's recovery.

      Daily data

      The recovery log for the selected period, with both Coach AI calls. Select a column header to sort.

      Download CSV
      Recovery log with Coach AI recommendations

      Step 4 of 7

      Results and key findings

      What the data shows, how strong the evidence is, and what it means for training. Small sample, one athlete: read these as patterns, not proof.

      Original notebook charts

      Charts exactly as produced in the capstone Colab notebooks. The first three used the 32 days logged by Mar 13; the last uses all 78.

      Step 5 of 7

      The Coach AI decision engine

      Coach AI is rule-based: a short list of if-then checks written in Python. It isn't machine learning and it doesn't predict injuries. The rules below are copied from the capstone notebook, thresholds unchanged.

      Version 1: today's numbers

      Checks run in order; the first match wins.

      1. Recovery if fatigue ≥ 4 or soreness ≥ 4
      2. Push if HRV ≥ 60 and resting HR ≤ 45 and fatigue ≤ 2
      3. Light if sleep < 6 hours
      4. Maintain otherwise
      Show the original Python
      def coach_ai(row):
          sleep = row['sleep_hours']
          hrv = row['hrv']
          resting_hr = row['resting_hr']
          soreness = row['sorness']
          fatigue = row['fatigue']
      
          if fatigue >= 4 or soreness >= 4:
              return "Recovery"
          elif hrv >= 60 and resting_hr <= 45 and fatigue <= 2:
              return "Push"
          elif sleep < 6:
              return "Light"
          else:
              return "Maintain"
      
      df['recommendation'] = df.apply(coach_ai, axis=1)

      Version 2: 3-day trends

      Uses rolling 3-day averages of fatigue and HRV so one bad night doesn't swing the call.

      1. Recovery (Trend) if 3-day average fatigue ≥ 4
      2. Push (Recovered) if 3-day average HRV ≥ 60 and fatigue ≤ 2
      3. Light (Low Sleep) if sleep < 6 hours
      4. Maintain otherwise
      Show the original Python
      df['fatigue_avg_3'] = df['fatigue'].rolling(3).mean()
      df['hrv_avg_3'] = df['hrv'].rolling(3).mean()
      
      def coach_ai_v2(row):
          sleep = row['sleep_hours']
          fatigue = row['fatigue']
          fatigue_avg = row['fatigue_avg_3']
          hrv_avg = row['hrv_avg_3']
      
          if fatigue_avg >= 4:
              return "Recovery (Trend)"
          elif hrv_avg >= 60 and fatigue <= 2:
              return "Push (Recovered)"
          elif sleep < 6:
              return "Light (Low Sleep)"
          else:
              return "Maintain"

      Historical calls, all 78 days

      How often each version made each call.

      Version 1

      Version 2

      Version 2's counts (53 Maintain, 22 Light, 3 Recovery) match the notebook's output exactly. Overall status from the notebook's summary rule: Balanced Training.

      What smoothing changed

      There were 28 high-stress days (fatigue or soreness 4+). Version 1 called all of them Recovery. Version 2 called 2 of them Recovery, 12 Light and 14 Maintain.

      Trend-based rules do stop the system overreacting to a single bad morning, which was the goal. But on this data they also hid most single-day warning signs, and version 2 never checks soreness at all. A better design would keep a same-day safety check alongside the trend.

      Version 2 also never produced a Push call. Its push rule needs a 3-day HRV average of 60 or more, and the highest 3-day average in the log was 59.67. Version 1 made 10 Push calls from single high-HRV days.

      Day-by-day calls

        Try the rules

        Enter sample numbers and both versions run the original logic instantly. For illustration only: Coach AI doesn't diagnose injuries, guarantee readiness or predict injury risk.

        Today
        Previous two days (for version 2)
        Load a real day:
        Version 1–

        Version 2–

        Step 6 of 7

        Methodology and technical implementation

        How raw entries became a recommendation. Steps 1 to 8 are the original capstone. The dashed panel below was added afterwards, with AI assistance, to publish it here.

        1. Collect

          Logged sprints, sets and morning recovery into three Google Sheets tabs with fixed columns.

        2. Clean

          Exported to CSV; in pandas, lower-cased and renamed columns and handled the misspelt "sorness" column.

        3. Explore

          head() and describe() on each table to check counts, ranges and gaps.

        4. Test relationships

          Correlation matrix, then a linear regression of fatigue on sleep, HRV and resting HR (scikit-learn).

        5. Visualise

          Seaborn heatmap and scatter plots; a Matplotlib line chart of HRV and fatigue over time.

        6. Decide

          Rule-based coach_ai() and coach_ai_v2() functions applied to every day with df.apply.

        7. Summarise

          Averages, recommendation counts, high-stress days and an overall training status.

        8. Communicate

          Exported coach_ai_results.csv and wrote the findings up in progress reports.

        Added afterwards, with AI assistance

        To publish the project, a reproducible Python pipeline (standard library only) reads the workbook export, validates the schema, normalises labels, flags and corrects issues without deleting anything, detects the repeating-pattern phase, re-runs the original analysis and rules, and writes the sanitized files this page uses. Automated tests check that the browser code gives exactly the same correlations, p-values and Coach AI calls as the pipeline, and that the notebook's published numbers are reproduced.

        Data Analytics & Insights

        The same path an analyst takes with business data: raw records, structured tables, measurable indicators, charts, then a decision.

        1. Raw recordMorning check-in: a short night, very tired, legs feel fine
        2. Structured row2026-02-09, sleep 4.42, HRV 36, RHR 49, soreness 1, fatigue 4
        3. Indicator3-day average fatigue, high-stress flag, phase label
        4. ChartTrend line, correlation matrix, scatter with fit
        5. DecisionVersion 1: Recovery. Version 2: Light (Low Sleep)

        Data cleaning and preparation

        Standardised 28 exercise spellings into 21 names, kept "Injury" as a status instead of a zero, fixed day/month-swapped dates with the original preserved.

        Exploratory analysis

        Descriptive statistics for every table; found that a date display format silently drops the day from 12 dates in CSV exports.

        Statistical reasoning

        Pearson correlations with p-values; regression R² in-sample and leave-one-out, so the model isn't graded on data it was fitted to.

        Trend identification

        Session-by-session sprint times and top-set progressions; rolling averages for the trend rules.

        Anomaly detection

        A lag-10 comparison exposed a repeating pattern that ordinary summary statistics hid.

        KPI design

        Average sleep, HRV, resting HR, fatigue and soreness per period; share of planned sets actually logged as a data-completeness KPI.

        Visualisation

        Chart type chosen by the question: lines for change over time, scatter for relationships, a diverging heatmap for correlations, bars for counts.

        Communicating for decisions

        Each finding pairs a number with its sample size, its confidence and what it means for training.

        Where these skills apply

        • Data Analyst — cleaning messy spreadsheets, descriptive statistics, honest reporting of limits.
        • Business Intelligence Analyst — KPI definitions, filterable dashboards, data-quality checks before reporting.
        • Sports Analytics Analyst — athlete monitoring metrics, load and readiness tracking, coach-facing recommendations.
        • Junior Python Developer — pandas transformations, rule logic as functions, reproducible scripts and tests.
        • Data-focused technical roles — turning a vague question into tables, checks and a repeatable pipeline.

        Python & Software Development

        What the original code actually does, verified from the notebooks.

        In the original capstone

        • pandas data processing — read_csv, column clean-up with .str.lower().str.strip(), rename, column selection, value_counts.
        • Conditional logic — two decision functions with ordered if / elif / else rules.
        • Data transformations — df.apply(..., axis=1) to score every row; .rolling(3).mean() for trend features.
        • Metric calculations — averages, filtered high-stress days, an overall-status rule.
        • Statistics and modelling — .corr(), SciPy imported, scikit-learn LinearRegression and r2_score, with dropna before fitting.
        • Chart generation — Seaborn heatmap and scatter plots, Matplotlib line chart.
        • CSV in and out — Colab file upload and to_csv("coach_ai_results.csv").
        • Debugging — the notebook keeps the first draft of coach_ai() next to a corrected version, with comments noting the column-name fixes.

        Not in the original: error handling, automated tests or a multi-file program. The notebooks are single-file analysis scripts. The pipeline, tests and dashboard code were added afterwards with AI assistance (Claude).

        Coach AI notebook code (.py) · Analysis notebook code (.py)

        Added afterwards, with AI assistance

        • Reusable functions — the rules, statistics and validator live in one dependency-free module shared by the browser and the tests.
        • Input validation and error handling — the pipeline stops with a clear message if a sheet or column changes; the browser validator reports every bad cell.
        • Testing — Node tests compare browser results with the Python pipeline for every day and every correlation.
        • Dashboard components — responsive SVG charts written from scratch to fit the site's strict content-security policy (no external scripts).

        Cybersecurity Applications & Data Integrity

        Coach AI is an athlete-analytics project, not a security system. But the habits it needs — trustworthy data, careful handling, checking inputs, spotting patterns that don't belong — are the same ones security work depends on. Each concept is marked by where it stands.

        Data integrity

        Original Missed sets are recorded as "Injury" or "N/A" rather than invented numbers.

        AI-assisted The pipeline audits every table, corrects nothing silently and keeps original values beside fixes. Analysis is split by data-quality phase.

        Data privacy

        AI-assisted Only training and recovery metrics are published. The source workbook stays out of the website repository (git-ignored), and no Google Drive, Docs or Colab links appear on the page, so nothing depends on my Google account.

        Extension Publishing weekly aggregates instead of daily physiological values would expose even less.

        Input validation

        AI-assisted Schema, type, range, duplicate, ordering and formula-injection checks, in the pipeline and in the browser demo below.

        Access control

        Already on the site This page is read-only static files: there is no login and no way to edit data from the browser. My separate private dashboard on this site sits behind Cloudflare Access with a second token check in its own server code.

        Extension An admin upload route for new Coach AI data would belong behind that same Access policy.

        Audit logging

        AI-assisted Every change to the published data goes through a Git commit, which records who changed what and when.

        Extension No application-level audit log exists, because there is no admin editing yet. If uploads were added, each one should be logged with a timestamp, user and file hash.

        Security analytics

        Transferable The same methods apply to security data: rolling baselines for login counts per account, flagging values far from an account's normal range, and the lag comparison that found the repeating pattern here can flag replayed or duplicated log entries. Nothing on this page analyses real security data.

        Security & Data Integrity Demonstration

        An extra portfolio feature, built afterwards with AI assistance: check a recovery CSV against the Coach AI schema before trusting it. The file is read in your browser and never uploaded anywhere. This checks data quality; it doesn't detect attacks.

        or paste below
        Expected columns and rules

          Also checked: real calendar dates, no duplicate dates, dates in order (with a day/month swap hint), matching field counts, cells that start with = + - @ (spreadsheet formula injection), file size up to 1 MB and up to 5,000 rows.

          Results appear here.

          Why this matters for both fields. A dashboard built on bad rows gives confident wrong answers, like a recommendation from a mistyped date. In security, the same checks stop malformed or malicious input before it reaches a spreadsheet, a database or an analyst.

          Skills Demonstrated

          Skills shown by my original capstone work. Academic and personal project work, not professional experience.

          Data Analytics

          • Designing a structured dataset from scratch
          • Data preparation and cleaning in pandas
          • Exploratory analysis and descriptive statistics
          • Correlation analysis and linear regression
          • Visualisation with Seaborn and Matplotlib
          • Reporting progress and findings in writing

          Coding

          • Python programming in Google Colab
          • pandas transformations: apply, rolling, filtering
          • Conditional decision logic as functions
          • Iterating on a design: version 1 to version 2
          • CSV import and export

          Cybersecurity relevance

          • Data integrity: recording missed sets as "Injury" instead of inventing values
          • Choosing what's safe to publish from personal data
          • Access-control and security-analytics concepts Concept

          Not listed as my skills: the data pipeline, automated tests, browser charts and CSV checker on this page, which were built afterwards with AI assistance (Claude). The original capstone code is linked below.

          Step 7 of 7

          Challenges, limitations and what's next

          Challenges I reported during the capstone

          • Staying consistent with daily recovery entries.
          • Keeping subjective 1–5 ratings standardised from day to day.
          • Turning the coaching logic into a working system: combining several variables into one clear recommendation was harder than planned.
          • Isolating cause and effect: I noted that comparing with another athlete on the same program, without supplements like creatine, would make results more reliable.

          Limitations

          • One athlete, a few weeks. Nothing here generalises to other people.
          • Manual entry and missing observations: 196 planned sets and 98 sprint reps have no value, and the last week of each training log has no dates.
          • From Mar 21 the recovery data follows a 10-day repeating pattern. Device readings were checked and match, but some self-ratings nearly repeat and can't be verified.
          • Self-rated soreness, fatigue and hydration are subjective; the effort column runs opposite to the usual RPE scale.
          • Correlation, not causation, and no control for creatine or schedule changes.
          • The rules are hand-set thresholds, not a validated predictive model, and version 2 misses most single-day warning signs.

          Future work Not built yet

          • Automated ingestion from a wearable export or the Google Sheets API, validated on arrival with the same schema checks.
          • Longer, cleaner data: a full season with device-recorded HRV and sleep, and a fixed time of measurement.
          • Better rules: keep a same-day safety check alongside the trend, use soreness in version 2, and set thresholds from my own baseline instead of fixed numbers.
          • Test the rules properly: compare calls against next-day performance before trusting them.
          • Personalised baselines per athlete once there's more than one.
          • Stronger privacy and access control: aggregate-only public views and an authenticated admin upload route with an audit log.
          • Security datasets: apply the same baseline-and-anomaly methods to authentication or event logs.

          Reports, code and data

          Sanitized, public copies. The original Google Drive files stay private.

          How this page was made. The data, analysis notebooks and Coach AI rules are my original capstone work. The page, its charts, the data pipeline, the tests and the CSV checker were built afterwards with AI assistance (Claude), working from those original files.

          The capstone was documented in a proposal and several short progress write-ups rather than one final paper. They aren't published here because they're working drafts; their substance is summarised on this page and they're available on request.