rapids/latest/features/fitbit-sleep-summary/index.html

1404 lines
49 KiB
HTML
Raw Normal View History

<!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="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.1.4+insiders-1.9.0">
<title>Fitbit Sleep Summary - RAPIDS</title>
<link rel="stylesheet" href="../../assets/stylesheets/main.a2a6bca7.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.c308bc62.min.css">
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
<style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</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(void 0!==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-summary" 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-nav md-grid" aria-label="Header">
<a href="../.." title="RAPIDS" class="md-header-nav__button md-logo" aria-label="RAPIDS">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 18.31V20a2 2 0 01-2 2H7a2 2 0 01-2-2v-3.7c-.46-.18-1.05-.3-2-.3a1 1 0 01-1-1 1 1 0 011-1c.82 0 1.47.08 2 .21V12.3c-.46-.18-1.05-.3-2-.3a1 1 0 01-1-1 1 1 0 011-1c.82 0 1.47.08 2 .21V8.3C4.54 8.12 3.95 8 3 8a1 1 0 01-1-1 1 1 0 011-1c.82 0 1.47.08 2 .21V4a2 2 0 012-2h10a2 2 0 012 2v2.16c1.78.31 2.54.97 2.71 1.13.39.39.39 1.03 0 1.42-.39.39-.91.38-1.42 0 0 0-1.04-.71-3.29-.71-1.26 0-2.09.41-3.05.9-1.04.51-2.21 1.1-3.95 1.1-.36 0-.69 0-1-.04V7.95c.3.05.63.05 1 .05 1.26 0 2.09-.41 3.05-.89C14.09 6.59 15.27 6 17 6V4H7v16h10v-2c1.5 0 1.97.29 2 .31M17 10c-1.73 0-2.91.59-3.95 1.11-.96.48-1.79.89-3.05.89-.37 0-.7 0-1-.05v2.01c.31.04.64.04 1 .04 1.74 0 2.91-.59 3.95-1.1.96-.48 1.79-.9 3.05-.9 2.25 0 3.29.71 3.29.71.51.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.42C21.5 11.08 20.25 10 17 10m0 4c-1.73 0-2.91.59-3.95 1.11-.96.48-1.79.89-3.05.89-.37 0-.7 0-1-.05v2.01c.31.04.64.04 1 .04 1.74 0 2.91-.59 3.95-1.1.96-.48 1.79-.9 3.05-.9 2.25 0 3.29.71 3.29.71.51.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.42C21.5 15.08 20.25 14 17 14z"/></svg>
</a>
<label class="md-header-nav__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-nav__title" data-md-component="header-title">
<div class="md-header-nav__ellipsis">
<div class="md-header-nav__topic">
<span class="md-ellipsis">
RAPIDS
</span>
</div>
<div class="md-header-nav__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Fitbit Sleep Summary
</span>
</div>
</div>
</div>
<div class="md-header-nav__options">
<button class="md-header-nav__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-nav__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-nav__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">
<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>
<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>
<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-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>
</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">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 18.31V20a2 2 0 01-2 2H7a2 2 0 01-2-2v-3.7c-.46-.18-1.05-.3-2-.3a1 1 0 01-1-1 1 1 0 011-1c.82 0 1.47.08 2 .21V12.3c-.46-.18-1.05-.3-2-.3a1 1 0 01-1-1 1 1 0 011-1c.82 0 1.47.08 2 .21V8.3C4.54 8.12 3.95 8 3 8a1 1 0 01-1-1 1 1 0 011-1c.82 0 1.47.08 2 .21V4a2 2 0 012-2h10a2 2 0 012 2v2.16c1.78.31 2.54.97 2.71 1.13.39.39.39 1.03 0 1.42-.39.39-.91.38-1.42 0 0 0-1.04-.71-3.29-.71-1.26 0-2.09.41-3.05.9-1.04.51-2.21 1.1-3.95 1.1-.36 0-.69 0-1-.04V7.95c.3.05.63.05 1 .05 1.26 0 2.09-.41 3.05-.89C14.09 6.59 15.27 6 17 6V4H7v16h10v-2c1.5 0 1.97.29 2 .31M17 10c-1.73 0-2.91.59-3.95 1.11-.96.48-1.79.89-3.05.89-.37 0-.7 0-1-.05v2.01c.31.04.64.04 1 .04 1.74 0 2.91-.59 3.95-1.1.96-.48 1.79-.9 3.05-.9 2.25 0 3.29.71 3.29.71.51.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.42C21.5 11.08 20.25 10 17 10m0 4c-1.73 0-2.91.59-3.95 1.11-.96.48-1.79.89-3.05.89-.37 0-.7 0-1-.05v2.01c.31.04.64.04 1 .04 1.74 0 2.91-.59 3.95-1.1.96-.48 1.79-.9 3.05-.9 2.25 0 3.29.71 3.29.71.51.39 1.03.39 1.42 0 .39-.39.39-1.02 0-1.42C21.5 15.08 20.25 14 17 14z"/></svg>
</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">
Initial Configuration
</a>
</li>
<li class="md-nav__item">
<a href="../../setup/execution/" class="md-nav__link">
Execution
</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>
</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-data-quality/" class="md-nav__link">
Phone Data Quality
</a>
</li>
<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-foreground/" class="md-nav__link">
Phone Applications Foreground
</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-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-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 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 Summary
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
Fitbit Sleep Summary
</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>
</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">
<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">
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-5">
<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/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>
</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">
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-6">
<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="../../faq/" class="md-nav__link">
Frequently Asked Questions
</a>
</li>
<li class="md-nav__item">
<a href="../../team/" class="md-nav__link">
Team
</a>
</li>
<li class="md-nav__item">
<a href="../../citation/" class="md-nav__link">
Citation
</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>
</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-summary.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-summary">Fitbit Sleep Summary<a class="headerlink" href="#fitbit-sleep-summary" title="Permanent link">&para;</a></h1>
<p>Sensor parameters description for <code>[FITBIT_SLEEP_SUMMARY]</code>:</p>
<table>
<thead>
<tr>
<th>Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>[TABLE]</code></td>
<td>Database table name or file path where the sleep summary data is stored. Source data type and column format are defined in <a href="../../setup/configuration/#device-data-source-configuration">Device Data Source Configuration</a>.</td>
</tr>
</tbody>
</table>
<p>Column format could be <code>JSON</code> or <code>PLAIN_TEXT</code>. Data with <code>JSON</code> column format is obtained from Fitbit API directly. Summary data and intraday data come together in <code>JSON</code> format. Each row doesn&rsquo;t have to contain the data for a single day as it depends on the way Fitbit API is queried. Examples of the source data with two formats are as follows. Data with <code>JSON</code> format is chunked.</p>
<details class="example"><summary>Example of the structure of source data with Fitbits 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>{&ldquo;sleep&rdquo;: [{&ldquo;awakeCount&rdquo;: 2, &ldquo;awakeDuration&rdquo;: 3, &ldquo;awakeningsCount&rdquo;: 10, &ldquo;dateOfSleep&rdquo;: &ldquo;2020-10-07&rdquo;, &ldquo;duration&rdquo;: 8100000, &ldquo;efficiency&rdquo;: 91, &ldquo;endTime&rdquo;: &ldquo;2020-10-07T18:10:00.000&rdquo;, &ldquo;isMainSleep&rdquo;: true, &ldquo;logId&rdquo;: 14147921940, &ldquo;minuteData&rdquo;: [{&ldquo;dateTime&rdquo;: &ldquo;15:55:00&rdquo;, &ldquo;value&rdquo;: &ldquo;3&rdquo;}, {&ldquo;dateTime&rdquo;: &ldquo;15:56:00&rdquo;, &ldquo;value&rdquo;: &ldquo;3&rdquo;}, {&ldquo;dateTime&rdquo;: &ldquo;15:57:00&rdquo;, &ldquo;value&rdquo;: &ldquo;2&rdquo;},&hellip;], &ldquo;minutesAfterWakeup&rdquo;: 0, &ldquo;minutesAsleep&rdquo;: 123, &ldquo;minutesAwake&rdquo;: 12, &ldquo;minutesToFallAsleep&rdquo;: 0, &ldquo;restlessCount&rdquo;: 8, &ldquo;restlessDuration&rdquo;: 9, &ldquo;startTime&rdquo;: &ldquo;2020-10-07T15:55:00.000&rdquo;, &ldquo;timeInBed&rdquo;: 135}, {&ldquo;awakeCount&rdquo;: 0, &ldquo;awakeDuration&rdquo;: 0, &ldquo;awakeningsCount&rdquo;: 1, &ldquo;dateOfSleep&rdquo;: &ldquo;2020-10-07&rdquo;, &ldquo;duration&rdquo;: 3780000, &ldquo;efficiency&rdquo;: 100, &ldquo;endTime&rdquo;: &ldquo;2020-10-07T10:52:30.000&rdquo;, &ldquo;isMainSleep&rdquo;: false, &ldquo;logId&rdquo;: 14144903977, &ldquo;minuteData&rdquo;: [{&ldquo;dateTime&rdquo;: &ldquo;09:49:00&rdquo;, &ldquo;value&rdquo;: &ldquo;1&rdquo;}, {&ldquo;dateTime&rdquo;: &ldquo;09:50:00&rdquo;, &ldquo;value&rdquo;: &ldquo;1&rdquo;}, {&ldquo;dateTime&rdquo;: &ldquo;09:51:00&rdquo;, &ldquo;value&rdquo;: &ldquo;1&rdquo;},&hellip;], &ldquo;minutesAfterWakeup&rdquo;: 1, &ldquo;minutesAsleep&rdquo;: 62, &ldquo;minutesAwake&rdquo;: 0, &ldquo;minutesToFallAsleep&rdquo;: 0, &ldquo;restlessCount&rdquo;: 1, &ldquo;restlessDuration&rdquo;: 1, &ldquo;startTime&rdquo;: &ldquo;2020-10-07T09:49:00.000&rdquo;, &ldquo;timeInBed&rdquo;: 63}], &ldquo;summary&rdquo;: {&ldquo;totalMinutesAsleep&rdquo;: 185, &ldquo;totalSleepRecords&rdquo;: 2, &ldquo;totalTimeInBed&rdquo;: 198}}</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>{&ldquo;sleep&rdquo;: [{&ldquo;awakeCount&rdquo;: 3, &ldquo;awakeDuration&rdquo;: 21, &ldquo;awakeningsCount&rdquo;: 16, &ldquo;dateOfSleep&rdquo;: &ldquo;2020-10-08&rdquo;, &ldquo;duration&rdquo;: 19260000, &ldquo;efficiency&rdquo;: 89, &ldquo;endTime&rdquo;: &ldquo;2020-10-08T06:01:30.000&rdquo;, &ldquo;isMainSleep&rdquo;: true, &ldquo;logId&rdquo;: 14150613895, &ldquo;minuteData&rdquo;: [{&ldquo;dateTime&rdquo;: &ldquo;00:40:00&rdquo;, &ldquo;value&rdquo;: &ldquo;3&rdquo;}, {&ldquo;dateTime&rdquo;: &ldquo;00:41:00&rdquo;, &ldquo;value&rdquo;: &ldquo;3&rdquo;}, {&ldquo;dateTime&rdquo;: &ldquo;00:42:00&rdquo;, &ldquo;value&rdquo;: &ldquo;3&rdquo;},&hellip;], &ldquo;minutesAfterWakeup&rdquo;: 0, &ldquo;minutesAsleep&rdquo;: 275, &ldquo;minutesAwake&rdquo;: 33, &ldquo;minutesToFallAsleep&rdquo;: 0, &ldquo;restlessCount&rdquo;: 13, &ldquo;restlessDuration&rdquo;: 25, &ldquo;startTime&rdquo;: &ldquo;2020-10-08T00:40:00.000&rdquo;, &ldquo;timeInBed&rdquo;: 321}], &ldquo;summary&rdquo;: {&ldquo;totalMinutesAsleep&rdquo;: 275, &ldquo;totalSleepRecords&rdquo;: 1, &ldquo;totalTimeInBed&rdquo;: 321}}</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>{&ldquo;sleep&rdquo;: [{&ldquo;awakeCount&rdquo;: 1, &ldquo;awakeDuration&rdquo;: 3, &ldquo;awakeningsCount&rdquo;: 8, &ldquo;dateOfSleep&rdquo;: &ldquo;2020-10-09&rdquo;, &ldquo;duration&rdquo;: 19320000, &ldquo;efficiency&rdquo;: 96, &ldquo;endTime&rdquo;: &ldquo;2020-10-09T05:57:30.000&rdquo;, &ldquo;isMainSleep&rdquo;: true, &ldquo;logId&rdquo;: 14161136803, &ldquo;minuteData&rdquo;: [{&ldquo;dateTime&rdquo;: &ldquo;00:35:30&rdquo;, &ldquo;value&rdquo;: &ldquo;2&rdquo;}, {&ldquo;dateTime&rdquo;: &ldquo;00:36:30&rdquo;, &ldquo;value&rdquo;: &ldquo;1&rdquo;}, {&ldquo;dateTime&rdquo;: &ldquo;00:37:30&rdquo;, &ldquo;value&rdquo;: &ldquo;1&rdquo;},&hellip;], &ldquo;minutesAfterWakeup&rdquo;: 0, &ldquo;minutesAsleep&rdquo;: 309, &ldquo;minutesAwake&rdquo;: 13, &ldquo;minutesToFallAsleep&rdquo;: 0, &ldquo;restlessCount&rdquo;: 7, &ldquo;restlessDuration&rdquo;: 10, &ldquo;startTime&rdquo;: &ldquo;2020-10-09T00:35:30.000&rdquo;, &ldquo;timeInBed&rdquo;: 322}], &ldquo;summary&rdquo;: {&ldquo;totalMinutesAsleep&rdquo;: 309, &ldquo;totalSleepRecords&rdquo;: 1, &ldquo;totalTimeInBed&rdquo;: 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">
<table>
<thead>
<tr>
<th>device_id</th>
<th>local_start_date_time</th>
<th>local_end_date_time</th>
<th>efficiency</th>
<th>minutes_after_wakeup</th>
<th>minutes_asleep</th>
<th>minutes_awake</th>
<th>minutes_to_fall_asleep</th>
<th>minutes_in_bed</th>
<th>is_main_sleep</th>
<th>type</th>
<th>count_awake</th>
<th>duration_awake</th>
<th>count_awakenings</th>
<th>count_restless</th>
<th>duration_restless</th>
</tr>
</thead>
<tbody>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>2020-10-07 15:55:00</td>
<td>2020-10-07 18:10:00</td>
<td>91</td>
<td>0</td>
<td>123</td>
<td>12</td>
<td>0</td>
<td>135</td>
<td>1</td>
<td>classic</td>
<td>2</td>
<td>3</td>
<td>10</td>
<td>8</td>
<td>9</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>2020-10-07 09:49:00</td>
<td>2020-10-07 10:52:30</td>
<td>100</td>
<td>1</td>
<td>62</td>
<td>0</td>
<td>0</td>
<td>63</td>
<td>0</td>
<td>classic</td>
<td>0</td>
<td>0</td>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>2020-10-08 00:40:00</td>
<td>2020-10-08 06:01:30</td>
<td>89</td>
<td>0</td>
<td>275</td>
<td>33</td>
<td>0</td>
<td>321</td>
<td>1</td>
<td>classic</td>
<td>3</td>
<td>21</td>
<td>16</td>
<td>13</td>
<td>25</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>2020-10-09 00:35:30</td>
<td>2020-10-09 05:57:30</td>
<td>96</td>
<td>0</td>
<td>309</td>
<td>13</td>
<td>0</td>
<td>322</td>
<td>1</td>
<td>classic</td>
<td>1</td>
<td>3</td>
<td>8</td>
<td>7</td>
<td>10</td>
</tr>
</tbody>
</table>
</div>
</div>
</details>
<details class="example"><summary>Example of the structure of source data with Fitbits 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>{&ldquo;sleep&rdquo;:[{&ldquo;dateOfSleep&rdquo;:&rdquo;2020-10-10&rdquo;,&rdquo;duration&rdquo;:3600000,&rdquo;efficiency&rdquo;:92,&rdquo;endTime&rdquo;:&rdquo;2020-10-10T16:37:00.000&rdquo;,&rdquo;infoCode&rdquo;:2,&rdquo;isMainSleep&rdquo;:false,&rdquo;levels&rdquo;:{&ldquo;data&rdquo;:[{&ldquo;dateTime&rdquo;:&rdquo;2020-10-10T15:36:30.000&rdquo;,&rdquo;level&rdquo;:&rdquo;restless&rdquo;,&rdquo;seconds&rdquo;:60},{&ldquo;dateTime&rdquo;:&rdquo;2020-10-10T15:37:30.000&rdquo;,&rdquo;level&rdquo;:&rdquo;asleep&rdquo;,&rdquo;seconds&rdquo;:660},{&ldquo;dateTime&rdquo;:&rdquo;2020-10-10T15:48:30.000&rdquo;,&rdquo;level&rdquo;:&rdquo;restless&rdquo;,&rdquo;seconds&rdquo;:60},&hellip;], &ldquo;summary&rdquo;:{&ldquo;asleep&rdquo;:{&ldquo;count&rdquo;:0,&rdquo;minutes&rdquo;:56},&rdquo;awake&rdquo;:{&ldquo;count&rdquo;:0,&rdquo;minutes&rdquo;:0},&rdquo;restless&rdquo;:{&ldquo;count&rdquo;:3,&rdquo;minutes&rdquo;:4}}},&rdquo;logId&rdquo;:26315914306,&rdquo;minutesAfterWakeup&rdquo;:0,&rdquo;minutesAsleep&rdquo;:55,&rdquo;minutesAwake&rdquo;:5,&rdquo;minutesToFallAsleep&rdquo;:0,&rdquo;startTime&rdquo;:&rdquo;2020-10-10T15:36:30.000&rdquo;,&rdquo;timeInBed&rdquo;:60,&rdquo;type&rdquo;:&rdquo;classic&rdquo;},{&ldquo;dateOfSleep&rdquo;:&rdquo;2020-10-10&rdquo;,&rdquo;duration&rdquo;:22980000,&rdquo;efficiency&rdquo;:88,&rdquo;endTime&rdquo;:&rdquo;2020-10-10T08:10:00.000&rdquo;,&rdquo;infoCode&rdquo;:0,&rdquo;isMainSleep&rdquo;:true,&rdquo;levels&rdquo;:{&ldquo;data&rdquo;:[{&ldquo;dateTime&rdquo;:&rdquo;2020-10-10T01:46:30.000&rdquo;,&rdquo;level&rdquo;:&rdquo;light&rdquo;,&rdquo;seconds&rdquo;:420},{&ldquo;dateTime&rdquo;:&rdquo;2020-10-10T01:53:30.000&rdquo;,&rdquo;level&rdquo;:&rdquo;deep&rdquo;,&rdquo;seconds&rdquo;:1230},{&ldquo;dateTime&rdquo;:&rdquo;2020-10-10T02:14:00.000&rdquo;,&rdquo;level&rdquo;:&rdquo;light&rdquo;,&rdquo;seconds&rdquo;:360},&hellip;], &ldquo;summary&rdquo;:{&ldquo;deep&rdquo;:{&ldquo;count&rdquo;:3,&rdquo;minutes&rdquo;:92,&rdquo;thirtyDayAvgMinutes&rdquo;:0},&rdquo;light&rdquo;:{&ldquo;count&rdquo;:29,&rdquo;minutes&rdquo;:193,&rdquo;thirtyDayAvgMinutes&rdquo;:0},&rdquo;rem&rdquo;:{&ldquo;count&rdquo;:4,&rdquo;minutes&rdquo;:33,&rdquo;thirtyDayAvgMinutes&rdquo;:0},&rdquo;wake&rdquo;:{&ldquo;count&rdquo;:28,&rdquo;minutes&rdquo;:65,&rdquo;thirtyDayAvgMinutes&rdquo;:0}}},&rdquo;logId&rdquo;:26311786557,&rdquo;minutesAfterWakeup&rdquo;:0,&rdquo;minutesAsleep&rdquo;:318,&rdquo;minutesAwake&rdquo;:65,&rdquo;minutesToFallAsleep&rdquo;:0,&rdquo;startTime&rdquo;:&rdquo;2020-10-10T01:46:30.000&rdquo;,&rdquo;timeInBed&rdquo;:383,&rdquo;type&rdquo;:&rdquo;stages&rdquo;}],&rdquo;summary&rdquo;:{&ldquo;stages&rdquo;:{&ldquo;deep&rdquo;:92,&rdquo;light&rdquo;:193,&rdquo;rem&rdquo;:33,&rdquo;wake&rdquo;:65},&rdquo;totalMinutesAsleep&rdquo;:373,&rdquo;totalSleepRecords&rdquo;:2,&rdquo;totalTimeInBed&rdquo;:443}}</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>{&ldquo;sleep&rdquo;:[{&ldquo;dateOfSleep&rdquo;:&rdquo;2020-10-11&rdquo;,&rdquo;duration&rdquo;:41640000,&rdquo;efficiency&rdquo;:89,&rdquo;endTime&rdquo;:&rdquo;2020-10-11T11:47:00.000&rdquo;,&rdquo;infoCode&rdquo;:0,&rdquo;isMainSleep&rdquo;:true,&rdquo;levels&rdquo;:{&ldquo;data&rdquo;:[{&ldquo;dateTime&rdquo;:&rdquo;2020-10-11T00:12:30.000&rdquo;,&rdquo;level&rdquo;:&rdquo;wake&rdquo;,&rdquo;seconds&rdquo;:450},{&ldquo;dateTime&rdquo;:&rdquo;2020-10-11T00:20:00.000&rdquo;,&rdquo;level&rdquo;:&rdquo;light&rdquo;,&rdquo;seconds&rdquo;:870},{&ldquo;dateTime&rdquo;:&rdquo;2020-10-11T00:34:30.000&rdquo;,&rdquo;level&rdquo;:&rdquo;wake&rdquo;,&rdquo;seconds&rdquo;:780},&hellip;], &ldquo;summary&rdquo;:{&ldquo;deep&rdquo;:{&ldquo;count&rdquo;:4,&rdquo;minutes&rdquo;:52,&rdquo;thirtyDayAvgMinutes&rdquo;:62},&rdquo;light&rdquo;:{&ldquo;count&rdquo;:32,&rdquo;minutes&rdquo;:442,&rdquo;thirtyDayAvgMinutes&rdquo;:364},&rdquo;rem&rdquo;:{&ldquo;count&rdquo;:6,&rdquo;minutes&rdquo;:68,&rdquo;thirtyDayAvgMinutes&rdquo;:58},&rdquo;wake&rdquo;:{&ldquo;count&rdquo;:29,&rdquo;minutes&rdquo;:132,&rdquo;thirtyDayAvgMinutes&rdquo;:94}}},&rdquo;logId&rdquo;:26589710670,&rdquo;minutesAfterWakeup&rdquo;:1,&rdquo;minutesAsleep&rdquo;:562,&rdquo;minutesAwake&rdquo;:132,&rdquo;minutesToFallAsleep&rdquo;:0,&rdquo;startTime&rdquo;:&rdquo;2020-10-11T00:12:30.000&rdquo;,&rdquo;timeInBed&rdquo;:694,&rdquo;type&rdquo;:&rdquo;stages&rdquo;}],&rdquo;summary&rdquo;:{&ldquo;stages&rdquo;:{&ldquo;deep&rdquo;:52,&rdquo;light&rdquo;:442,&rdquo;rem&rdquo;:68,&rdquo;wake&rdquo;:132},&rdquo;totalMinutesAsleep&rdquo;:562,&rdquo;totalSleepRecords&rdquo;:1,&rdquo;totalTimeInBed&rdquo;:694}}</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>{&ldquo;sleep&rdquo;:[{&ldquo;dateOfSleep&rdquo;:&rdquo;2020-10-12&rdquo;,&rdquo;duration&rdquo;:28980000,&rdquo;efficiency&rdquo;:93,&rdquo;endTime&rdquo;:&rdquo;2020-10-12T09:34:30.000&rdquo;,&rdquo;infoCode&rdquo;:0,&rdquo;isMainSleep&rdquo;:true,&rdquo;levels&rdquo;:{&ldquo;data&rdquo;:[{&ldquo;dateTime&rdquo;:&rdquo;2020-10-12T01:31:00.000&rdquo;,&rdquo;level&rdquo;:&rdquo;wake&rdquo;,&rdquo;seconds&rdquo;:600},{&ldquo;dateTime&rdquo;:&rdquo;2020-10-12T01:41:00.000&rdquo;,&rdquo;level&rdquo;:&rdquo;light&rdquo;,&rdquo;seconds&rdquo;:60},{&ldquo;dateTime&rdquo;:&rdquo;2020-10-12T01:42:00.000&rdquo;,&rdquo;level&rdquo;:&rdquo;deep&rdquo;,&rdquo;seconds&rdquo;:2340},&hellip;], &ldquo;summary&rdquo;:{&ldquo;deep&rdquo;:{&ldquo;count&rdquo;:4,&rdquo;minutes&rdquo;:63,&rdquo;thirtyDayAvgMinutes&rdquo;:59},&rdquo;light&rdquo;:{&ldquo;count&rdquo;:27,&rdquo;minutes&rdquo;:257,&rdquo;thirtyDayAvgMinutes&rdquo;:364},&rdquo;rem&rdquo;:{&ldquo;count&rdquo;:5,&rdquo;minutes&rdquo;:94,&rdquo;thirtyDayAvgMinutes&rdquo;:58},&rdquo;wake&rdquo;:{&ldquo;count&rdquo;:24,&rdquo;minutes&rdquo;:69,&rdquo;thirtyDayAvgMinutes&rdquo;:95}}},&rdquo;logId&rdquo;:26589710673,&rdquo;minutesAfterWakeup&rdquo;:0,&rdquo;minutesAsleep&rdquo;:415,&rdquo;minutesAwake&rdquo;:68,&rdquo;minutesToFallAsleep&rdquo;:0,&rdquo;startTime&rdquo;:&rdquo;2020-10-12T01:31:00.000&rdquo;,&rdquo;timeInBed&rdquo;:483,&rdquo;type&rdquo;:&rdquo;stages&rdquo;}],&rdquo;summary&rdquo;:{&ldquo;stages&rdquo;:{&ldquo;deep&rdquo;:63,&rdquo;light&rdquo;:257,&rdquo;rem&rdquo;:94,&rdquo;wake&rdquo;:69},&rdquo;totalMinutesAsleep&rdquo;:415,&rdquo;totalSleepRecords&rdquo;:1,&rdquo;totalTimeInBed&rdquo;: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">
<table>
<thead>
<tr>
<th>device_id</th>
<th>local_start_date_time</th>
<th>local_end_date_time</th>
<th>efficiency</th>
<th>minutes_after_wakeup</th>
<th>minutes_asleep</th>
<th>minutes_awake</th>
<th>minutes_to_fall_asleep</th>
<th>minutes_in_bed</th>
<th>is_main_sleep</th>
<th>type</th>
</tr>
</thead>
<tbody>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>2020-10-10 15:36:30</td>
<td>2020-10-10 16:37:00</td>
<td>92</td>
<td>0</td>
<td>55</td>
<td>5</td>
<td>0</td>
<td>60</td>
<td>0</td>
<td>classic</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>2020-10-10 01:46:30</td>
<td>2020-10-10 08:10:00</td>
<td>88</td>
<td>0</td>
<td>318</td>
<td>65</td>
<td>0</td>
<td>383</td>
<td>1</td>
<td>stages</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>2020-10-11 00:12:30</td>
<td>2020-10-11 11:47:00</td>
<td>89</td>
<td>1</td>
<td>562</td>
<td>132</td>
<td>0</td>
<td>694</td>
<td>1</td>
<td>stages</td>
</tr>
<tr>
<td>a748ee1a-1d0b-4ae9-9074-279a2b6ba524</td>
<td>2020-10-12 01:31:00</td>
<td>2020-10-12 09:34:30</td>
<td>93</td>
<td>0</td>
<td>415</td>
<td>68</td>
<td>0</td>
<td>483</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">&para;</a></h2>
<div class="admonition info">
<p class="admonition-title">Available day segments</p>
<ul>
<li>Only available for segments that span 1 or more complete days (e.g. Jan 1<sup>st</sup> 00:00 to Jan 3<sup>rd</sup> 23:59)</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_summary_raw.csv
- data/raw/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_summary_parsed.csv
- data/raw/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_summary_parsed_with_datetime.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/fitbit_sleep_summary_features/fitbit_sleep_summary_<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_summary.csv
</code></pre></div>
</div>
<p>Parameters description for <code>[FITBIT_SLEEP_SUMMARY][PROVIDERS][RAPIDS]</code>:</p>
<table>
<thead>
<tr>
<th>Key&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>[COMPUTE]</code></td>
<td>Set to <code>True</code> to extract <code>FITBIT_SLEEP_SUMMARY</code> features from the <code>RAPIDS</code> provider</td>
</tr>
<tr>
<td><code>[SLEEP_TYPES]</code></td>
<td>Types of sleep to be included in the feature extraction computation. Fitbit provides 3 types of sleep: <code>main</code>, <code>nap</code>, <code>all</code>.</td>
</tr>
<tr>
<td><code>[FEATURES]</code></td>
<td>Features to be computed from sleep summary data, see table below</td>
</tr>
</tbody>
</table>
<p>Features description for <code>[FITBIT_SLEEP_SUMMARY][PROVIDERS][RAPIDS]</code>:</p>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Units</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>countepisodeTYPE</td>
<td>episodes</td>
<td>Number of sleep episodes for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>avgefficiencyTYPE</td>
<td>scores</td>
<td>Average sleep efficiency for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>sumdurationafterwakeupTYPE</td>
<td>minutes</td>
<td>Total duration the user stayed in bed after waking up for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>sumdurationasleepTYPE</td>
<td>minutes</td>
<td>Total sleep duration for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>sumdurationawakeTYPE</td>
<td>minutes</td>
<td>Total duration the user stayed awake but still in bed for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>sumdurationtofallasleepTYPE</td>
<td>minutes</td>
<td>Total duration the user spent to fall asleep for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>sumdurationinbedTYPE</td>
<td>minutes</td>
<td>Total duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>avgdurationafterwakeupTYPE</td>
<td>minutes</td>
<td>Average duration the user stayed in bed after waking up for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>avgdurationasleepTYPE</td>
<td>minutes</td>
<td>Average sleep duration for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>avgdurationawakeTYPE</td>
<td>minutes</td>
<td>Average duration the user stayed awake but still in bed for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>avgdurationtofallasleepTYPE</td>
<td>minutes</td>
<td>Average duration the user spent to fall asleep for a certain sleep type during a day segment.</td>
</tr>
<tr>
<td>avgdurationinbedTYPE</td>
<td>minutes</td>
<td>Average duration the user stayed in bed (sumdurationtofallasleep + sumdurationawake + sumdurationasleep + sumdurationafterwakeup) for a certain sleep type during a day segment.</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Assumptions/Observations</p>
<ol>
<li>
<p>There are three sleep types (TYPE): <code>main</code>, <code>nap</code>, <code>all</code>. The <code>all</code> type contains both main sleep and naps.</p>
</li>
<li>
<p>There are two versions of Fitbits sleep API (<a href="https://dev.fitbit.com/build/reference/web-api/sleep-v1/">version 1</a> and <a href="https://dev.fitbit.com/build/reference/web-api/sleep/">version 1.2</a>), and each provides raw sleep data in a different format:</p>
<ul>
<li><em>Count &amp; duration summaries</em>. <code>v1</code> contains <code>count_awake</code>, <code>duration_awake</code>, <code>count_awakenings</code>, <code>count_restless</code>, and <code>duration_restless</code> fields for every sleep record but <code>v1.2</code> does not.</li>
</ul>
</li>
<li>
<p><em>API columns</em>. Features are computed based on the values provided by Fitbits API: <code>efficiency</code>, <code>minutes_after_wakeup</code>, <code>minutes_asleep</code>, <code>minutes_awake</code>, <code>minutes_to_fall_asleep</code>, <code>minutes_in_bed</code>, <code>is_main_sleep</code> and <code>type</code>.</p>
</li>
</ol>
</div>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<a href="../fitbit-heartrate-intraday/" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
<div class="md-footer-nav__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-nav__title">
<div class="md-ellipsis">
<span class="md-footer-nav__direction">
Previous
</span>
Fitbit Heart Rate Intraday
</div>
</div>
</a>
<a href="../fitbit-steps-summary/" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
<div class="md-footer-nav__title">
<div class="md-ellipsis">
<span class="md-footer-nav__direction">
Next
</span>
Fitbit Steps Summary
</div>
</div>
<div class="md-footer-nav__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>
<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-insiders/" 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.12f39d2a.min.js"></script>
<script src="../../assets/javascripts/bundle.d371fdb2.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.0f64ce30.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>