{
 "name": "tutorial-cs06-strap-recovery",
 "title": "Tutorial CS-6: From a chest-strap recording to a recovery number",
 "description": "Check a chest strap's beat intervals against its own ECG, clean two nights of sleep with a written artifact rule, compute a nightly RMSSD with an honest interval, and find out what two nights can and cannot say about a baseline band.",
 "homepage": "https://apopt.com/data/tutorials/cs06-strap-recovery/",
 "licenses": [
  {
   "name": "CC BY 4.0",
   "path": "https://creativecommons.org/licenses/by/4.0/"
  }
 ],
 "created": "2026-12-03",
 "keywords": [
  "tutorial",
  "case study",
  "heart",
  "HRV",
  "RMSSD",
  "sleep",
  "chest strap",
  "artifacts",
  "bootstrap",
  "baseline"
 ],
 "resources": [
  {
   "name": "clean-2026-06-26_beats.csv",
   "path": "clean/2026-06-26_beats.csv",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/clean/2026-06-26_beats.csv",
   "format": "csv",
   "mediatype": "text/csv",
   "bytes": 349332,
   "hash": "sha256:9c89bf0b4609b42a302704916a7f063b9597af7d024dad0d1c43c95092326c85",
   "description": "Cleaned copy written by the tutorial",
   "rows": 18027,
   "schema": {
    "fields": [
     {
      "name": "t_s",
      "type": "number",
      "unit": "s",
      "description": "time of the beat from the start of the recording"
     },
     {
      "name": "rr_ms",
      "type": "number",
      "unit": "ms",
      "description": "interval since the previous beat as timed by the strap"
     },
     {
      "name": "keep",
      "type": "string",
      "unit": null,
      "description": null
     }
    ],
    "missingValues": [
     ""
    ]
   }
  },
  {
   "name": "clean-2026-06-28_beats.csv",
   "path": "clean/2026-06-28_beats.csv",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/clean/2026-06-28_beats.csv",
   "format": "csv",
   "mediatype": "text/csv",
   "bytes": 330294,
   "hash": "sha256:c5be6b81b5830486c6e08f0386f4d3275df7558d72f6ce042bc5abb5bcb2623f",
   "description": "Cleaned copy written by the tutorial",
   "rows": 17082,
   "schema": {
    "fields": [
     {
      "name": "t_s",
      "type": "number",
      "unit": "s",
      "description": "time of the beat from the start of the recording"
     },
     {
      "name": "rr_ms",
      "type": "number",
      "unit": "ms",
      "description": "interval since the previous beat as timed by the strap"
     },
     {
      "name": "keep",
      "type": "string",
      "unit": null,
      "description": null
     }
    ],
    "missingValues": [
     ""
    ]
   }
  },
  {
   "name": "clean-change_log.csv",
   "path": "clean/change_log.csv",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/clean/change_log.csv",
   "format": "csv",
   "mediatype": "text/csv",
   "bytes": 217,
   "hash": "sha256:7938fe630d4e327f41beb3e27e4c87301257033c84459acb9b3ad9800fa7e287",
   "description": "Cleaned copy written by the tutorial",
   "rows": 6,
   "schema": {
    "fields": [
     {
      "name": "night",
      "type": "string",
      "unit": null,
      "description": null
     },
     {
      "name": "rule",
      "type": "string",
      "unit": null,
      "description": null
     },
     {
      "name": "count",
      "type": "number",
      "unit": null,
      "description": null
     }
    ],
    "missingValues": [
     ""
    ]
   }
  },
  {
   "name": "clean-nightly_rmssd.csv",
   "path": "clean/nightly_rmssd.csv",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/clean/nightly_rmssd.csv",
   "format": "csv",
   "mediatype": "text/csv",
   "bytes": 152,
   "hash": "sha256:b8c66568b5367a7104bd563224937d7d2d3b6d008e454775305954af4d9ffc04",
   "description": "Cleaned copy written by the tutorial",
   "rows": 2,
   "schema": {
    "fields": [
     {
      "name": "night",
      "type": "string",
      "unit": null,
      "description": null
     },
     {
      "name": "windows",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "rmssd_ms",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "ln_rmssd",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "ci_low_ms",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "ci_high_ms",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "lowest_5min_hr",
      "type": "number",
      "unit": null,
      "description": null
     }
    ],
    "missingValues": [
     ""
    ]
   }
  },
  {
   "name": "clean-windows.csv",
   "path": "clean/windows.csv",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/clean/windows.csv",
   "format": "csv",
   "mediatype": "text/csv",
   "bytes": 6590,
   "hash": "sha256:00cc4ccb73d40f356f1ee7db661768e530a59c87eec3376d2f3f8ac49d633a84",
   "description": "Cleaned copy written by the tutorial",
   "rows": 146,
   "schema": {
    "fields": [
     {
      "name": "night",
      "type": "string",
      "unit": null,
      "description": null
     },
     {
      "name": "start_h",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "beats_kept",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "kept_share",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "rmssd_ms",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "hr_bpm",
      "type": "number",
      "unit": "beats/min",
      "description": "the strap's displayed heart rate where it was written on a beat row"
     },
     {
      "name": "valid",
      "type": "string",
      "unit": null,
      "description": null
     }
    ],
    "missingValues": [
     ""
    ]
   }
  },
  {
   "name": "expected-printed-output.txt",
   "path": "expected/printed-output.txt",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/expected/printed-output.txt",
   "format": "text",
   "mediatype": "text/plain",
   "bytes": 1792,
   "hash": "sha256:3c222501329e67c2370d7a8c577a773cf5875de060a59644beffd327dcc770df",
   "description": "Everything the tutorial prints, cell by cell"
  },
  {
   "name": "raw-2026-06-26_2347_sleep_rr.csv",
   "path": "raw/2026-06-26_2347_sleep_rr.csv",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/raw/2026-06-26_2347_sleep_rr.csv",
   "format": "csv",
   "mediatype": "text/csv",
   "bytes": 311689,
   "hash": "sha256:e8eac3c2d220017402c41d94e764c3e27eb73caefadeddf3ca611acd73adb733",
   "description": "the strap's beat intervals for the night of 26 June 2026, one row per beat (t_s seconds from the start, rr_ms, hr_bpm where reported), 18,027 beats",
   "rows": 18027,
   "schema": {
    "fields": [
     {
      "name": "t_s",
      "type": "number",
      "unit": "s",
      "description": "time of the beat from the start of the recording"
     },
     {
      "name": "rr_ms",
      "type": "number",
      "unit": "ms",
      "description": "interval since the previous beat as timed by the strap"
     },
     {
      "name": "hr_bpm",
      "type": "number",
      "unit": "beats/min",
      "description": "the strap's displayed heart rate where it was written on a beat row"
     }
    ],
    "missingValues": [
     ""
    ]
   }
  },
  {
   "name": "raw-2026-06-28_2343_sleep_excerpt.csv",
   "path": "raw/2026-06-28_2343_sleep_excerpt.csv",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/raw/2026-06-28_2343_sleep_excerpt.csv",
   "format": "csv",
   "mediatype": "text/csv",
   "bytes": 691050,
   "hash": "sha256:8ee38e662fb50609091236529b38b420d4bd6c2f7e6674e70b183b1a19bb798e",
   "description": "three minutes of raw ECG from the middle of the second night, about 130 samples a second, in the strap's five-column format (time, ecg, hr, rr, marker)",
   "rows": 23433,
   "schema": {
    "fields": [
     {
      "name": "time",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "ecg",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "hr",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "rr",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "marker",
      "type": "string",
      "unit": null,
      "description": null
     }
    ],
    "missingValues": [
     ""
    ]
   }
  },
  {
   "name": "raw-2026-06-28_2343_sleep_rr.csv",
   "path": "raw/2026-06-28_2343_sleep_rr.csv",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/raw/2026-06-28_2343_sleep_rr.csv",
   "format": "csv",
   "mediatype": "text/csv",
   "bytes": 282723,
   "hash": "sha256:07aab87c0af6e05b0b1be412c32742f44c1da63aae59ac25752c10eec2bffae8",
   "description": "the same for the night of 28 June 2026, 17,082 beats",
   "rows": 17082,
   "schema": {
    "fields": [
     {
      "name": "t_s",
      "type": "number",
      "unit": "s",
      "description": "time of the beat from the start of the recording"
     },
     {
      "name": "rr_ms",
      "type": "number",
      "unit": "ms",
      "description": "interval since the previous beat as timed by the strap"
     },
     {
      "name": "hr_bpm",
      "type": "number",
      "unit": "beats/min",
      "description": "the strap's displayed heart rate where it was written on a beat row"
     }
    ],
    "missingValues": [
     ""
    ]
   }
  },
  {
   "name": "raw-hrv_nightly.csv",
   "path": "raw/hrv_nightly.csv",
   "url": "https://apopt.com/data/tutorials/cs06-strap-recovery/raw/hrv_nightly.csv",
   "format": "csv",
   "mediatype": "text/csv",
   "bytes": 202,
   "hash": "sha256:b5a7865ff5bb33b7abb00ceffbf09ec9e99f88a87de7a9f194f8c0dd007b29d2",
   "description": "the case file's own nightly summary (median five-minute RMSSD), made by its preparation script, not by the strap; used only for comparison in Step 5",
   "rows": 2,
   "schema": {
    "fields": [
     {
      "name": "night",
      "type": "string",
      "unit": null,
      "description": null
     },
     {
      "name": "session_id",
      "type": "string",
      "unit": null,
      "description": null
     },
     {
      "name": "hours",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "windows_5min",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "median_rmssd_ms",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "lowest_5min_hr_bpm",
      "type": "number",
      "unit": null,
      "description": null
     },
     {
      "name": "median_5min_hr_bpm",
      "type": "number",
      "unit": null,
      "description": null
     }
    ],
    "missingValues": [
     ""
    ]
   }
  }
 ],
 "sources": [
  {
   "title": "The instructor's own Polar H10 recordings (course case file athletes/jh/heart), published under his name"
  }
 ]
}
