2197 lines
79 KiB
HTML
2197 lines
79 KiB
HTML
|
||
<!doctype html>
|
||
<html lang="en" class="no-js">
|
||
<head>
|
||
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="shortcut icon" href="../../img/logo.png">
|
||
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.2.8+insiders-1.17.0">
|
||
|
||
|
||
|
||
<title>Fitbit Sleep Intraday - RAPIDS</title>
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../../assets/stylesheets/main.10cb3b3f.min.css">
|
||
|
||
|
||
<link rel="stylesheet" href="../../assets/stylesheets/palette.697e47cb.min.css">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
|
||
<style>:root{--md-text-font-family:"Roboto",;--md-code-font-family:"Roboto Mono",}</style>
|
||
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="../../stylesheets/extra.css">
|
||
|
||
|
||
|
||
|
||
|
||
</head>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="blue" data-md-color-accent="blue">
|
||
|
||
|
||
|
||
<script>var palette=JSON.parse(localStorage.getItem("__palette"));if(null!==palette&&"object"==typeof palette.color)for(var key in palette.color)document.body.setAttribute("data-md-color-"+key,palette.color[key])</script>
|
||
|
||
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
||
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
||
<label class="md-overlay" for="__drawer"></label>
|
||
<div data-md-component="skip">
|
||
|
||
|
||
<a href="#fitbit-sleep-intraday" class="md-skip">
|
||
Skip to content
|
||
</a>
|
||
|
||
</div>
|
||
<div data-md-component="announce">
|
||
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
<header class="md-header" data-md-component="header">
|
||
<nav class="md-header__inner md-grid" aria-label="Header">
|
||
<a href="../.." title="RAPIDS" class="md-header__button md-logo" aria-label="RAPIDS">
|
||
|
||
<img src="../../img/logo.png" alt="logo">
|
||
|
||
</a>
|
||
<label class="md-header__button md-icon" for="__drawer">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
|
||
</label>
|
||
<div class="md-header__title" data-md-component="header-title">
|
||
<div class="md-header__ellipsis">
|
||
<div class="md-header__topic">
|
||
<span class="md-ellipsis">
|
||
RAPIDS
|
||
</span>
|
||
</div>
|
||
<div class="md-header__topic" data-md-component="header-topic">
|
||
<span class="md-ellipsis">
|
||
|
||
Fitbit Sleep Intraday
|
||
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="md-header__options">
|
||
|
||
|
||
|
||
|
||
|
||
<button class="md-header__button md-icon" title="Switch to light mode" aria-label="Switch to light mode" data-md-option="palette" data-md-color-scheme="default" data-md-color-primary="blue" data-md-color-accent="blue" data-md-state="hidden">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 7H7a5 5 0 00-5 5 5 5 0 005 5h10a5 5 0 005-5 5 5 0 00-5-5m0 8a3 3 0 01-3-3 3 3 0 013-3 3 3 0 013 3 3 3 0 01-3 3z"/></svg>
|
||
</button>
|
||
|
||
|
||
|
||
|
||
<button class="md-header__button md-icon" title="Switch to dark mode" aria-label="Switch to dark mode" data-md-option="palette" data-md-color-scheme="slate" data-md-color-primary="blue" data-md-color-accent="blue" data-md-state="hidden">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m10-3a5 5 0 015 5 5 5 0 01-5 5H7a5 5 0 01-5-5 5 5 0 015-5h10M7 9a3 3 0 00-3 3 3 3 0 003 3h10a3 3 0 003-3 3 3 0 00-3-3H7z"/></svg>
|
||
</button>
|
||
|
||
|
||
|
||
</div>
|
||
|
||
<label class="md-header__button md-icon" for="__search">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
||
</label>
|
||
|
||
<div class="md-search" data-md-component="search" role="dialog">
|
||
<label class="md-search__overlay" for="__search"></label>
|
||
<div class="md-search__inner" role="search">
|
||
<form class="md-search__form" name="search">
|
||
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active" required>
|
||
<label class="md-search__icon md-icon" for="__search">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
||
</label>
|
||
<nav class="md-search__options" aria-label="Search">
|
||
|
||
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
|
||
</button>
|
||
</nav>
|
||
<div class="md-search__suggest" data-md-component="search-suggest"></div>
|
||
</form>
|
||
<div class="md-search__output">
|
||
<div class="md-search__scrollwrap" data-md-scrollfix>
|
||
<div class="md-search-result" data-md-component="search-result">
|
||
<div class="md-search-result__meta">
|
||
Initializing search
|
||
</div>
|
||
<ol class="md-search-result__list"></ol>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="md-header__source">
|
||
|
||
<a href="https://github.com/carissalow/rapids/" title="Go to repository" class="md-source">
|
||
<div class="md-source__icon md-icon">
|
||
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg>
|
||
</div>
|
||
<div class="md-source__repository">
|
||
carissalow/rapids
|
||
</div>
|
||
</a>
|
||
</div>
|
||
|
||
</nav>
|
||
|
||
</header>
|
||
|
||
<div class="md-container" data-md-component="container">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<main class="md-main" data-md-component="main">
|
||
<div class="md-main__inner md-grid">
|
||
|
||
|
||
|
||
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation" >
|
||
<div class="md-sidebar__scrollwrap">
|
||
<div class="md-sidebar__inner">
|
||
|
||
|
||
|
||
|
||
|
||
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
||
<label class="md-nav__title" for="__drawer">
|
||
<a href="../.." title="RAPIDS" class="md-nav__button md-logo" aria-label="RAPIDS">
|
||
|
||
<img src="../../img/logo.png" alt="logo">
|
||
|
||
</a>
|
||
RAPIDS
|
||
</label>
|
||
|
||
<div class="md-nav__source">
|
||
|
||
<a href="https://github.com/carissalow/rapids/" title="Go to repository" class="md-source">
|
||
<div class="md-source__icon md-icon">
|
||
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg>
|
||
</div>
|
||
<div class="md-source__repository">
|
||
carissalow/rapids
|
||
</div>
|
||
</a>
|
||
</div>
|
||
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../.." class="md-nav__link">
|
||
Home
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2" >
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link" for="nav-2">
|
||
Setup
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" aria-label="Setup" data-md-level="1">
|
||
<label class="md-nav__title" for="nav-2">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Setup
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../file-structure/" class="md-nav__link">
|
||
File Structure
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../setup/installation/" class="md-nav__link">
|
||
Installation
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../setup/configuration/" class="md-nav__link">
|
||
Configuration
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../setup/execution/" class="md-nav__link">
|
||
Execution
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../citation/" class="md-nav__link">
|
||
Citation
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3" >
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link" for="nav-3">
|
||
Example Workflows
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" aria-label="Example Workflows" data-md-level="1">
|
||
<label class="md-nav__title" for="nav-3">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Example Workflows
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../workflow-examples/minimal/" class="md-nav__link">
|
||
Minimal
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../workflow-examples/analysis/" class="md-nav__link">
|
||
Analysis
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested">
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4" checked>
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link" for="nav-4">
|
||
Behavioral Features
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" aria-label="Behavioral Features" data-md-level="1">
|
||
<label class="md-nav__title" for="nav-4">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Behavioral Features
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../feature-introduction/" class="md-nav__link">
|
||
Introduction
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--nested">
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-4-2" type="checkbox" id="nav-4-2" >
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link" for="nav-4-2">
|
||
Phone
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" aria-label="Phone" data-md-level="2">
|
||
<label class="md-nav__title" for="nav-4-2">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Phone
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-accelerometer/" class="md-nav__link">
|
||
Phone Accelerometer
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-activity-recognition/" class="md-nav__link">
|
||
Phone Activity Recognition
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-applications-crashes/" class="md-nav__link">
|
||
Phone Applications Crashes
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-applications-foreground/" class="md-nav__link">
|
||
Phone Applications Foreground
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-applications-notifications/" class="md-nav__link">
|
||
Phone Applications Notifications
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-aware-log/" class="md-nav__link">
|
||
Phone Aware Log
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-battery/" class="md-nav__link">
|
||
Phone Battery
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-bluetooth/" class="md-nav__link">
|
||
Phone Bluetooth
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-calls/" class="md-nav__link">
|
||
Phone Calls
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-conversation/" class="md-nav__link">
|
||
Phone Conversation
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-data-yield/" class="md-nav__link">
|
||
Phone Data Yield
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-keyboard/" class="md-nav__link">
|
||
Phone Keyboard
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-light/" class="md-nav__link">
|
||
Phone Light
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-locations/" class="md-nav__link">
|
||
Phone Locations
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-messages/" class="md-nav__link">
|
||
Phone Messages
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-screen/" class="md-nav__link">
|
||
Phone Screen
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-wifi-connected/" class="md-nav__link">
|
||
Phone WiFI Connected
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../phone-wifi-visible/" class="md-nav__link">
|
||
Phone WiFI Visible
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-4-3" type="checkbox" id="nav-4-3" checked>
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link" for="nav-4-3">
|
||
Fitbit
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" aria-label="Fitbit" data-md-level="2">
|
||
<label class="md-nav__title" for="nav-4-3">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Fitbit
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../fitbit-data-yield/" class="md-nav__link">
|
||
Fitbit Data Yield
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../fitbit-heartrate-summary/" class="md-nav__link">
|
||
Fitbit Heart Rate Summary
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../fitbit-heartrate-intraday/" class="md-nav__link">
|
||
Fitbit Heart Rate Intraday
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../fitbit-sleep-summary/" class="md-nav__link">
|
||
Fitbit Sleep Summary
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--active">
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link md-nav__link--active" for="__toc">
|
||
Fitbit Sleep Intraday
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<a href="./" class="md-nav__link md-nav__link--active">
|
||
Fitbit Sleep Intraday
|
||
</a>
|
||
|
||
|
||
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__title" for="__toc">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Table of contents
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#rapids-provider" class="md-nav__link">
|
||
RAPIDS provider
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#price-provider" class="md-nav__link">
|
||
PRICE provider
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</nav>
|
||
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../fitbit-steps-summary/" class="md-nav__link">
|
||
Fitbit Steps Summary
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../fitbit-steps-intraday/" class="md-nav__link">
|
||
Fitbit Steps Intraday
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--nested">
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-4-4" type="checkbox" id="nav-4-4" >
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link" for="nav-4-4">
|
||
Empatica
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" aria-label="Empatica" data-md-level="2">
|
||
<label class="md-nav__title" for="nav-4-4">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Empatica
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../empatica-accelerometer/" class="md-nav__link">
|
||
Empatica Accelerometer
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../empatica-heartrate/" class="md-nav__link">
|
||
Empatica Heart Rate
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../empatica-temperature/" class="md-nav__link">
|
||
Empatica Temperature
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../empatica-electrodermal-activity/" class="md-nav__link">
|
||
Empatica Electrodermal Activity
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../empatica-blood-volume-pulse/" class="md-nav__link">
|
||
Empatica Blood Volume Pulse
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../empatica-inter-beat-interval/" class="md-nav__link">
|
||
Empatica Inter Beat Interval
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../empatica-tags/" class="md-nav__link">
|
||
Empatica Tags
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../add-new-features/" class="md-nav__link">
|
||
Add New Features
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5" >
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link" for="nav-5">
|
||
Visualizations
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" aria-label="Visualizations" data-md-level="1">
|
||
<label class="md-nav__title" for="nav-5">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Visualizations
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../visualizations/data-quality-visualizations/" class="md-nav__link">
|
||
Data Quality
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../visualizations/feature-visualizations/" class="md-nav__link">
|
||
Features
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-6" type="checkbox" id="nav-6" >
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link" for="nav-6">
|
||
Developers
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" aria-label="Developers" data-md-level="1">
|
||
<label class="md-nav__title" for="nav-6">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Developers
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../developers/git-flow/" class="md-nav__link">
|
||
Git Flow
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../developers/remote-support/" class="md-nav__link">
|
||
Remote Support
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../developers/virtual-environments/" class="md-nav__link">
|
||
Virtual Environments
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../developers/documentation/" class="md-nav__link">
|
||
Documentation
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../developers/testing/" class="md-nav__link">
|
||
Testing
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../developers/test-cases/" class="md-nav__link">
|
||
Test cases
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../developers/validation-schema-config/" class="md-nav__link">
|
||
Validation schema of config.yaml
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item md-nav__item--section md-nav__item--nested">
|
||
|
||
|
||
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-7" type="checkbox" id="nav-7" >
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__link" for="nav-7">
|
||
Others
|
||
<span class="md-nav__icon md-icon"></span>
|
||
</label>
|
||
|
||
<nav class="md-nav" aria-label="Others" data-md-level="1">
|
||
<label class="md-nav__title" for="nav-7">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Others
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../migrating-from-old-versions/" class="md-nav__link">
|
||
Migrating from beta
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../code_of_conduct/" class="md-nav__link">
|
||
Code of Conduct
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../faq/" class="md-nav__link">
|
||
FAQ
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../team/" class="md-nav__link">
|
||
Team
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li class="md-nav__item">
|
||
<a href="../../change-log/" class="md-nav__link">
|
||
Change Log
|
||
</a>
|
||
</li>
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</li>
|
||
|
||
|
||
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
|
||
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc" >
|
||
<div class="md-sidebar__scrollwrap">
|
||
<div class="md-sidebar__inner">
|
||
|
||
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
|
||
|
||
|
||
|
||
|
||
|
||
<label class="md-nav__title" for="__toc">
|
||
<span class="md-nav__icon md-icon"></span>
|
||
Table of contents
|
||
</label>
|
||
<ul class="md-nav__list" data-md-scrollfix>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#rapids-provider" class="md-nav__link">
|
||
RAPIDS provider
|
||
</a>
|
||
|
||
</li>
|
||
|
||
<li class="md-nav__item">
|
||
<a href="#price-provider" class="md-nav__link">
|
||
PRICE provider
|
||
</a>
|
||
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
</nav>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="md-content">
|
||
<article class="md-content__inner md-typeset">
|
||
|
||
|
||
<a href="https://github.com/carissalow/rapids/edit/master/docs/features/fitbit-sleep-intraday.md" title="Edit this page" class="md-content__button md-icon">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>
|
||
</a>
|
||
|
||
|
||
<h1 id="fitbit-sleep-intraday">Fitbit Sleep Intraday<a class="headerlink" href="#fitbit-sleep-intraday" title="Permanent link">¶</a></h1>
|
||
<p>Sensor parameters description for <code>[FITBIT_SLEEP_INTRADAY]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Key </th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><code>[TABLE]</code></td>
|
||
<td>Database table name or file path where the sleep intraday data is stored. The configuration keys in <a href="../../setup/configuration/#device-data-source-configuration">Device Data Source Configuration</a> control whether this parameter is interpreted as table or file.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>The format of the column(s) containing the Fitbit sensor data can be <code>JSON</code> or <code>PLAIN_TEXT</code>. The data in <code>JSON</code> format is obtained directly from the Fitbit API. We support <code>PLAIN_TEXT</code> in case you already parsed your data and don’t have access to your participants’ Fitbit accounts anymore. If your data is in <code>JSON</code> format then summary and intraday data come packed together. </p>
|
||
<p>We provide examples of the input format that RAPIDS expects, note that both examples for <code>JSON</code> and <code>PLAIN_TEXT</code> are tabular and the actual format difference comes in the <code>fitbit_data</code> column (we truncate the <code>JSON</code> example for brevity).</p>
|
||
<details class="example"><summary>Example of the structure of source data with Fitbit’s sleep API Version 1</summary><div class="tabbed-set" data-tabs="1:2"><input checked="checked" id="__tabbed_1_1" name="__tabbed_1" type="radio" /><label for="__tabbed_1_1">JSON</label><div class="tabbed-content">
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>device_id</th>
|
||
<th>fitbit_data</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>{“sleep”: [{“awakeCount”: 2, “awakeDuration”: 3, “awakeningsCount”: 10, “dateOfSleep”: “2020-10-07”, “duration”: 8100000, “efficiency”: 91, “endTime”: “2020-10-07T18:10:00.000”, “isMainSleep”: true, “logId”: 14147921940, “minuteData”: [{“dateTime”: “15:55:00”, “value”: “3”}, {“dateTime”: “15:56:00”, “value”: “3”}, {“dateTime”: “15:57:00”, “value”: “2”},…], “minutesAfterWakeup”: 0, “minutesAsleep”: 123, “minutesAwake”: 12, “minutesToFallAsleep”: 0, “restlessCount”: 8, “restlessDuration”: 9, “startTime”: “2020-10-07T15:55:00.000”, “timeInBed”: 135}, {“awakeCount”: 0, “awakeDuration”: 0, “awakeningsCount”: 1, “dateOfSleep”: “2020-10-07”, “duration”: 3780000, “efficiency”: 100, “endTime”: “2020-10-07T10:52:30.000”, “isMainSleep”: false, “logId”: 14144903977, “minuteData”: [{“dateTime”: “09:49:00”, “value”: “1”}, {“dateTime”: “09:50:00”, “value”: “1”}, {“dateTime”: “09:51:00”, “value”: “1”},…], “minutesAfterWakeup”: 1, “minutesAsleep”: 62, “minutesAwake”: 0, “minutesToFallAsleep”: 0, “restlessCount”: 1, “restlessDuration”: 1, “startTime”: “2020-10-07T09:49:00.000”, “timeInBed”: 63}], “summary”: {“totalMinutesAsleep”: 185, “totalSleepRecords”: 2, “totalTimeInBed”: 198}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>{“sleep”: [{“awakeCount”: 3, “awakeDuration”: 21, “awakeningsCount”: 16, “dateOfSleep”: “2020-10-08”, “duration”: 19260000, “efficiency”: 89, “endTime”: “2020-10-08T06:01:30.000”, “isMainSleep”: true, “logId”: 14150613895, “minuteData”: [{“dateTime”: “00:40:00”, “value”: “3”}, {“dateTime”: “00:41:00”, “value”: “3”}, {“dateTime”: “00:42:00”, “value”: “3”},…], “minutesAfterWakeup”: 0, “minutesAsleep”: 275, “minutesAwake”: 33, “minutesToFallAsleep”: 0, “restlessCount”: 13, “restlessDuration”: 25, “startTime”: “2020-10-08T00:40:00.000”, “timeInBed”: 321}], “summary”: {“totalMinutesAsleep”: 275, “totalSleepRecords”: 1, “totalTimeInBed”: 321}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>{“sleep”: [{“awakeCount”: 1, “awakeDuration”: 3, “awakeningsCount”: 8, “dateOfSleep”: “2020-10-09”, “duration”: 19320000, “efficiency”: 96, “endTime”: “2020-10-09T05:57:30.000”, “isMainSleep”: true, “logId”: 14161136803, “minuteData”: [{“dateTime”: “00:35:30”, “value”: “2”}, {“dateTime”: “00:36:30”, “value”: “1”}, {“dateTime”: “00:37:30”, “value”: “1”},…], “minutesAfterWakeup”: 0, “minutesAsleep”: 309, “minutesAwake”: 13, “minutesToFallAsleep”: 0, “restlessCount”: 7, “restlessDuration”: 10, “startTime”: “2020-10-09T00:35:30.000”, “timeInBed”: 322}], “summary”: {“totalMinutesAsleep”: 309, “totalSleepRecords”: 1, “totalTimeInBed”: 322}}</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<input id="__tabbed_1_2" name="__tabbed_1" type="radio" /><label for="__tabbed_1_2">PLAIN_TEXT</label><div class="tabbed-content">
|
||
<p>All columns are mandatory, however, all except <code>device_id</code>, <code>local_date_time</code> and <code>duration</code> can be empty if you don’t have that data. Just have in mind that some features might be inaccurate or empty as <code>type_episode_id</code>, <code>level</code>, <code>is_main_sleep</code>, and <code>type</code> are used for sleep episodes extraction. <code>type_episode_id</code> is based on where it is extracted: if it is extracted from the 1<sup>st</sup> “minutesData” block, the <code>type_episode_id</code> field will be 0. Similarly, the kth block will be k-1. Actually, you only need to make sure rows extracted from the same “minutesData” block are assigned with the same unique <code>type_episode_id</code> value.</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>device_id</th>
|
||
<th>type_episode_id</th>
|
||
<th>local_date_time</th>
|
||
<th>duration</th>
|
||
<th>level</th>
|
||
<th>is_main_sleep</th>
|
||
<th>type</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>0</td>
|
||
<td>2020-10-07 15:55:00</td>
|
||
<td>60</td>
|
||
<td>awake</td>
|
||
<td>0</td>
|
||
<td>classic</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>0</td>
|
||
<td>2020-10-07 15:56:00</td>
|
||
<td>60</td>
|
||
<td>awake</td>
|
||
<td>0</td>
|
||
<td>classic</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>0</td>
|
||
<td>2020-10-07 15:57:00</td>
|
||
<td>60</td>
|
||
<td>restless</td>
|
||
<td>0</td>
|
||
<td>classic</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</details>
|
||
<details class="example"><summary>Example of the structure of source data with Fitbit’s sleep API Version 1.2</summary><div class="tabbed-set" data-tabs="2:2"><input checked="checked" id="__tabbed_2_1" name="__tabbed_2" type="radio" /><label for="__tabbed_2_1">JSON</label><div class="tabbed-content">
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>device_id</th>
|
||
<th>fitbit_data</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>{“sleep”:[{“dateOfSleep”:”2020-10-10”,”duration”:3600000,”efficiency”:92,”endTime”:”2020-10-10T16:37:00.000”,”infoCode”:2,”isMainSleep”:false,”levels”:{“data”:[{“dateTime”:”2020-10-10T15:36:30.000”,”level”:”restless”,”seconds”:60},{“dateTime”:”2020-10-10T15:37:30.000”,”level”:”asleep”,”seconds”:660},{“dateTime”:”2020-10-10T15:48:30.000”,”level”:”restless”,”seconds”:60},…], “summary”:{“asleep”:{“count”:0,”minutes”:56},”awake”:{“count”:0,”minutes”:0},”restless”:{“count”:3,”minutes”:4}}},”logId”:26315914306,”minutesAfterWakeup”:0,”minutesAsleep”:55,”minutesAwake”:5,”minutesToFallAsleep”:0,”startTime”:”2020-10-10T15:36:30.000”,”timeInBed”:60,”type”:”classic”},{“dateOfSleep”:”2020-10-10”,”duration”:22980000,”efficiency”:88,”endTime”:”2020-10-10T08:10:00.000”,”infoCode”:0,”isMainSleep”:true,”levels”:{“data”:[{“dateTime”:”2020-10-10T01:46:30.000”,”level”:”light”,”seconds”:420},{“dateTime”:”2020-10-10T01:53:30.000”,”level”:”deep”,”seconds”:1230},{“dateTime”:”2020-10-10T02:14:00.000”,”level”:”light”,”seconds”:360},…], “summary”:{“deep”:{“count”:3,”minutes”:92,”thirtyDayAvgMinutes”:0},”light”:{“count”:29,”minutes”:193,”thirtyDayAvgMinutes”:0},”rem”:{“count”:4,”minutes”:33,”thirtyDayAvgMinutes”:0},”wake”:{“count”:28,”minutes”:65,”thirtyDayAvgMinutes”:0}}},”logId”:26311786557,”minutesAfterWakeup”:0,”minutesAsleep”:318,”minutesAwake”:65,”minutesToFallAsleep”:0,”startTime”:”2020-10-10T01:46:30.000”,”timeInBed”:383,”type”:”stages”}],”summary”:{“stages”:{“deep”:92,”light”:193,”rem”:33,”wake”:65},”totalMinutesAsleep”:373,”totalSleepRecords”:2,”totalTimeInBed”:443}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>{“sleep”:[{“dateOfSleep”:”2020-10-11”,”duration”:41640000,”efficiency”:89,”endTime”:”2020-10-11T11:47:00.000”,”infoCode”:0,”isMainSleep”:true,”levels”:{“data”:[{“dateTime”:”2020-10-11T00:12:30.000”,”level”:”wake”,”seconds”:450},{“dateTime”:”2020-10-11T00:20:00.000”,”level”:”light”,”seconds”:870},{“dateTime”:”2020-10-11T00:34:30.000”,”level”:”wake”,”seconds”:780},…], “summary”:{“deep”:{“count”:4,”minutes”:52,”thirtyDayAvgMinutes”:62},”light”:{“count”:32,”minutes”:442,”thirtyDayAvgMinutes”:364},”rem”:{“count”:6,”minutes”:68,”thirtyDayAvgMinutes”:58},”wake”:{“count”:29,”minutes”:132,”thirtyDayAvgMinutes”:94}}},”logId”:26589710670,”minutesAfterWakeup”:1,”minutesAsleep”:562,”minutesAwake”:132,”minutesToFallAsleep”:0,”startTime”:”2020-10-11T00:12:30.000”,”timeInBed”:694,”type”:”stages”}],”summary”:{“stages”:{“deep”:52,”light”:442,”rem”:68,”wake”:132},”totalMinutesAsleep”:562,”totalSleepRecords”:1,”totalTimeInBed”:694}}</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>{“sleep”:[{“dateOfSleep”:”2020-10-12”,”duration”:28980000,”efficiency”:93,”endTime”:”2020-10-12T09:34:30.000”,”infoCode”:0,”isMainSleep”:true,”levels”:{“data”:[{“dateTime”:”2020-10-12T01:31:00.000”,”level”:”wake”,”seconds”:600},{“dateTime”:”2020-10-12T01:41:00.000”,”level”:”light”,”seconds”:60},{“dateTime”:”2020-10-12T01:42:00.000”,”level”:”deep”,”seconds”:2340},…], “summary”:{“deep”:{“count”:4,”minutes”:63,”thirtyDayAvgMinutes”:59},”light”:{“count”:27,”minutes”:257,”thirtyDayAvgMinutes”:364},”rem”:{“count”:5,”minutes”:94,”thirtyDayAvgMinutes”:58},”wake”:{“count”:24,”minutes”:69,”thirtyDayAvgMinutes”:95}}},”logId”:26589710673,”minutesAfterWakeup”:0,”minutesAsleep”:415,”minutesAwake”:68,”minutesToFallAsleep”:0,”startTime”:”2020-10-12T01:31:00.000”,”timeInBed”:483,”type”:”stages”}],”summary”:{“stages”:{“deep”:63,”light”:257,”rem”:94,”wake”:69},”totalMinutesAsleep”:415,”totalSleepRecords”:1,”totalTimeInBed”:483}}</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
<input id="__tabbed_2_2" name="__tabbed_2" type="radio" /><label for="__tabbed_2_2">PLAIN_TEXT</label><div class="tabbed-content">
|
||
<p>All columns are mandatory, however, all except <code>device_id</code>, <code>local_date_time</code> and <code>duration</code> can be empty if you don’t have that data. Just have in mind that some features might be inaccurate or empty as <code>type_episode_id</code>, <code>level</code>, <code>is_main_sleep</code>, and <code>type</code> are used for sleep episodes extraction. <code>type_episode_id</code> is based on where it is extracted: if it is extracted from the 1<sup>st</sup> “data” and “shortData” block, the <code>type_episode_id</code> field will be 0. Similarly, the kth block will be k-1. Actually, you only need to make sure rows extracted from the same “minutesData” block are assigned with the same unique <code>type_episode_id</code> value.</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>device_id</th>
|
||
<th>type_episode_id</th>
|
||
<th>local_date_time</th>
|
||
<th>duration</th>
|
||
<th>level</th>
|
||
<th>is_main_sleep</th>
|
||
<th>type</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>0</td>
|
||
<td>2020-10-10 15:36:30</td>
|
||
<td>60</td>
|
||
<td>restless</td>
|
||
<td>0</td>
|
||
<td>classic</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>0</td>
|
||
<td>2020-10-10 15:37:30</td>
|
||
<td>660</td>
|
||
<td>asleep</td>
|
||
<td>0</td>
|
||
<td>classic</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>0</td>
|
||
<td>2020-10-10 15:48:30</td>
|
||
<td>60</td>
|
||
<td>restless</td>
|
||
<td>0</td>
|
||
<td>classic</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>…</td>
|
||
<td>…</td>
|
||
<td>…</td>
|
||
<td>…</td>
|
||
<td>…</td>
|
||
<td>…</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>1</td>
|
||
<td>2020-10-10 01:46:30</td>
|
||
<td>420</td>
|
||
<td>light</td>
|
||
<td>1</td>
|
||
<td>stages</td>
|
||
</tr>
|
||
<tr>
|
||
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
|
||
<td>1</td>
|
||
<td>2020-10-10 01:53:30</td>
|
||
<td>1230</td>
|
||
<td>deep</td>
|
||
<td>1</td>
|
||
<td>stages</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</details>
|
||
<h2 id="rapids-provider">RAPIDS provider<a class="headerlink" href="#rapids-provider" title="Permanent link">¶</a></h2>
|
||
<div class="admonition info">
|
||
<p class="admonition-title">Available time segments</p>
|
||
<ul>
|
||
<li>Available for all time segments</li>
|
||
</ul>
|
||
</div>
|
||
<div class="admonition info">
|
||
<p class="admonition-title">File Sequence</p>
|
||
<div class="highlight"><pre><span></span><code>- data/raw/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_raw.csv
|
||
- data/raw/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_parsed.csv
|
||
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_episodes_resampled.csv
|
||
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_episodes_resampled_with_datetime.csv
|
||
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_features/fitbit_sleep_intraday_<span class="o">{</span>language<span class="o">}</span>_<span class="o">{</span>provider_key<span class="o">}</span>.csv
|
||
- data/processed/features/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday.csv
|
||
</code></pre></div>
|
||
</div>
|
||
<p>Parameters description for <code>[FITBIT_SLEEP_INTRADAY][PROVIDERS][RAPIDS]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Key </th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><code>[COMPUTE]</code></td>
|
||
<td>Set to <code>True</code> to extract <code>FITBIT_SLEEP_INTRADAY</code> features from the <code>RAPIDS</code> provider</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>[FEATURES]</code></td>
|
||
<td>Features to be computed from sleep intraday data, see table below</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>[SLEEP_LEVELS]</code></td>
|
||
<td>Fitbit’s sleep API Version 1 only provides <code>CLASSIC</code> records. However, Version 1.2 provides 2 types of records: <code>CLASSIC</code> and <code>STAGES</code>. <code>STAGES</code> is only available in devices with a heart rate sensor and even those devices will fail to report it if the battery is low or the device is not tight enough. While <code>CLASSIC</code> contains 3 sleep levels (<code>awake</code>, <code>restless</code>, and <code>asleep</code>), <code>STAGES</code> contains 4 sleep levels (<code>wake</code>, <code>deep</code>, <code>light</code>, <code>rem</code>). To make it consistent, RAPIDS grouped them into 2 <code>UNIFIED</code> sleep levels: <code>awake</code> (<code>CLASSIC</code>: <code>awake</code> and <code>restless</code>; <code>STAGES</code>: <code>wake</code>) and <code>asleep</code> (<code>CLASSIC</code>: <code>asleep</code>; <code>STAGES</code>: <code>deep</code>, <code>light</code>, and <code>rem</code>).</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>[SLEEP_TYPES]</code></td>
|
||
<td>Types of sleep to be included in the feature extraction computation. Fitbit provides 2 types of sleep: <code>main</code>, <code>nap</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>[INCLUDE_SLEEP_LATER_THAN]</code></td>
|
||
<td>All resampled sleep rows (bin interval: one minute) that started after this time will be included in the feature computation. It is a number ranging from 0 (midnight) to 1439 (23:59) which denotes the number of minutes after midnight. If a segment is longer than one day, this value is for every day.</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>[REFERENCE_TIME]</code></td>
|
||
<td>The reference point from which the <code>[ROUTINE]</code> features are to be computed. Chosen from <code>MIDNIGHT</code> and <code>START_OF_THE_SEGMENT</code>, default is <code>MIDNIGHT</code>. If you have multiple time segments per day it might be more informative to set this flag to <code>START_OF_THE_SEGMENT</code>.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>Features description for <code>[FITBIT_STEPS_INTRADAY][PROVIDERS][RAPIDS][LEVELS_AND_TYPES]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Feature </th>
|
||
<th>Units</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>countepisode<code>[LEVEL][TYPE]</code></td>
|
||
<td>episodes</td>
|
||
<td>Number of <code>[LEVEL][TYPE]</code>sleep episodes. <code>[LEVEL]</code>is one of <code>[SLEEP_LEVELS]</code> (e.g. awake-classic or rem-stages) and <code>[TYPE]</code> is one of <code>[SLEEP_TYPES]</code> (e.g. main). Both <code>[LEVEL]</code>and <code>[TYPE]</code> can also be <code>all</code> when <code>LEVELS_AND_TYPES_COMBINING_ALL</code> is True, which ignores the levels and groups by sleep types.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>sumduration<code>[LEVEL][TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Total duration of all <code>[LEVEL][TYPE]</code>sleep episodes. <code>[LEVEL]</code>is one of <code>[SLEEP_LEVELS]</code> (e.g. awake-classic or rem-stages) and <code>[TYPE]</code> is one of <code>[SLEEP_TYPES]</code> (e.g. main). Both <code>[LEVEL]</code> and <code>[TYPE]</code>can also be <code>all</code> when <code>LEVELS_AND_TYPES_COMBINING_ALL</code> is True, which ignores the levels and groups by sleep types.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>maxduration<code>[LEVEL][TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Longest duration of any <code>[LEVEL][TYPE]</code>sleep episode. <code>[LEVEL]</code>is one of <code>[SLEEP_LEVELS]</code> (e.g. awake-classic or rem-stages) and <code>[TYPE]</code> is one of <code>[SLEEP_TYPES]</code> (e.g. main). Both <code>[LEVEL]</code> and <code>[TYPE]</code>can also be <code>all</code> when <code>LEVELS_AND_TYPES_COMBINING_ALL</code> is True, which ignores the levels and groups by sleep types.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>minduration<code>[LEVEL][TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Shortest duration of any <code>[LEVEL][TYPE]</code>sleep episode. <code>[LEVEL]</code>is one of <code>[SLEEP_LEVELS]</code> (e.g. awake-classic or rem-stages) and <code>[TYPE]</code> is one of <code>[SLEEP_TYPES]</code> (e.g. main). Both <code>[LEVEL]</code> and <code>[TYPE]</code>can also be <code>all</code> when <code>LEVELS_AND_TYPES_COMBINING_ALL</code> is True, which ignores the levels and groups by sleep types.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>avgduration<code>[LEVEL][TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Average duration of all <code>[LEVEL][TYPE]</code>sleep episodes. <code>[LEVEL]</code>is one of <code>[SLEEP_LEVELS]</code> (e.g. awake-classic or rem-stages) and <code>[TYPE]</code> is one of <code>[SLEEP_TYPES]</code> (e.g. main). Both <code>[LEVEL]</code> and <code>[TYPE]</code>can also be <code>all</code> when <code>LEVELS_AND_TYPES_COMBINING_ALL</code> is True, which ignores the levels and groups by sleep types.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>medianduration<code>[LEVEL][TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Median duration of all <code>[LEVEL][TYPE]</code>sleep episodes. <code>[LEVEL]</code>is one of <code>[SLEEP_LEVELS]</code> (e.g. awake-classic or rem-stages) and <code>[TYPE]</code> is one of <code>[SLEEP_TYPES]</code> (e.g. main). Both <code>[LEVEL]</code> and <code>[TYPE]</code>can also be <code>all</code> when <code>LEVELS_AND_TYPES_COMBINING_ALL</code> is True, which ignores the levels and groups by sleep types.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>stdduration<code>[LEVEL][TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Standard deviation duration of all <code>[LEVEL][TYPE]</code>sleep episodes. <code>[LEVEL]</code>is one of <code>[SLEEP_LEVELS]</code> (e.g. awake-classic or rem-stages) and <code>[TYPE]</code> is one of <code>[SLEEP_TYPES]</code> (e.g. main). Both <code>[LEVEL]</code> and <code>[TYPE]</code>can also be <code>all</code> when <code>LEVELS_AND_TYPES_COMBINING_ALL</code> is True, which ignores the levels and groups by sleep types.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>Features description for <code>[FITBIT_STEPS_INTRADAY][PROVIDERS][RAPIDS]</code> RATIOS <code>[ACROSS_LEVELS]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Feature </th>
|
||
<th>Units</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>ratiocount<code>[LEVEL]</code></td>
|
||
<td>-</td>
|
||
<td>Ratio between the <strong>count</strong> of episodes of a single sleep <code>[LEVEL]</code> and the <strong>count</strong> of all episodes of all levels during both <code>main</code> and <code>nap</code> sleep types. This answers the question: what percentage of all <code>wake</code>, <code>deep</code>, <code>light</code>, and <code>rem</code> episodes were <code>rem</code>? (e.g., <span class="arithmatex">\(countepisode[remstages][all] / countepisode[all][all]\)</span>)</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ratioduration<code>[LEVEL]</code></td>
|
||
<td>-</td>
|
||
<td>Ratio between the <strong>duration</strong> of episodes of a single sleep <code>[LEVEL]</code> and the <strong>duration</strong> of all episodes of all levels during both <code>main</code> and <code>nap</code> sleep types. This answers the question: what percentage of all <code>wake</code>, <code>deep</code>, <code>light</code>, and <code>rem</code> time was <code>rem</code>? (e.g., <span class="arithmatex">\(sumduration[remstages][all] / sumduration[all][all]\)</span>)</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>Features description for <code>[FITBIT_STEPS_INTRADAY][PROVIDERS][RAPIDS]</code> RATIOS <code>[ACROSS_TYPES]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Feature </th>
|
||
<th>Units</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>ratiocountmain</td>
|
||
<td>-</td>
|
||
<td>Ratio between the <strong>count</strong> of all <code>main</code> episodes (independently of the levels inside) divided by the <strong>count</strong> of all <code>main</code> and <code>nap</code> episodes. This answers the question: what percentage of all sleep episodes (<code>main</code> and <code>nap</code>) were <code>main</code>? We do not provide the ratio for <code>nap</code> because is complementary. (<span class="arithmatex">\(countepisode[all][main] / countepisode[all][all]\)</span>)</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ratiodurationmain</td>
|
||
<td>-</td>
|
||
<td>Ratio between the <strong>duration</strong> of all <code>main</code> episodes (independently of the levels inside) divided by the <strong>duration</strong> of all <code>main</code> and <code>nap</code> episodes. This answers the question: what percentage of all sleep time (<code>main</code> and <code>nap</code>) was <code>main</code>? We do not provide the ratio for <code>nap</code> because is complementary. (<span class="arithmatex">\(sumduration[all][main] / sumduration[all][all]\)</span>)</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>Features description for <code>[FITBIT_STEPS_INTRADAY][PROVIDERS][RAPIDS]</code> RATIOS <code>[WITHIN_LEVELS]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Feature </th>
|
||
<th>Units</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>ratiocount<code>[TYPE]</code>within<code>[LEVEL]</code></td>
|
||
<td>-</td>
|
||
<td>Ratio between the <strong>count</strong> of episodes of a single sleep <code>[LEVEL]</code> during <code>main</code> sleep divided by the <strong>count</strong> of episodes of a single sleep <code>[LEVEL]</code> during <code>main</code> <strong>and</strong> <code>nap</code>. This answers the question: are <code>rem</code> episodes more frequent during <code>main</code> than <code>nap</code> sleep? We do not provide the ratio for <code>nap</code> because is complementary. (<span class="arithmatex">\(countepisode[remstages][main] / countepisode[remstages][all]\)</span>)</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ratioduration<code>[TYPE]</code>within<code>[LEVEL]</code></td>
|
||
<td>-</td>
|
||
<td>Ratio between the <strong>duration</strong> of episodes of a single sleep <code>[LEVEL]</code> during <code>main</code> sleep divided by the <strong>duration</strong> of episodes of a single sleep <code>[LEVEL]</code> during <code>main</code> <strong>and</strong> <code>nap</code>. This answers the question: is <code>rem</code> time more frequent during <code>main</code> than <code>nap</code> sleep? We do not provide the ratio for <code>nap</code> because is complementary. (<span class="arithmatex">\(countepisode[remstages][main] / countepisode[remstages][all]\)</span>)</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>Features description for <code>[FITBIT_STEPS_INTRADAY][PROVIDERS][RAPIDS]</code> RATIOS <code>[WITHIN_TYPES]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Feature </th>
|
||
<th>Units</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>ratiocount<code>[LEVEL]</code>within<code>[TYPE]</code></td>
|
||
<td>-</td>
|
||
<td>Ratio between the <strong>count</strong> of episodes of a single sleep <code>[LEVEL]</code> and the <strong>count</strong> of all episodes of all levels during either <code>main</code> or <code>nap</code> sleep types. This answers the question: what percentage of all <code>wake</code>, <code>deep</code>, <code>light</code>, and <code>rem</code> episodes were <code>rem</code> during <code>main</code>/<code>nap</code> sleep time? (e.g., <span class="arithmatex">\(countepisode[remstages][main] / countepisode[all][main]\)</span>)</td>
|
||
</tr>
|
||
<tr>
|
||
<td>ratioduration<code>[LEVEL]</code>within<code>[TYPE]</code></td>
|
||
<td>-</td>
|
||
<td>Ratio between the <strong>duration</strong> of episodes of a single sleep <code>[LEVEL]</code> and the <strong>duration</strong> of all episodes of all levels during either <code>main</code> or <code>nap</code> sleep types. This answers the question: what percentage of all <code>wake</code>, <code>deep</code>, <code>light</code>, and <code>rem</code> time was <code>rem</code> during <code>main</code>/<code>nap</code> sleep time? (e.g., <span class="arithmatex">\(sumduration[remstages][main] / sumduration[all][main]\)</span>)</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>Features description for <code>[FITBIT_STEPS_INTRADAY][PROVIDERS][RAPIDS][ROUTINE]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Feature</th>
|
||
<th>Units</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>starttimefirstmainsleep</td>
|
||
<td>minutes</td>
|
||
<td>Start time (in minutes since <code>REFERENCE_TIME</code>) of the first main sleep episode after <code>INCLUDE_EPISODES_LATER_THAN</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>endtimelastmainsleep</td>
|
||
<td>minutes</td>
|
||
<td>End time (in minutes since <code>REFERENCE_TIME</code>) of the last main sleep episode after <code>INCLUDE_EPISODES_LATER_THAN</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>starttimefirstnap</td>
|
||
<td>minutes</td>
|
||
<td>Start time (in minutes since <code>REFERENCE_TIME</code>) of the first nap episode after <code>INCLUDE_EPISODES_LATER_THAN</code>.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>endtimelastnap</td>
|
||
<td>minutes</td>
|
||
<td>End time (in minutes since <code>REFERENCE_TIME</code>) of the last nap episode after <code>INCLUDE_EPISODES_LATER_THAN</code>.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Assumptions/Observations</p>
|
||
<ol>
|
||
<li>Deleting values from <code>[SLEEP_LEVELS]</code> or <code>[SLEEP_TYPES]</code> will only change the features you receive from <code>[LEVELS_AND_TYPES]</code>. For example if <code>STAGES</code> only contains <code>[rem, light]</code> you will not receive <code>countepisode[wake|deep][TYPE]</code> or sum, max, min, avg, median, or std <code>duration</code>. These values will not influence <code>RATIOS</code> or <code>ROUTINE</code> features.</li>
|
||
<li>Any <code>[LEVEL]</code> grouping is done within the elements of each class <code>CLASSIC</code>, <code>STAGES</code>, and <code>UNIFIED</code>. That is, we never combine <code>CLASSIC</code> or <code>STAGES</code> types to compute features when <code>LEVELS_AND_TYPES_COMBINING_ALL</code> is True or when computing <code>RATIOS</code>.</li>
|
||
</ol>
|
||
</div>
|
||
<h2 id="price-provider">PRICE provider<a class="headerlink" href="#price-provider" title="Permanent link">¶</a></h2>
|
||
<div class="admonition info">
|
||
<p class="admonition-title">Available time segments</p>
|
||
<ul>
|
||
<li>Available for any time segments larger or equal to one day</li>
|
||
</ul>
|
||
</div>
|
||
<div class="admonition info">
|
||
<p class="admonition-title">File Sequence</p>
|
||
<div class="highlight"><pre><span></span><code>- data/raw/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_raw.csv
|
||
- data/raw/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_parsed.csv
|
||
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_episodes_resampled.csv
|
||
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_episodes_resampled_with_datetime.csv
|
||
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday_features/fitbit_sleep_intraday_<span class="o">{</span>language<span class="o">}</span>_<span class="o">{</span>provider_key<span class="o">}</span>.csv
|
||
- data/processed/features/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_intraday.csv
|
||
</code></pre></div>
|
||
</div>
|
||
<p>Parameters description for <code>[FITBIT_SLEEP_INTRADAY][PROVIDERS][PRICE]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Key </th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><code>[COMPUTE]</code></td>
|
||
<td>Set to <code>True</code> to extract <code>FITBIT_SLEEP_INTRADAY</code> features from the <code>PRICE</code> provider</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>[FEATURES]</code></td>
|
||
<td>Features to be computed from sleep intraday data, see table below</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>[SLEEP_LEVELS]</code></td>
|
||
<td>Fitbit’s sleep API Version 1 only provides <code>CLASSIC</code> records. However, Version 1.2 provides 2 types of records: <code>CLASSIC</code> and <code>STAGES</code>. <code>STAGES</code> is only available in devices with a heart rate sensor and even those devices will fail to report it if the battery is low or the device is not tight enough. While <code>CLASSIC</code> contains 3 sleep levels (<code>awake</code>, <code>restless</code>, and <code>asleep</code>), <code>STAGES</code> contains 4 sleep levels (<code>wake</code>, <code>deep</code>, <code>light</code>, <code>rem</code>). To make it consistent, RAPIDS grouped them into 2 <code>UNIFIED</code> sleep levels: <code>awake</code> (<code>CLASSIC</code>: <code>awake</code> and <code>restless</code>; <code>STAGES</code>: <code>wake</code>) and <code>asleep</code> (<code>CLASSIC</code>: <code>asleep</code>; <code>STAGES</code>: <code>deep</code>, <code>light</code>, and <code>rem</code>).</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>[DAY_TYPE]</code></td>
|
||
<td>The features of this provider can be computed using daily averages/standard deviations that were extracted on <code>WEEKEND</code> days only, <code>WEEK</code> days only, or <code>ALL</code> days</td>
|
||
</tr>
|
||
<tr>
|
||
<td><code>[GROUP_EPISODES_WITHIN]</code></td>
|
||
<td>This parameter contains 2 values: <code>[START_TIME]</code> and <code>[LENGTH]</code>. Only <code>main</code> sleep episodes that intersect or contain the period between [<code>START_TIME</code>, <code>START_TIME</code> + <code>LENGTH</code>] are taken into account to compute the features described below. Both <code>[START_TIME]</code> and <code>[LENGTH]</code> are in minutes. <code>[START_TIME]</code> is a number ranging from 0 (midnight) to 1439 (23:59) which denotes the number of minutes after midnight. <code>[LENGTH]</code> is a number smaller than 1440 (24 hours).</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>Features description for <code>[FITBIT_STEPS_INTRADAY][PROVIDERS][PRICE]</code>:</p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>Feature </th>
|
||
<th>Units</th>
|
||
<th>Description</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>avgduration<code>[LEVEL]</code>main<code>[DAY_TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Average duration of daily <code>LEVEL</code> sleep episodes. You can include daily average that were computed on weekend days, week days or both depending on the value of the <code>DAY_TYPE</code> flag.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>avgratioduration<code>[LEVEL]</code>withinmain<code>[DAY_TYPE]</code></td>
|
||
<td>-</td>
|
||
<td>Average ratio between daily <code>LEVEL</code> time and in-bed time inferred from <code>main</code> sleep episodes. <code>LEVEL</code> is one of <code>SLEEP_LEVELS</code> (e.g. awake-classic or rem-stages). In-bed time is the total duration of all <code>main</code> sleep episodes for each day. You can include daily ratios that were computed on weekend days, week days or both depending on the value of the <code>DAY_TYPE</code> flag.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>avgstarttimeofepisodemain<code>[DAY_TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Average start time of the first <code>main</code> sleep episode of each day in a time segment. You can include daily start times from episodes detected on weekend days, week days or both depending on the value of the <code>DAY_TYPE</code> flag.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>avgendtimeofepisodemain<code>[DAY_TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Average end time of the last <code>main</code> sleep episode of each day in a time segment. You can include daily end times from episodes detected on weekend days, week days or both depending on the value of the <code>DAY_TYPE</code> flag.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>avgmidpointofepisodemain<code>[DAY_TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Average mid time between the start of the first <code>main</code> sleep episode and the end of the last <code>main</code> sleep episode of each day in a time segment. You can include episodes detected on weekend days, week days or both depending on the value of the <code>DAY_TYPE</code> flag.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>stdstarttimeofepisodemain<code>[DAY_TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Standard deviation of start time of the first <code>main</code> sleep episode of each day in a time segment. You can include daily start times from episodes detected on weekend days, week days or both depending on the value of the <code>DAY_TYPE</code> flag.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>stdendtimeofepisodemain<code>[DAY_TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Standard deviation of end time of the last <code>main</code> sleep episode of each day in a time segment. You can include daily end times from episodes detected on weekend days, week days or both depending on the value of the <code>DAY_TYPE</code> flag.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>stdmidpointofepisodemain<code>[DAY_TYPE]</code></td>
|
||
<td>minutes</td>
|
||
<td>Standard deviation of mid time between the start of the first <code>main</code> sleep episode and the end of the last <code>main</code> sleep episode of each day in a time segment. You can include episodes detected on weekend days, week days or both depending on the value of the <code>DAY_TYPE</code> flag.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>socialjetlag</td>
|
||
<td>minutes</td>
|
||
<td>Difference in minutes between the avgmidpointofepisodemain (average mid time between bedtime and wake time) of weekends and weekdays.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>meanssdstarttimeofepisodemain</td>
|
||
<td>minutes squared</td>
|
||
<td>Same as <code>avgstarttimeofepisodemain[DAY_TYPE]</code> but the average is computed over the squared differences of each pair of consecutive start times.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>meanssdendtimeofepisodemain</td>
|
||
<td>minutes squared</td>
|
||
<td>Same as <code>avgendtimeofepisodemain[DAY_TYPE]</code> but the average is computed over the squared differences of each pair of consecutive end times.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>meanssdmidpointofepisodemain</td>
|
||
<td>minutes squared</td>
|
||
<td>Same as <code>avgmidpointofepisodemain[DAY_TYPE]</code> but the average is computed over the squared differences of each pair of consecutive mid times.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>medianssdstarttimeofepisodemain</td>
|
||
<td>minutes squared</td>
|
||
<td>Same as <code>avgstarttimeofepisodemain[DAY_TYPE]</code> but the median is computed over the squared differences of each pair of consecutive start times.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>medianssdendtimeofepisodemain</td>
|
||
<td>minutes squared</td>
|
||
<td>Same as <code>avgendtimeofepisodemain[DAY_TYPE]</code> but the median is computed over the squared differences of each pair of consecutive end times.</td>
|
||
</tr>
|
||
<tr>
|
||
<td>medianssdmidpointofepisodemain</td>
|
||
<td>minutes squared</td>
|
||
<td>Same as <code>avgmidpointofepisodemain[DAY_TYPE]</code> but the median is computed over the squared differences of each pair of consecutive mid times.</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="admonition note">
|
||
<p class="admonition-title">Assumptions/Observations</p>
|
||
<ol>
|
||
<li>These features are based on descriptive statistics computed across daily values (start/end/mid times of sleep episodes). This is the reason why they are only available on time segments that are longer than 24 hours (we need at least 1 day to get the average).</li>
|
||
<li>Even though Fitbit provides 2 types of sleep episodes (<code>main</code> and <code>nap</code>), only <code>main</code> sleep episodes are considered.</li>
|
||
<li>
|
||
<p>How do we assign sleep episodes to specific dates?</p>
|
||
<p><code>START_TIME</code> and <code>LENGTH</code> control the dates that sleep episodes belong to. For a pair of <code>[START_TIME]</code> and <code>[LENGTH]</code>, sleep episodes (blue boxes) can only be placed at the following places:</p>
|
||
<p><figure>
|
||
<img src="../../img/features_fitbit_sleep_intraday.png" max-width="100%" />
|
||
<figcaption>Relationship between sleep episodes and the given times<code>([START_TIME], [LENGTH])</code></figcaption>
|
||
</figure></p>
|
||
<ul>
|
||
<li>
|
||
<p>If the end time of a sleep episode is before <code>[START_TIME]</code>, it will belong to the day before its start date (e.g. sleep episode #1).</p>
|
||
</li>
|
||
<li>
|
||
<p>if (1) the start time or the end time of a sleep episode are between (overlap) <code>[START_TIME]</code> and <code>[START_TIME] + [LENGTH]</code> or (2) the start time is before <code>[START_TIME]</code> and the end time is after <code>[START_TIME] + [LENGTH]</code>, it will belong to its start date (e.g. sleep episode #2, #3, #4, #5).</p>
|
||
</li>
|
||
<li>
|
||
<p>If the start time of a sleep episode is after <code>START_TIME] + [LENGTH]</code>, it will belong to the day after its start date (e.g. sleep episode #6).</p>
|
||
</li>
|
||
</ul>
|
||
<p>Only <code>main</code> sleep episodes that intersect or contain the period between <code>[START_TIME]</code> and <code>[START_TIME] + [LENGTH]</code> will be included in the feature computation. If we process the following <code>main</code> sleep episodes: </p>
|
||
<table>
|
||
<thead>
|
||
<tr>
|
||
<th>episode</th>
|
||
<th>start</th>
|
||
<th>end</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>1</td>
|
||
<td>2021-02-01 12:00</td>
|
||
<td>2021-02-01 15:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>2</td>
|
||
<td>2021-02-01 21:00</td>
|
||
<td>2021-02-02 03:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>3</td>
|
||
<td>2021-02-02 05:00</td>
|
||
<td>2021-02-02 08:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>4</td>
|
||
<td>2021-02-02 11:00</td>
|
||
<td>2021-02-02 14:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>5</td>
|
||
<td>2021-02-02 19:00</td>
|
||
<td>2021-02-03 06:00</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<p>And our parameters:</p>
|
||
<ul>
|
||
<li>
|
||
<p><code>[INCLUDE_EPISODES_INTERSECTING][START_TIME]</code> = 1320 (today’s 22:00)</p>
|
||
</li>
|
||
<li>
|
||
<p><code>[INCLUDE_EPISODES_INTERSECTING][LENGTH]</code> = 720 (tomorrow’s 10:00, or 22:00 + 12 hours)</p>
|
||
</li>
|
||
</ul>
|
||
<p>Only sleep episodes 2, 3,and 5 would be considered.</p>
|
||
</li>
|
||
<li>
|
||
<p>Time related features represent the number of minutes between the start/end/midpoint of sleep episodes and the assigned day’s midnight.</p>
|
||
</li>
|
||
<li>
|
||
<p>All <code>main</code> sleep episodes are chunked within the requested <a href="../../setup/configuration/#time-segments">time segments</a> which need to be at least 24 hours or more long (1, 2, 3, 7 days, etc.). Then, daily features will be extracted and averaged across the length of the time segment, for example:</p>
|
||
<p>The daily features extracted on 2021-02-01 will be:</p>
|
||
<ul>
|
||
<li>
|
||
<p>starttimeofepisodemain (bedtime) is <code>21 * 60</code> (episode 2 start time 2021-02-01 21:00)</p>
|
||
</li>
|
||
<li>
|
||
<p>endtimeofepisodemain (wake time) is <code>32 * 60</code>(episode 3 end time 2021-02-02 08:00 + 24)</p>
|
||
</li>
|
||
<li>
|
||
<p>midpointofepisodemain (midpoint sleep) is <code>[(21 * 60) + (32 * 60)] / 2</code></p>
|
||
</li>
|
||
</ul>
|
||
<p>The daily features extracted on 2021-02-02 will be:</p>
|
||
<ul>
|
||
<li>
|
||
<p>starttimeofepisodemain (bedtime) is <code>19 * 60</code> (episode 5 start time 2021-02-01 19:00)</p>
|
||
</li>
|
||
<li>
|
||
<p>endtimeofepisodemain (wake time) is <code>30 * 60</code>(episode 5 end time 2021-02-03 06:00 + 24)</p>
|
||
</li>
|
||
<li>
|
||
<p>midpointofepisodemain (midpoint sleep) is <code>[(19 * 60) + (30 * 60)] / 2</code></p>
|
||
</li>
|
||
</ul>
|
||
<p>And <code>avgstarttimeofepisodemain[DAY_TYPE]</code> will be <code>([21 * 60] + [19 * 60]) / 2</code> </p>
|
||
</li>
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</article>
|
||
</div>
|
||
</div>
|
||
</main>
|
||
|
||
|
||
<footer class="md-footer">
|
||
|
||
<nav class="md-footer__inner md-grid" aria-label="Footer">
|
||
|
||
<a href="../fitbit-sleep-summary/" class="md-footer__link md-footer__link--prev" rel="prev">
|
||
<div class="md-footer__button md-icon">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
||
</div>
|
||
<div class="md-footer__title">
|
||
<div class="md-ellipsis">
|
||
<span class="md-footer__direction">
|
||
Previous
|
||
</span>
|
||
Fitbit Sleep Summary
|
||
</div>
|
||
</div>
|
||
</a>
|
||
|
||
|
||
<a href="../fitbit-steps-summary/" class="md-footer__link md-footer__link--next" rel="next">
|
||
<div class="md-footer__title">
|
||
<div class="md-ellipsis">
|
||
<span class="md-footer__direction">
|
||
Next
|
||
</span>
|
||
Fitbit Steps Summary
|
||
</div>
|
||
</div>
|
||
<div class="md-footer__button md-icon">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
|
||
</div>
|
||
</a>
|
||
|
||
</nav>
|
||
|
||
<div class="md-footer-meta md-typeset">
|
||
<div class="md-footer-meta__inner md-grid">
|
||
<div class="md-footer-copyright">
|
||
|
||
<div class="md-footer-copyright__highlight">
|
||
Released under AGPL
|
||
</div>
|
||
|
||
|
||
Made with
|
||
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||
Material for MkDocs Insiders
|
||
</a>
|
||
|
||
</div>
|
||
|
||
<div class="md-footer-social">
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<a href="https://twitter.com/julio_ui" target="_blank" rel="noopener" title="twitter.com" class="md-footer-social__link">
|
||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"/></svg>
|
||
</a>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</footer>
|
||
|
||
</div>
|
||
|
||
<script src="../../assets/javascripts/vendor.191088e8.min.js"></script>
|
||
<script src="../../assets/javascripts/bundle.d4cf0930.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
|
||
|
||
<script>
|
||
app = initialize({
|
||
base: "../..",
|
||
features: ["navigation.sections", "search.suggest", "search.highlight"],
|
||
search: Object.assign({
|
||
worker: "../../assets/javascripts/worker/search.e77c40e2.min.js"
|
||
}, typeof search !== "undefined" && search),
|
||
version: {"method": "mike"}
|
||
})
|
||
</script>
|
||
|
||
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
|
||
|
||
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
|
||
|
||
<script src="../../javascripts/extra.js"></script>
|
||
|
||
|
||
</body>
|
||
</html> |