Datasets:
subject stringclasses 31
values | epoch int32 -17,780 8.27k | start_s float64 -533,400 248k | in_psg bool 2
classes | stage int8 -1 5 ⌀ | stage_name stringclasses 7
values | n_acc int32 0 5.11k | acc_t listlengths 0 5.11k | acc_x listlengths 0 5.11k | acc_y listlengths 0 5.11k | acc_z listlengths 0 5.11k | acc_line listlengths 0 5.11k | n_hr int32 0 7 | hr_t listlengths 0 7 | hr_bpm listlengths 0 7 | hr_line listlengths 0 7 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
46343 | -4,150 | -124,500 | false | null | null | 1,099 | [
-124489.16105,
-124489.116395,
-124489.115548,
-124489.114691,
-124489.0977,
-124489.078316,
-124489.067722,
-124489.047886,
-124489.028169,
-124489.008432,
-124488.997683,
-124488.977951,
-124488.958508,
-124488.938678,
-124488.927987,
-124488.908233,
-124488.888842,
-124488.86880... | [
0.0174866,
0.0189819,
0.0209656,
0.0194855,
0.0169983,
0.0199585,
0.0243988,
0.0179291,
0.0189667,
0.0332489,
0.0302582,
0.027771,
0.0253296,
0.0194244,
0.0164337,
0.0209045,
0.0144958,
0.0095673,
0.006134,
0.0056458,
-0.0052185,
-0.0131226,
-0.0170441,
-0.0150452,
-0... | [
-0.5867004,
-0.5896759,
-0.5808868,
-0.5808716,
-0.587204,
-0.5930939,
-0.5862579,
-0.565567,
-0.5793762,
-0.5921173,
-0.5945282,
-0.5935059,
-0.5920563,
-0.5851898,
-0.5792694,
-0.5871582,
-0.5871277,
-0.5890808,
-0.5930176,
-0.5876465,
-0.5743256,
-0.5747833,
-0.5806732... | [
-0.8057709,
-0.8091583,
-0.8150482,
-0.8135834,
-0.8062592,
-0.8061981,
-0.8115845,
-0.8039551,
-0.8106842,
-0.8071136,
-0.800293,
-0.7949524,
-0.7988739,
-0.800415,
-0.7960815,
-0.8013611,
-0.7965393,
-0.7950897,
-0.7950897,
-0.7990112,
-0.7918549,
-0.7865448,
-0.7850647... | [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44,
45,
46,
47,
48,
49,
50,
51,
52,
53,
54... | 5 | [
-124489.87945,
-124483.59392,
-124479.59392,
-124474.59392,
-124472.59392
] | [
86,
77,
77,
77,
77
] | [
1090,
1091,
1092,
1093,
1094
] |
46343 | -4,149 | -124,470 | false | null | null | 1,718 | [
-124469.984943,
-124469.965717,
-124469.945534,
-124469.934788,
-124469.915066,
-124469.89597,
-124469.87607,
-124469.865332,
-124469.845077,
-124469.825989,
-124469.805788,
-124469.79537,
-124469.775069,
-124469.75548,
-124469.735928,
-124469.725121,
-124469.7056,
-124469.686337,
... | [
-0.1085358,
-0.1031036,
-0.0898438,
-0.0794983,
-0.0794983,
-0.0735931,
-0.07901,
-0.0883484,
-0.098175,
-0.1021423,
-0.1026459,
-0.1031036,
-0.1026459,
-0.1051178,
-0.1065521,
-0.1031036,
-0.0996704,
-0.0977173,
-0.0912933,
-0.0873413,
-0.0868378,
-0.0853882,
-0.0873413,... | [
0.151535,
0.1436615,
0.1471252,
0.1397705,
0.139267,
0.1343689,
0.1309509,
0.1279907,
0.1274872,
0.1329346,
0.1339264,
0.1265259,
0.1260834,
0.1285553,
0.1255646,
0.1304321,
0.1319275,
0.1265717,
0.1279907,
0.1377716,
0.1485291,
0.13974,
0.1284637,
0.120163,
0.1206055... | [
-0.9931946,
-0.9950562,
-0.9930573,
-0.9919739,
-0.9934387,
-0.9924011,
-0.9894867,
-0.9895172,
-0.9905548,
-0.985733,
-0.9842834,
-0.9881439,
-0.981308,
-0.9798737,
-0.9862061,
-0.9906006,
-0.9891205,
-0.9827423,
-0.9900208,
-0.9959106,
-1.0032806,
-0.9963989,
-0.9934082... | [
1099,
1100,
1101,
1102,
1103,
1104,
1105,
1106,
1107,
1108,
1109,
1110,
1111,
1112,
1113,
1114,
1115,
1116,
1117,
1118,
1119,
1120,
1121,
1122,
1123,
1124,
1125,
1126,
1127,
1128,
1129,
1130,
1131,
1132,
1133,
1134,
1135,
1136,
1137,
1138... | 6 | [
-124465.59395,
-124461.59392,
-124456.59392,
-124451.59395,
-124446.59395,
-124441.59395
] | [
77,
78,
78,
78,
79,
78
] | [
1095,
1096,
1097,
1098,
1099,
1100
] |
46343 | -4,148 | -124,440 | false | null | null | 1,719 | [-124439.991304,-124439.981006,-124439.960982,-124439.941616,-124439.921095,-124439.911122,-124439.8(...TRUNCATED) | [-0.973587,-0.9755554,-0.9799194,-0.969574,-0.9681549,-0.9795532,-0.9846191,-0.9857178,-0.9823303,-0(...TRUNCATED) | [-0.1692047,-0.1843719,-0.2025909,-0.204071,-0.196167,-0.1901703,-0.1811371,-0.1682587,-0.1485901,-0(...TRUNCATED) | [-0.0552521,-0.0468903,-0.0526581,-0.0535583,-0.0467834,-0.0332489,-0.0089722,0.0050507,0.0083466,-0(...TRUNCATED) | [2817,2818,2819,2820,2821,2822,2823,2824,2825,2826,2827,2828,2829,2830,2831,2832,2833,2834,2835,2836(...TRUNCATED) | 5 | [
-124436.59392,
-124430.59395,
-124418.72286,
-124413.72283,
-124410.72283
] | [
78,
78,
79,
79,
79
] | [
1101,
1102,
1103,
1104,
1105
] |
46343 | -4,147 | -124,410 | false | null | null | 464 | [-124409.991713,-124409.971902,-124409.961232,-124409.940094,-124409.922013,-124409.902081,-124409.8(...TRUNCATED) | [-0.1676788,-0.1940155,-0.2087097,-0.1500549,-0.0288086,-0.0128937,-0.0815582,-0.1305389,-0.1270599,(...TRUNCATED) | [-0.7961578,-0.7789459,-0.9100647,-1.2249756,-1.2703552,-1.1915588,-1.1030121,-1.0012817,-0.9455109,(...TRUNCATED) | [-0.307785,-0.1750793,-0.0423737,-0.1165619,-0.146759,-0.1213379,-0.1008453,-0.0910339,-0.1201019,-0(...TRUNCATED) | [4536,4537,4538,4539,4540,4541,4542,4543,4544,4545,4546,4547,4548,4549,4550,4551,4552,4553,4554,4555(...TRUNCATED) | 5 | [
-124401.72286,
-124398.72286,
-124391.72283,
-124386.72283,
-124383.72283
] | [
80,
80,
79,
68,
68
] | [
1106,
1107,
1108,
1109,
1110
] |
46343 | -4,142 | -124,260 | false | null | null | 1,591 | [-124257.755332,-124257.735982,-124257.724267,-124257.705502,-124257.686195,-124257.666187,-124257.6(...TRUNCATED) | [-0.0296326,-0.016922,-0.0105896,0.0015564,0.0290222,0.0525513,0.0549622,0.0436249,0.0519714,0.06565(...TRUNCATED) | [-0.3899841,-0.4099579,-0.4078979,-0.3802948,-0.3547211,-0.3521576,-0.3530579,-0.3256226,-0.2722168,(...TRUNCATED) | [-0.9007721,-0.8791351,-0.8669434,-0.8553467,-0.851944,-0.8391571,-0.8284149,-0.8369293,-0.8547516,-(...TRUNCATED) | [5000,5001,5002,5003,5004,5005,5006,5007,5008,5009,5010,5011,5012,5013,5014,5015,5016,5017,5018,5019(...TRUNCATED) | 4 | [
-124250.28189,
-124247.28189,
-124243.28189,
-124237.28189
] | [
55,
55,
54,
54
] | [
1114,
1115,
1116,
1117
] |
46343 | -4,141 | -124,230 | false | null | null | 1,718 | [-124229.982565,-124229.963065,-124229.943304,-124229.932705,-124229.912725,-124229.893378,-124229.8(...TRUNCATED) | [-0.4134827,-0.4026794,-0.404129,-0.4076233,-0.4037018,-0.4179535,-0.4277344,-0.4311829,-0.4209747,-(...TRUNCATED) | [0.802536,0.7575073,0.730545,0.7404175,0.7482758,0.7389374,0.7231903,0.7085114,0.6964264,0.6759338,0(...TRUNCATED) | [0.4607239,0.4824982,0.4884949,0.4957275,0.495697,0.4961548,0.491806,0.4991913,0.5256195,0.5428009,0(...TRUNCATED) | [6591,6592,6593,6594,6595,6596,6597,6598,6599,6600,6601,6602,6603,6604,6605,6606,6607,6608,6609,6610(...TRUNCATED) | 4 | [
-124218.28189,
-124213.28189,
-124212.28189,
-124203.28189
] | [
77,
76,
76,
86
] | [
1118,
1119,
1120,
1121
] |
46343 | -4,140 | -124,200 | false | null | null | 1,691 | [-124199.984371,-124199.973979,-124199.954065,-124199.934544,-124199.914833,-124199.904181,-124199.8(...TRUNCATED) | [-0.965332,-0.9657898,-0.964325,-0.9643402,-0.9658051,-0.964325,-0.9663086,-0.965332,-0.9638824,-0.9(...TRUNCATED) | [0.1901398,0.1856995,0.1822815,0.182312,0.1813049,0.1798401,0.1808319,0.1803589,0.181366,0.1853027,0(...TRUNCATED) | [0.178299,0.1749115,0.17836,0.1812744,0.17836,0.1793518,0.1812744,0.1837158,0.1866455,0.1871185,0.18(...TRUNCATED) | [8309,8310,8311,8312,8313,8314,8315,8316,8317,8318,8319,8320,8321,8322,8323,8324,8325,8326,8327,8328(...TRUNCATED) | 7 | [
-124197.28189,
-124196.28192,
-124187.37564,
-124185.37564,
-124176.37564,
-124171.37564,
-124170.37567
] | [
84,
84,
80,
80,
85,
86,
86
] | [
1122,
1123,
1124,
1125,
1126,
1127,
1128
] |
46343 | -60 | -1,800 | false | null | null | 122 | [-1772.40383387,-1772.37363911,-1772.37271094,-1772.37048602,-1772.35054803,-1772.33051395,-1772.310(...TRUNCATED) | [-0.1844025,-0.1864014,-0.1883545,-0.1834259,-0.1760712,-0.1785431,-0.1824799,-0.1849365,-0.1829681,(...TRUNCATED) | [-0.6867828,-0.6764679,-0.6804047,-0.689209,-0.6872253,-0.6842804,-0.6764374,-0.6681213,-0.6774292,-(...TRUNCATED) | [-0.7152557,-0.7148438,-0.7158051,-0.7123108,-0.7098389,-0.7098694,-0.7128601,-0.7158508,-0.7133484,(...TRUNCATED) | [10000,10001,10002,10003,10004,10005,10006,10007,10008,10009,10010,10011,10012,10013,10014,10015,100(...TRUNCATED) | 0 | [] | [] | [] |
46343 | -59 | -1,770 | false | null | null | 1,504 | [-1769.99615908,-1769.97618008,-1769.95291305,-1769.88979197,-1769.88044906,-1769.87539601,-1769.871(...TRUNCATED) | [0.3096008,0.3016357,0.2897339,0.2929993,0.29039,0.2854767,0.2870178,0.2954407,0.3003693,0.303299,0.(...TRUNCATED) | [0.3969269,0.3676758,0.4001312,0.483139,0.5680389,0.5851593,0.5654907,0.5110626,0.4733582,0.4680023,(...TRUNCATED) | [-0.844696,-0.8163147,-0.8097687,-0.8112335,-0.8195496,-0.828949,-0.8322296,-0.8206329,-0.8062592,-0(...TRUNCATED) | [10122,10123,10124,10125,10126,10127,10128,10129,10130,10131,10132,10133,10134,10135,10136,10137,101(...TRUNCATED) | 5 | [
-1762.99678993,
-1757.99678993,
-1752.99678993,
-1751.99681997,
-1742.99678993
] | [
79,
82,
85,
85,
81
] | [
1384,
1385,
1386,
1387,
1388
] |
46343 | -58 | -1,740 | false | null | null | 1,503 | [-1739.98267198,-1739.96283817,-1739.94277906,-1739.92293,-1739.90287304,-1739.883075,-1739.86303997(...TRUNCATED) | [0.3064728,0.3059998,0.3084564,0.3074646,0.3079834,0.3079834,0.3079681,0.3059998,0.3045502,0.3074951(...TRUNCATED) | [0.4588623,0.4564056,0.4529724,0.4559174,0.4504852,0.4499969,0.4558868,0.4559021,0.4534302,0.4524384(...TRUNCATED) | [-0.8392487,-0.8392334,-0.8387146,-0.8377686,-0.841629,-0.8411407,-0.8416595,-0.8397217,-0.8431244,-(...TRUNCATED) | [11626,11627,11628,11629,11630,11631,11632,11633,11634,11635,11636,11637,11638,11639,11640,11641,116(...TRUNCATED) | 7 | [-1737.99678993,-1732.99678993,-1727.99678993,-1726.99678993,-1721.99681997,-1716.99678993,-1711.996(...TRUNCATED) | [
76,
74,
75,
75,
74,
74,
74
] | [
1389,
1390,
1391,
1392,
1393,
1394,
1395
] |
Sleep-Accel: Apple Watch Motion and Heart Rate with Labeled Sleep
Unofficial mirror of the PhysioNet database "Motion and heart rate from a wrist-worn wearable and labeled sleep from polysomnography" v1.0.0 (sleep-accel, Walch et al. 2019): raw Apple Watch acceleration and heart rate from 31 people during a night of polysomnography, with sleep stages in 30 s epochs and the week's step counts, in a viewer-ready Parquet layout with exact values.
Disclaimer
This repository is not an official release of the sleep-accel database.
The data were collected at the University of Michigan by Olivia Walch, Yitong Huang, Daniel Forger and Cathy Goldstein, with the University of Michigan Sleep and Circadian Research Laboratory, and are published by PhysioNet. This repository does not claim ownership of the data. If you are an author or rights holder and want this repository changed or removed, please open a discussion and it will be addressed promptly.
These are recordings from real people. Do not attempt to identify anyone in them. This dataset is for research and is not a medical device or a basis for clinical decisions.
Source and verification: built from the official PhysioNet package sleep-accel-1.0.0.zip. Every file in it matched the published SHA256SUMS.txt. Every file was parsed twice (my own parser and pandas.read_csv) with identical results. Every acceleration sample and every label line is in exactly one row, and every row was read back from Parquet and compared with the source files.
Dataset Overview
Subjects wore an Apple Watch for 7 to 14 days to record their steps, then spent one night in the sleep lab with an eight-hour sleep opportunity. During that night an app recorded the watch's raw acceleration and its heart rate (from photoplethysmography) while the subjects underwent polysomnography (PSG). Sleep was scored from the PSG in 30 s epochs. Of 39 recruited subjects, the authors excluded four for data transmission errors, three for sleep apnea and one for REM sleep behavior disorder. Where the watch's battery ran out during the night, the authors cropped the data to the valid window.
All times are seconds since the start of the PSG, so negative times are before the night. Each subject has a random numeric identifier.
| File | Content |
|---|---|
motion/<id>_acceleration.txt |
time, x, y, z acceleration in g |
heart_rate/<id>_heartrate.txt |
time, heart rate in bpm |
steps/<id>_steps.txt |
time, steps from this time to the next (600 s bins) |
labels/<id>_labeled_sleep.txt |
time, stage: 0 wake, 1 N1, 2 N2, 3 N3, 4 N4, 5 REM, -1 unscored |
Changes from the Official Release
- Packed into Parquet so the Dataset Viewer and
datasetswork directly. Thedefaultconfig has one row per 30 s epoch with the label and the acceleration and heart rate measured in that epoch. Thesubjectsconfig has one row per subject. - Within each subject the samples are put in time order.
acc_lineandhr_linegive each sample's line number in its file, so the file order can be restored. - Three heart-rate files hold the same export two or three times. Only the last, longest copy goes into the
defaultrows;subjectskeeps the files as written. stage_nameis added from the stage codes in the authors' code.previewis a plot of each night.- The official zip is included unchanged in
original/. - No values were changed.
Dataset Structure
default: one row per 30 s epoch (37,312 rows)
Epoch k covers [30k, 30k + 30) seconds after PSG start. There is a row for every epoch with a label line or at least one acceleration sample, so the rows also cover the watch data recorded before and after the night.
| Column | Content |
|---|---|
subject, epoch, start_s |
subject id, epoch index, epoch start in seconds since PSG start |
in_psg |
true if the labels file has a line for this epoch |
stage, stage_name |
stage code as in the labels file and its name; null outside the PSG |
acc_t, acc_x, acc_y, acc_z, acc_line, n_acc |
acceleration samples in the epoch: time (s), x, y, z (g), 0-based line number in the file |
hr_t, hr_bpm, hr_line, n_hr |
heart-rate samples in the epoch: time (s), bpm, 0-based line number in the file |
subjects: one row per subject (31 rows)
Stage counts and the PSG length, all labels, the acceleration span, sample count and median rate, heart rate and steps exactly as in the files, the number of heart-rate exports in the file, and a preview of the night (hypnogram, heart rate and motion).
Read before using the data
- Stage codes. The PhysioNet page lists 0 to 3 and 5. The files also use
-1(438 epochs) and4(356 epochs). The authors' code (source/sleep_stage.py) names them unscored and N4. Only three subjects (5383425, 8258170 and 9618981) use 4, which suggests those nights were scored with separate N3 and N4 as in the older Rechtschaffen & Kales rules. Merge N3 and N4 for AASM-style staging. 431 of the 438 unscored epochs are at the start or end of the night, most of them at the start. - Different sampling rates. The acceleration is irregularly sampled at about 50 Hz for most subjects, but about 66 Hz for four subjects (759667, 3509524, 4018081, 5132496), 33 Hz for 9618981 and 10 Hz for 5383425 and 8258170 (median sample spacing). Resample if a model needs one rate.
- Out-of-order samples. In 11 of the 31 motion files, blocks of samples come after samples recorded later: time steps back at 293 places, and sorting moves 457,320 of the 51,819,151 samples. No sample is duplicated.
defaultrows hold the samples in time order;acc_linerestores the file order. (The authors' loader also sorts by time, after dropping exact duplicate rows.) - Repeated heart-rate exports. The heart-rate files of 1066528, 781756 and 9961348 hold the export three times (5,539 + 5,539 + 5,539 lines; 5,997 + 6,009 + 6,009; 5,220 + 5,220 + 5,553), each copy a prefix of the next.
defaultuses only the last copy;subjectskeeps all lines. Separately, 3509524 and 759667 each have one time with two different values; both are kept. - Heart rate is irregular. The median spacing is 5 s during the night in every subject; in the days before it is a few minutes for most subjects. 82 heart-rate values have decimals; the rest are whole numbers.
- The watch data extend beyond the night. Acceleration starts up to 6 days before the PSG for some subjects, and for 9618981 it continues for about 2.5 days after. Heart rate and steps cover days. Rows with
in_psgfalse hold these samples; filter onin_psgfor the labelled night. The 57,233 heart-rate samples in epochs with neither a label nor acceleration are only insubjects. - Some scored epochs have no watch data (1,240 scored epochs have no acceleration sample), and the acceleration has 286 gaps longer than 1 s.
- No demographics (age, sex, BMI) are given.
Usage
# pip install datasets numpy
import numpy as np
from datasets import load_dataset
ds = load_dataset("dronefreak/Sleep-Accel", split="train")
night = ds.filter(lambda r: r["in_psg"] and r["stage"] >= 0) # scored epochs only
row = night[0]
acc = np.stack([row["acc_x"], row["acc_y"], row["acc_z"]]) # 3 x n, in g
print(row["subject"], row["epoch"], row["stage_name"], acc.shape, row["hr_bpm"])
# wake / NREM / REM, as in the paper (N1-N4 merged)
three = {0: "wake", 1: "NREM", 2: "NREM", 3: "NREM", 4: "NREM", 5: "REM"}
Keep each subject on one side of a split.
Dataset Sources
Citation
Please cite the paper and the PhysioNet release:
@article{walch2019sleep,
author = {Walch, Olivia and Huang, Yitong and Forger, Daniel and Goldstein, Cathy},
title = {Sleep stage prediction with raw acceleration and photoplethysmography heart rate data derived from a consumer wearable device},
journal = {Sleep},
volume = {42},
number = {12},
pages = {zsz180},
year = {2019},
doi = {10.1093/sleep/zsz180}
}
@misc{PhysioNet-sleep-accel-1.0.0,
author = {Walch, Olivia},
title = {{Motion and heart rate from a wrist-worn wearable and labeled sleep from polysomnography}},
note = {Version 1.0.0, PhysioNet},
year = {2019},
doi = {10.13026/hmhs-py35}
}
Pollard, T., Moody, B. E., Lehman, L., Gow, B., Fernandes, C., Xie, C., Johnson, A., Mark, R. G., & Heldt, T. (2026). PhysioNet as a global platform for biomedical research. Nature Health. https://doi.org/10.1038/s44360-026-00096-z
License
The sleep-accel database is made available under the Open Data Commons Attribution License v1.0 (ODC-By): https://physionet.org/content/sleep-accel/view-license/1.0.0/. This repository contains information from that database, published on PhysioNet. If you publicly use or redistribute this data or a work produced from it, keep this attribution and the license notice.
- Downloads last month
- 12