Analytics

Analytics are the result of processing "raw" recording data into measurements such as Heart Rate and Step Count. The following endpoints are applicable to studies that use analytics in the remote setting.

Get Metrics

Get daily metrics (e.g. Moving Duration) for a subject.

Metrics can also be obtained in CSV format by requesting an export file.

URL

GET https://mc10cloud.com/api/v1/studies/{studyId}/subjects/{subjectId}/pipelines/metrics

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

Sample Response

The following example shows two days of metrics for a specific subject—one day with sleep and one without. Durations (e.g. MOVING_DURATION) are expressed in seconds, not milliseconds.

Metrics fall into three categories—Sleeping, Resting and Moving—as denoted by their property names.

Sleeping metrics are calculated for a 24-hour period starting at 12:00 PM (noon) of the prior day in the subject's local time. Resting and Moving metrics are calculated for a 24-hour period starting at 12:00 AM (midnight) in the subject's local time.

Because of this overlap, some days might contain more than 24 hours of data. For example, consider a subject who goes to sleep at 7:00 PM on April 1, wakes up at 5:00 AM on April 2, and returns to sleep at 10:00 PM. This would count as 10 hours of sleeping and 17 hours of resting and moving for the "day" of April 2, a total of 27 hours.

{
"items": [
{
"dataStartTs": 1525665600000,
"dataStopTs": 1525752000000,
"dayStartMsUtc": 1525651200000,
"errorTypes": [],
"libraryConfigId": "fdd051b8-d753-11e6-ab51-34363bc84032",
"metrics": {
"MOVING_AVG_GAIT_CADENCE": 92.55831739961758,
"MOVING_AVG_HR": 85.16520413355825,
"MOVING_AVG_HRV": 11.85706660576734,
"MOVING_AVG_HRV_RMSSD": 14.802552366340757,
"MOVING_COMBINED_ACT_COUNT": 21745.0,
"MOVING_DURATION": 5085.0,
"MOVING_MAX_HR": 107.71992818671454,
"MOVING_MAX_HRV": 35.93333959459612,
"MOVING_MAX_HRV_RMSSD": 180.33607514859582,
"MOVING_MIN_HR": 64.9703933868793,
"MOVING_MIN_HRV": 0.8438415622966339,
"MOVING_MIN_HRV_RMSSD": 5.616444110328566,
"MOVING_OTHER_DURATION": 2470.0,
"MOVING_STEPS": 4034.0,
"MOVING_WALKING_DURATION": 2615.0,
"RESTING_AVG_HR": 74.46236634705052,
"RESTING_AVG_HRV": 10.722222226730011,
"RESTING_AVG_HRV_RMSSD": 20.65887803696164,
"RESTING_COMBINED_ACT_COUNT": 4721.0,
"RESTING_DURATION": 28940.0,
"RESTING_LEANING_POSTURE_DURATION": 25575.0,
"RESTING_LYING_DURATION": 2510.0,
"RESTING_MAX_HR": 107.71992818671454,
"RESTING_MAX_HRV": 31.997539810454153,
"RESTING_MAX_HRV_RMSSD": 278.61348439049124,
"RESTING_MIN_HR": 62.11180124223603,
"RESTING_MIN_HRV": 0.8438415622966339,
"RESTING_MIN_HRV_RMSSD": 5.169229171990553,
"RESTING_SITTING_DURATION": 24530.0,
"RESTING_STANDING_DURATION": 1900.0,
"RESTING_UPRIGHT_POSTURE_DURATION": 3365.0,
"SENSOR_WEAR_DURATION": 34025.0
},
"subjectTz": "US/Eastern",
"subjectTzOffset": "-04:00"
},
{
"dataStartTs": 1525745400000,
"dataStopTs": 1525838400000,
"dayStartMsUtc": 1525737600000,
"errorTypes": [],
"libraryConfigId": "fdd051b8-d753-11e6-ab51-34363bc84032",
"metrics": {
"MOVING_AVG_GAIT_CADENCE": 97.0951072017592,
"MOVING_AVG_HR": 79.59497218783511,
"MOVING_AVG_HRV": 5.616209365819591,
"MOVING_AVG_HRV_RMSSD": 129.01343375708058,
"MOVING_COMBINED_ACT_COUNT": 19748.0,
"MOVING_DURATION": 16815.0,
"MOVING_MAX_HR": 136.05442176870747,
"MOVING_MAX_HRV": 28.680228102271617,
"MOVING_MAX_HRV_RMSSD": 776.4200814360373,
"MOVING_MIN_HR": 32.70314190757635,
"MOVING_MIN_HRV": 0.4410784543516622,
"MOVING_MIN_HRV_RMSSD": 3.636931773799548,
"MOVING_OTHER_DURATION": 7720.0,
"MOVING_STEPS": 14718.0,
"MOVING_WALKING_DURATION": 9095.0,
"RESTING_AVG_HR": 74.60246528745273,
"RESTING_AVG_HRV": 5.390801534224774,
"RESTING_AVG_HRV_RMSSD": 69.13318620339443,
"RESTING_COMBINED_ACT_COUNT": 4550.0,
"RESTING_DURATION": 33575.0,
"RESTING_LEANING_POSTURE_DURATION": 31895.0,
"RESTING_LYING_DURATION": 4215.0,
"RESTING_MAX_HR": 136.05442176870747,
"RESTING_MAX_HRV": 25.148284840827483,
"RESTING_MAX_HRV_RMSSD": 776.4200814360373,
"RESTING_MIN_HR": 30.927835051546392,
"RESTING_MIN_HRV": 0.29546494638471454,
"RESTING_MIN_HRV_RMSSD": 3.636931773799548,
"RESTING_SITTING_DURATION": 19480.0,
"RESTING_STANDING_DURATION": 9880.0,
"RESTING_UPRIGHT_POSTURE_DURATION": 1680.0,
"SENSOR_WEAR_DURATION": 79850.0,
"SLEEPING_AVG_HR": 57.884643939151644,
"SLEEPING_AVG_HRV": 3.485771889862468,
"SLEEPING_AVG_HRV_RMSSD": 47.054034915749696,
"SLEEPING_AVG_RESPIRATION": 15.558412560563902,
"SLEEPING_COMBINED_ACT_COUNT": 1225.0,
"SLEEPING_DURATION": 29460.0,
"SLEEPING_MAX_HR": 82.8735605869829,
"SLEEPING_MAX_HRV": 20.57357427723382,
"SLEEPING_MAX_HRV_RMSSD": 419.66288395593523,
"SLEEPING_MAX_RESPIRATION": 24.581146388582404,
"SLEEPING_MIN_HR": 47.46847327269586,
"SLEEPING_MIN_HRV": 0.25690272886243,
"SLEEPING_MIN_HRV_RMSSD": 10.57490290397843,
"SLEEPING_MIN_RESPIRATION": 6.789582190300725,
"SLEEPING_ONSET_TS": 1525745400000,
"SLEEPING_POSTURE_TRANSITIONS": 66.0,
"SLEEPING_WAKE_TS": 1525774980000
},
"subjectTz": "US/Eastern",
"subjectTzOffset": "-04:00"
}
]
}

Get Channels

Get intraday metrics—each expressed as a "channel"—for a subject, for a specific time frame.

URL

GET https://mc10cloud.com/api/v1/studies/{studyId}/subjects/{subjectId}/pipelines/{pipelineId}/channels?masterId={masterId}&from={from}&to={to}&interval={interval}

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

  • pipelineId: Not documented. Use fdd051b8-d753-11e6-ab51-34363bc84032

  • masterId: Not documented. Use 4e8a80fd-4778-11e6-a313-34363bc3dbe2

  • from: Beginning timestamp (UTC)

  • to: Ending timestamp (UTC)

  • interval: (Optional) Binning interval in milliseconds (1000, 5000, 10000, 15000, 30000 or 60000 (the default))

Sample Response

The following example shows five minutes of data for a specific subject at 30-second intervals.

{
"channels": [
{
"times": [
1525880220000,
1525880250000,
1525880280000,
1525880310000,
1525880340000,
1525880370000,
1525880400000,
1525880430000,
1525880460000,
1525880490000
],
"type": "heart_rate",
"units": "bpm",
"values": [
49.26108374384236,
49.26108374384236,
50.42073775284518,
50.42073775284518,
81.79962901145306,
81.79962901145306,
72.63922518159806,
72.63922518159806,
68.54033741730927,
68.54033741730927
]
},
{
"times": [
1525880220000,
1525880250000,
1525880280000,
1525880310000,
1525880340000,
1525880370000,
1525880400000,
1525880430000,
1525880460000,
1525880490000
],
"type": "resting_posture",
"units": "",
"values": [
null,
null,
null,
{
"c": "NEUTRAL",
"ca": -8.695214720012109,
"s": "SLOUCHING",
"sa": -29.298945829444648
},
{
"c": "NEUTRAL",
"ca": 0.5502456567111255,
"s": "SLOUCHING",
"sa": -19.176843376829762
},
{
"c": "NEUTRAL",
"ca": -6.153157021777213,
"s": "SLOUCHING",
"sa": -19.59899386389021
},
{
"c": "LEAN_LEFT",
"ca": -25.779557251929756,
"s": "SLOUCHING",
"sa": -35.57264108255574
},
{
"c": "LEAN_LEFT",
"ca": -23.316816128062296,
"s": "SLOUCHING",
"sa": -33.44606961691965
},
{
"c": "NEUTRAL",
"ca": -6.295979776762304,
"s": "SLOUCHING",
"sa": -28.685367444969994
},
null
]
},
{
"times": [
1525880220000,
1525880250000,
1525880280000,
1525880310000,
1525880340000,
1525880370000,
1525880400000,
1525880430000,
1525880460000,
1525880490000
],
"type": "hrv",
"units": "milliseconds",
"values": [
461.8063857625125,
461.8063857625125,
379.88279037912406,
379.88279037912406,
242.69021608545856,
242.69021608545856,
72.55610855668108,
72.55610855668108,
344.3029189536447,
344.3029189536447
]
},
{
"times": [
1525880220000,
1525880250000,
1525880280000,
1525880310000,
1525880340000,
1525880370000,
1525880400000,
1525880430000,
1525880460000,
1525880490000
],
"type": "sleeping_posture",
"units": "",
"values": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
]
},
{
"times": [
1525880220000,
1525880250000,
1525880280000,
1525880310000,
1525880340000,
1525880370000,
1525880400000,
1525880430000,
1525880460000,
1525880490000
],
"type": "frequency_hrv_ratio",
"units": "lf_hf",
"values": [
3.096366615926906,
3.096366615926906,
2.073418769873896,
2.073418769873896,
1.5386294822937912,
1.5386294822937912,
1.0124493684242857,
1.0124493684242857,
1.1492308357794772,
1.1492308357794772
]
},
{
"times": [
1525880220000,
1525880250000,
1525880280000,
1525880310000,
1525880340000,
1525880370000,
1525880400000,
1525880430000,
1525880460000,
1525880490000
],
"type": "sleep_respiration",
"units": "breaths_per_minute",
"values": [
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
]
},
{
"times": [
1525880220000,
1525880250000,
1525880280000,
1525880310000,
1525880340000,
1525880370000,
1525880400000,
1525880430000,
1525880460000,
1525880490000
],
"type": "steps",
"units": "steps",
"values": [
52.0,
50.0,
50.0,
22.0,
0.0,
0.0,
0.0,
0.0,
0.0,
50.0
]
},
{
"times": [
1525880220000,
1525880250000,
1525880280000,
1525880310000,
1525880340000,
1525880370000,
1525880400000,
1525880430000,
1525880460000,
1525880490000
],
"type": "activity",
"units": "",
"values": [
"MOVING:WALKING",
"MOVING:WALKING",
"MOVING:WALKING",
"MOVING:WALKING",
"RESTING:STANDING",
"RESTING:SITTING",
"RESTING:LYING",
"RESTING:SITTING",
"RESTING:SITTING",
"MOVING:WALKING"
]
},
{
"times": [
1525880220000,
1525880250000,
1525880280000,
1525880310000,
1525880340000,
1525880370000,
1525880400000,
1525880430000,
1525880460000,
1525880490000
],
"type": "combined_act_count",
"units": "activity_counts",
"values": [
41.84937342091976,
44.03539983700441,
39.21652717518033,
39.568542444911433,
7.9163773625615015,
3.596469972715332,
3.3069473481966787,
4.664029923823413,
5.01940282258907,
52.71431160490386
]
}
]
}

Download Metrics CSV

Download daily metrics for a subject in CSV format.

This method returns content as text/csv.

URL

GET https://mc10cloud.com/api/v1/archives/{studyId}/subjects/{subjectId}/metrics

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

Sample Response

"DATE","MOVING_AVG_GAIT_CADENCE (steps_per_minute)","MOVING_AVG_HR (bpm)","MOVING_AVG_HRV (lf_hf)","MOVING_AVG_HRV_RMSSD (milliseconds)","MOVING_COMBINED_ACT_COUNT (count)","MOVING_DURATION (seconds)","MOVING_MAX_HR (bpm)","MOVING_MAX_HRV (lf_hf)","MOVING_MAX_HRV_RMSSD (milliseconds)","MOVING_MIN_HR (bpm)","MOVING_MIN_HRV (lf_hf)","MOVING_MIN_HRV_RMSSD (milliseconds)","MOVING_OTHER_DURATION (seconds)","MOVING_STEPS (steps)","MOVING_WALKING_DURATION (seconds)","RESTING_AVG_HR (bpm)","RESTING_AVG_HRV (lf_hf)","RESTING_AVG_HRV_RMSSD (milliseconds)","RESTING_COMBINED_ACT_COUNT (count)","RESTING_DURATION (seconds)","RESTING_LEANING_POSTURE_DURATION (seconds)","RESTING_LYING_DURATION (seconds)","RESTING_MAX_HR (bpm)","RESTING_MAX_HRV (lf_hf)","RESTING_MAX_HRV_RMSSD (milliseconds)","RESTING_MIN_HR (bpm)","RESTING_MIN_HRV (lf_hf)","RESTING_MIN_HRV_RMSSD (milliseconds)","RESTING_SITTING_DURATION (seconds)","RESTING_STANDING_DURATION (seconds)","RESTING_UPRIGHT_POSTURE_DURATION (seconds)","SENSOR_WEAR_DURATION (seconds)","SLEEPING_AVG_HR (bpm)","SLEEPING_AVG_HRV (lf_hf)","SLEEPING_AVG_HRV_RMSSD (milliseconds)","SLEEPING_AVG_RESPIRATION (breaths_per_minute)","SLEEPING_COMBINED_ACT_COUNT (count)","SLEEPING_DURATION (seconds)","SLEEPING_MAX_HR (bpm)","SLEEPING_MAX_HRV (lf_hf)","SLEEPING_MAX_HRV_RMSSD (milliseconds)","SLEEPING_MAX_RESPIRATION (breaths_per_minute)","SLEEPING_MIN_HR (bpm)","SLEEPING_MIN_HRV (lf_hf)","SLEEPING_MIN_HRV_RMSSD (milliseconds)","SLEEPING_MIN_RESPIRATION (breaths_per_minute)","SLEEPING_ONSET_TS (utc_milliseconds)","SLEEPING_POSTURE_TRANSITIONS (transitions)","SLEEPING_WAKE_TS (utc_milliseconds)"
"2018-05-09","85.60","93.01","5.53","17.48","1109.78","1435.00","107.72","11.39","67.48","71.34","0.73","3.60","1285.00","214.00","150.00","77.92","4.64","28.61","17993.00","39470.00","39110.00","33400.00","119.76","11.39","430.62","50.15","0.67","3.60","4290.00","1780.00","360.00","77095.00","","","","15.94","1653.52","30285.00","","","","34.16","","","","6.73","1525831500000.00","48.00","1525862040000.00"
"2018-05-10","97.95","90.34","4.80","86.80","22442.17","16685.00","169.97","28.03","544.99","62.43","0.31","4.78","7900.00","14342.00","8785.00","83.35","5.37","51.46","4499.19","31810.00","26490.00","1555.00","112.15","28.03","544.99","58.59","0.31","3.68","19435.00","10820.00","5320.00","72460.00","64.28","4.07","37.44","16.00","2419.06","36685.00","80.11","25.82","246.88","23.50","50.55","0.44","8.87","6.72","1525920300000.00","70.00","1525948920000.00"
"2018-05-12","81.91","80.06","14.55","24.56","1828.68","1985.00","92.45","29.38","376.98","66.74","1.03","7.94","1440.00","744.00","545.00","77.61","16.06","30.38","573.28","2555.00","2445.00","640.00","92.45","30.50","376.98","66.74","1.03","7.27","445.00","1470.00","110.00","58540.00","","","","17.63","290.95","10800.00","","","","22.24","","","","15.51","","1.00",""
...

Download Channels CSV

Download intraday metrics for a subject, by day (12AM to 12AM), in CSV format.

This method returns content as text/csv.

URL

GET https://mc10cloud.com/api/v1/archives/{studyId}/subjects/{subjectId}/days/{date}/channels

Parameters

  • studyId: Study UUID

  • subjectId: Subject UUID

  • date: Date in "YYYY-MM-DD" format

Sample Response

"TIME (hh:mm)","UTC Timestamp (utc_milliseconds)","ACTIVITY","COMBINED_ACT_COUNT (activity_counts)","FREQUENCY_HRV_RATIO (lf_hf)","HEART_RATE (bpm)","HRV (milliseconds)","RESTING_POSTURE","SLEEP_RESPIRATION (breaths_per_minute)","SLEEPING_POSTURE","STEPS (steps)"
"00:00","1525752000000","SLEEPING:ASLEEP","3.12","2.14","65.15","46.68","","","LYING_CHEST/LYING_RIGHT","0.00"
"00:01","1525752060000","SLEEPING:ASLEEP","1.84","2.14","64.10","41.06","","","LYING_CHEST/LYING_RIGHT","0.00"
"00:02","1525752120000","SLEEPING:ASLEEP","1.82","2.14","61.10","53.21","","","LYING_CHEST/LYING_RIGHT","0.00"
...