rapids/1.6/features/phone-locations/index.html

2379 lines
69 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="canonical" href="https://www.rapids.science/1.6/features/phone-locations/">
<link rel="icon" href="../../img/logo.png">
<meta name="generator" content="mkdocs-1.2.3, mkdocs-material-7.1.6+insiders-2.9.1">
<title>Phone Locations - RAPIDS</title>
<link rel="stylesheet" href="../../assets/stylesheets/main.92048cb8.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.73e53a79.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>function __scope(t,e="../.."){return new URL(e,location).pathname+"."+t}function __get(t,e=localStorage,n){return JSON.parse(e.getItem(__scope(t,n)))}function __set(t,e,n=localStorage,o){try{n.setItem(__scope(t,o),JSON.stringify(e))}catch(t){}}</script>
<script>var palette=__get("__palette");if(palette&&"object"==typeof palette.color)for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)</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="#phone-locations" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<div data-md-component="outdated" hidden>
<aside class="md-banner md-banner--warning">
<div class="md-banner__inner md-grid md-typeset">
You're not viewing the latest stable version of RAPIDS.
<a href="https://rapids.science/latest">
<strong> Click here to go to latest. </strong>
</a>
</div>
<script>var el=document.querySelector("[data-md-component=outdated]"),outdated=__get("__outdated",sessionStorage);!0===outdated&&el&&(el.hidden=!1)</script>
</aside>
</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" data-md-component="logo">
<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">
Phone Locations
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="" data-md-color-scheme="default" data-md-color-primary="blue" data-md-color-accent="blue" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17 7H7a5 5 0 0 0-5 5 5 5 0 0 0 5 5h10a5 5 0 0 0 5-5 5 5 0 0 0-5-5m0 8a3 3 0 0 1-3-3 3 3 0 0 1 3-3 3 3 0 0 1 3 3 3 3 0 0 1-3 3z"/></svg>
</label>
<input class="md-option" data-md-color-media="" data-md-color-scheme="slate" data-md-color-primary="blue" data-md-color-accent="blue" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M7 10a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2 2 2 0 0 1 2-2m10-3a5 5 0 0 1 5 5 5 5 0 0 1-5 5H7a5 5 0 0 1-5-5 5 5 0 0 1 5-5h10M7 9a3 3 0 0 0-3 3 3 3 0 0 0 3 3h10a3 3 0 0 0 3-3 3 3 0 0 0-3-3H7z"/></svg>
</label>
</form>
<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 0 1 16 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 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.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" 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 0 1 16 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 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.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" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.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" data-md-component="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.05 244 40.45a28.87 28.87 0 0 0-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 0 1-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 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-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="sidebar" data-md-type="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" data-md-component="logo">
<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" data-md-component="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.05 244 40.45a28.87 28.87 0 0 0-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 0 1-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 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-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">
<a href="../../setup/overview/" class="md-nav__link">
Overview
</a>
</li>
<li class="md-nav__item">
<a href="../../workflow-examples/minimal/" class="md-nav__link">
Minimal Example
</a>
</li>
<li class="md-nav__item">
<a href="../../citation/" class="md-nav__link">
Citation
</a>
</li>
<li class="md-nav__item">
<a href="../../contributing/" class="md-nav__link">
Contributing
</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_6" type="checkbox" id="__nav_6" >
<label class="md-nav__link" for="__nav_6">
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_6">
<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="../../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>
</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">
Data Streams
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Data Streams" data-md-level="1">
<label class="md-nav__title" for="__nav_7">
<span class="md-nav__icon md-icon"></span>
Data Streams
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../datastreams/data-streams-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_7_2" type="checkbox" id="__nav_7_2" >
<label class="md-nav__link" for="__nav_7_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_7_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="../../datastreams/aware-mysql/" class="md-nav__link">
aware_mysql
</a>
</li>
<li class="md-nav__item">
<a href="../../datastreams/aware-csv/" class="md-nav__link">
aware_csv
</a>
</li>
<li class="md-nav__item">
<a href="../../datastreams/aware-influxdb/" class="md-nav__link">
aware_influxdb (beta)
</a>
</li>
<li class="md-nav__item">
<a href="../../datastreams/mandatory-phone-format/" class="md-nav__link">
Mandatory Phone Format
</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_7_3" type="checkbox" id="__nav_7_3" >
<label class="md-nav__link" for="__nav_7_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_7_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="../../datastreams/fitbitjson-mysql/" class="md-nav__link">
fitbitjson_mysql
</a>
</li>
<li class="md-nav__item">
<a href="../../datastreams/fitbitjson-csv/" class="md-nav__link">
fitbitjson_csv
</a>
</li>
<li class="md-nav__item">
<a href="../../datastreams/fitbitparsed-mysql/" class="md-nav__link">
fitbitparsed_mysql
</a>
</li>
<li class="md-nav__item">
<a href="../../datastreams/fitbitparsed-csv/" class="md-nav__link">
fitbitparsed_csv
</a>
</li>
<li class="md-nav__item">
<a href="../../datastreams/mandatory-fitbit-format/" class="md-nav__link">
Mandatory Fitbit Format
</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_7_4" type="checkbox" id="__nav_7_4" >
<label class="md-nav__link" for="__nav_7_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_7_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="../../datastreams/empatica-zip/" class="md-nav__link">
empatica_zip
</a>
</li>
<li class="md-nav__item">
<a href="../../datastreams/mandatory-empatica-format/" class="md-nav__link">
Mandatory Empatica Format
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../../datastreams/add-new-data-streams/" class="md-nav__link">
Add New Data Streams
</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_8" type="checkbox" id="__nav_8" checked>
<label class="md-nav__link" for="__nav_8">
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_8">
<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--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8_2" type="checkbox" id="__nav_8_2" checked>
<label class="md-nav__link" for="__nav_8_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_8_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-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 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">
Phone Locations
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
Phone Locations
</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-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#barnett-provider" class="md-nav__link">
BARNETT provider
</a>
</li>
<li class="md-nav__item">
<a href="#doryab-provider" class="md-nav__link">
DORYAB provider
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../phone-log/" class="md-nav__link">
Phone Log
</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--nested">
<input class="md-nav__toggle md-toggle" data-md-toggle="__nav_8_3" type="checkbox" id="__nav_8_3" >
<label class="md-nav__link" for="__nav_8_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_8_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-calories-intraday/" class="md-nav__link">
Fitbit Calories Intraday
</a>
</li>
<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">
<a href="../fitbit-sleep-intraday/" class="md-nav__link">
Fitbit Sleep Intraday
</a>
</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_8_4" type="checkbox" id="__nav_8_4" >
<label class="md-nav__link" for="__nav_8_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_8_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_9" type="checkbox" id="__nav_9" >
<label class="md-nav__link" for="__nav_9">
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_9">
<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_10" type="checkbox" id="__nav_10" >
<label class="md-nav__link" for="__nav_10">
Analysis Workflows
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" aria-label="Analysis Workflows" data-md-level="1">
<label class="md-nav__title" for="__nav_10">
<span class="md-nav__icon md-icon"></span>
Analysis Workflows
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../../workflow-examples/analysis/" class="md-nav__link">
Complete Example
</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_11" type="checkbox" id="__nav_11" >
<label class="md-nav__link" for="__nav_11">
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_11">
<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_12" type="checkbox" id="__nav_12" >
<label class="md-nav__link" for="__nav_12">
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_12">
<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 an old version
</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="../../common-errors/" class="md-nav__link">
Common Errors
</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="sidebar" data-md-type="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-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#barnett-provider" class="md-nav__link">
BARNETT provider
</a>
</li>
<li class="md-nav__item">
<a href="#doryab-provider" class="md-nav__link">
DORYAB provider
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<a href="https://github.com/carissalow/rapids/edit/master/docs/features/phone-locations.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="phone-locations">Phone Locations<a class="headerlink" href="#phone-locations" title="Permanent link">&para;</a></h1>
<p>Sensor parameters description for <code>[PHONE_LOCATIONS]</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;&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;&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>[CONTAINER]</code></td>
<td>Data stream <a href="../../datastreams/data-streams-introduction/">container</a> (database table, CSV file, etc.) where the location data is stored</td>
</tr>
<tr>
<td><code>[LOCATIONS_TO_USE]</code></td>
<td>Type of location data to use, one of <code>ALL</code>, <code>GPS</code>, <code>ALL_RESAMPLED</code> or <code>FUSED_RESAMPLED</code>. This filter is based on the <code>provider</code> column of the locations table, <code>ALL</code> includes every row, <code>GPS</code> only includes rows where the provider is gps, <code>ALL_RESAMPLED</code> includes all rows after being resampled, and <code>FUSED_RESAMPLED</code> only includes rows where the provider is fused after being resampled.</td>
</tr>
<tr>
<td><code>[FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD]</code></td>
<td>If <code>ALL_RESAMPLED</code> or <code>FUSED_RESAMPLED</code> is used, the original fused data has to be resampled. A location row is resampled to the next valid timestamp (see the Assumptions/Observations below) only if the time difference between them is less or equal than this threshold (in minutes).</td>
</tr>
<tr>
<td><code>[FUSED_RESAMPLED_TIME_SINCE_VALID_LOCATION]</code></td>
<td>If <code>ALL_RESAMPLED</code> or <code>FUSED_RESAMPLED</code> is used, the original fused data has to be resampled. A location row is resampled at most for this long (in minutes).</td>
</tr>
<tr>
<td><code>[ACCURACY_LIMIT]</code></td>
<td>An integer in meters, any location rows with an accuracy higher or equal than this is dropped. This number means there&rsquo;s a 68% probability the actual location is within this radius.</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Assumptions/Observations</p>
<p><strong>Types of location data to use</strong>
Android and iOS clients can collect location coordinates through the phone&rsquo;s GPS, the network cellular towers around the phone, or Google&rsquo;s fused location API. </p>
<ul>
<li>If you want to use only the GPS provider, set <code>[LOCATIONS_TO_USE]</code> to <code>GPS</code></li>
<li>If you want to use all providers, set <code>[LOCATIONS_TO_USE]</code> to <code>ALL</code></li>
<li>If you collected location data from different providers, including the fused API, use <code>ALL_RESAMPLED</code></li>
<li>If your mobile client was configured to use fused location only or want to focus only on this provider, set <code>[LOCATIONS_TO_USE]</code> to <code>FUSED_RESAMPLED</code>.</li>
</ul>
<p><code>ALL_RESAMPLED</code> and <code>FUSED_RESAMPLED</code> take the original location coordinates and replicate each pair forward in time as long as the phone was sensing data as indicated by the joined timestamps of <a href="../phone-data-yield/"><code>[PHONE_DATA_YIELD][SENSORS]</code></a>. This is done because Google&rsquo;s API only logs a new location coordinate pair when it is sufficiently different in time or space from the previous one and because GPS and network providers can log data at variable rates.</p>
<p>There are two parameters associated with resampling fused location.</p>
<ol>
<li><code>FUSED_RESAMPLED_CONSECUTIVE_THRESHOLD</code> (in minutes, default 30) controls the maximum gap between any two coordinate pairs to replicate the last known pair. For example, participant A&rsquo;s phone did not collect data between 10.30 am and 10:50 am and between 11:05am and 11:40am, the last known coordinate pair is replicated during the first period but not the second. In other words, we assume that we cannot longer guarantee the participant stayed at the last known location if the phone did not sense data for more than 30 minutes. </li>
<li><code>FUSED_RESAMPLED_TIME_SINCE_VALID_LOCATION</code> (in minutes, default 720 or 12 hours) stops the last known fused location from being replicated longer than this threshold even if the phone was sensing data continuously. For example, participant A went home at 9 pm, and their phone was sensing data without gaps until 11 am the next morning, the last known location is replicated until 9 am. </li>
</ol>
<p>If you have suggestions to modify or improve this resampling, let us know.</p>
</div>
<h2 id="barnett-provider">BARNETT provider<a class="headerlink" href="#barnett-provider" title="Permanent link">&para;</a></h2>
<p>These features are based on the original open-source implementation by <a href="../../citation#barnett-locations">Barnett et al</a> and some features created by <a href="../../citation#barnett-locations">Canzian et al</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available only for segments that start at 00:00:00 and end at 23:59:59 of the same or a different day (daily, weekly, weekend, etc.)</li>
<li>Available for Android and iOS</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>/phone_locations_raw.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_processed.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_processed_with_datetime.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_barnett_daily.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_features/phone_locations_<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>/phone_locations.csv
</code></pre></div>
</div>
<p>Parameters description for <code>[PHONE_LOCATIONS][PROVIDERS][BARNETT]</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;&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>PHONE_LOCATIONS</code> features from the <code>BARNETT</code> provider</td>
</tr>
<tr>
<td><code>[FEATURES]</code></td>
<td>Features to be computed, see table below</td>
</tr>
<tr>
<td><code>[IF_MULTIPLE_TIMEZONES]</code></td>
<td>Currently, <code>USE_MOST_COMMON</code> is the only value supported. If the location data for a participant belongs to multiple time zones, we select the most common because Barnett&rsquo;s algorithm can only handle one time zone</td>
</tr>
<tr>
<td><code>[MINUTES_DATA_USED]</code></td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each time segment. Use this for quality control purposes; the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
</tr>
</tbody>
</table>
<p>Features description for <code>[PHONE_LOCATIONS][PROVIDERS][BARNETT]</code> adapted from <a href="http://wiki.beiwe.org/wiki/Summary_Statistics">Beiwe Summary Statistics</a>:</p>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Units</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>hometime</td>
<td>minutes</td>
<td>Time at home. Time spent at home in minutes. Home is the most visited significant location between 8 pm and 8 am, including any pauses within a 200-meter radius.</td>
</tr>
<tr>
<td>disttravelled</td>
<td>meters</td>
<td>Total distance traveled over a day (flights).</td>
</tr>
<tr>
<td>rog</td>
<td>meters</td>
<td>The Radius of Gyration (rog) is a measure in meters of the area covered by a person over a day. A centroid is calculated for all the places (pauses) visited during a day, and a weighted distance between all the places and that centroid is computed. The weights are proportional to the time spent in each place.</td>
</tr>
<tr>
<td>maxdiam</td>
<td>meters</td>
<td>The maximum diameter is the largest distance between any two pauses.</td>
</tr>
<tr>
<td>maxhomedist</td>
<td>meters</td>
<td>The maximum distance from home in meters.</td>
</tr>
<tr>
<td>siglocsvisited</td>
<td>locations</td>
<td>The number of significant locations visited during the day. Significant locations are computed using k-means clustering over pauses found in the whole monitoring period. The number of clusters is found iterating k from 1 to 200 stopping until the centroids of two significant locations are within 400 meters of one another.</td>
</tr>
<tr>
<td>avgflightlen</td>
<td>meters</td>
<td>Mean length of all flights.</td>
</tr>
<tr>
<td>stdflightlen</td>
<td>meters</td>
<td>Standard deviation of the length of all flights.</td>
</tr>
<tr>
<td>avgflightdur</td>
<td>seconds</td>
<td>Mean duration of all flights.</td>
</tr>
<tr>
<td>stdflightdur</td>
<td>seconds</td>
<td>The standard deviation of the duration of all flights.</td>
</tr>
<tr>
<td>probpause</td>
<td>-</td>
<td>The fraction of a day spent in a pause (as opposed to a flight)</td>
</tr>
<tr>
<td>siglocentropy</td>
<td>nats</td>
<td>Shannon&rsquo;s entropy measurement is based on the proportion of time spent at each significant location visited during a day.</td>
</tr>
<tr>
<td>circdnrtn</td>
<td>-</td>
<td>A continuous metric quantifying a person&rsquo;s circadian routine that can take any value between 0 and 1, where 0 represents a daily routine completely different from any other sensed days and 1 a routine the same as every other sensed day.</td>
</tr>
<tr>
<td>wkenddayrtn</td>
<td>-</td>
<td>Same as circdnrtn but computed separately for weekends and weekdays.</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Assumptions/Observations</p>
<p><strong>Multi day segment features</strong>
Barnett&rsquo;s features are only available on time segments that span entire days (00:00:00 to 23:59:59). Such segments can be one-day long (daily) or multi-day (weekly, for example). Multi-day segment features are computed based on daily features summarized the following way:</p>
<ul>
<li>sum for <code>hometime</code>, <code>disttravelled</code>, <code>siglocsvisited</code>, and <code>minutes_data_used</code></li>
<li>max for <code>maxdiam</code>, and <code>maxhomedist</code></li>
<li>mean for <code>rog</code>, <code>avgflightlen</code>, <code>stdflightlen</code>, <code>avgflightdur</code>, <code>stdflightdur</code>, <code>probpause</code>, <code>siglocentropy</code>, <code>circdnrtn</code>, <code>wkenddayrtn</code>, and <code>minsmissing</code></li>
</ul>
<p><strong>Computation speed</strong>
The process to extract these features can be slow compared to other sensors and providers due to the required simulation.</p>
<p><strong>How are these features computed?</strong>
These features are based on a Pause-Flight model. A pause is defined as a mobility trace (location pings) within a certain duration and distance (by default, 300 seconds and 60 meters). A flight is any mobility trace between two pauses. Data is resampled and imputed before the features are computed. See <a href="../../citation#barnett-locations">Barnett et al</a> for more information. In RAPIDS, we only expose one parameter for these features (accuracy limit). You can change other parameters in <code>src/features/phone_locations/barnett/library/MobilityFeatures.R</code>.</p>
<p><strong>Significant Locations</strong>
Significant locations are determined using K-means clustering on pauses longer than 10 minutes. The number of clusters (K) is increased until no two clusters are within 400 meters from each other. After this, pauses within a certain range of a cluster (200 meters by default) count as a visit to that significant location. This description was adapted from the Supplementary Materials of <a href="../../citation#barnett-locations">Barnett et al</a>.</p>
<p><strong>The Circadian Calculation</strong>
For a detailed description of how this is calculated, see <a href="../../citation#barnett-locations">Canzian et al</a>.</p>
</div>
<h2 id="doryab-provider">DORYAB provider<a class="headerlink" href="#doryab-provider" title="Permanent link">&para;</a></h2>
<p>These features are based on the original implementation by <a href="../../citation#doryab-locations">Doryab et al.</a>.</p>
<div class="admonition info">
<p class="admonition-title">Available time segments and platforms</p>
<ul>
<li>Available for all time segments</li>
<li>Available for Android and iOS</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>/phone_locations_raw.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_processed.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_processed_with_datetime.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_processed_with_datetime_with_doryab_columns_episodes.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_processed_with_datetime_with_doryab_columns_episodes_resampled.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_processed_with_datetime_with_doryab_columns_episodes_resampled_with_datetime.csv
- data/interim/<span class="o">{</span>pid<span class="o">}</span>/phone_locations_features/phone_locations_<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>/phone_locations.csv
</code></pre></div>
</div>
<p>Parameters description for <code>[PHONE_LOCATIONS][PROVIDERS][DORYAB]</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;&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>PHONE_LOCATIONS</code> features from the <code>DORYAB</code> provider</td>
</tr>
<tr>
<td><code>[FEATURES]</code></td>
<td>Features to be computed, see table below</td>
</tr>
<tr>
<td><code>[DBSCAN_EPS]</code></td>
<td>The maximum distance in meters between two samples for one to be considered as in the neighborhood of the other. This is not a maximum bound on the distances of points within a cluster. This is the most important DBSCAN parameter to choose appropriately for your data set and distance function.</td>
</tr>
<tr>
<td><code>[DBSCAN_MINSAMPLES]</code></td>
<td>The number of samples (or total weight) in a neighborhood for a point to be considered as a core point of a cluster. This includes the point itself.</td>
</tr>
<tr>
<td><code>[THRESHOLD_STATIC]</code></td>
<td>It is the threshold value in km/hr which labels a row as Static or Moving.</td>
</tr>
<tr>
<td><code>[MAXIMUM_ROW_GAP]</code></td>
<td>The maximum gap (in seconds) allowed between any two consecutive rows for them to be considered part of the same displacement. If this threshold is too high, it can throw speed and distance calculations off for periods when the phone was not sensing. This value must be larger than your GPS sampling interval when <code>[LOCATIONS_TO_USE]</code> is <code>ALL</code> or <code>GPS</code>, otherwise all the stationary-related features will be NA. If <code>[LOCATIONS_TO_USE]</code> is <code>ALL_RESAMPLED</code> or <code>FUSED_RESAMPLED</code>, you can use the default value as every row will be resampled at 1-minute intervals.</td>
</tr>
<tr>
<td><code>[MINUTES_DATA_USED]</code></td>
<td>Set to <code>True</code> to include an extra column in the final location feature file containing the number of minutes used to compute the features on each time segment. Use this for quality control purposes; the more data minutes exist for a period, the more reliable its features should be. For fused location, a single minute can contain more than one coordinate pair if the participant is moving fast enough.</td>
</tr>
<tr>
<td><code>[CLUSTER_ON]</code></td>
<td>Set this flag to <code>PARTICIPANT_DATASET</code> to create clusters based on the entire participant&rsquo;s dataset or to <code>TIME_SEGMENT</code> to create clusters based on all the instances of the corresponding time segment (e.g. all mornings) or to <code>TIME_SEGMENT_INSTANCE</code> to create clusters based on a single instance (e.g. 2020-05-20&rsquo;s morning).</td>
</tr>
<tr>
<td><code>[INFER_HOME_LOCATION_STRATEGY]</code></td>
<td>The strategy applied to infer home locations. Set to <code>DORYAB_STRATEGY</code> to infer one home location for the entire dataset of each participant or to <code>SUN_LI_VEGA_STRATEGY</code> to infer one home location per day per participant. See Observations below to know more.</td>
</tr>
<tr>
<td><code>[MINIMUM_DAYS_TO_DETECT_HOME_CHANGES]</code></td>
<td>The minimum number of consecutive days a new home location candidate has to repeat before it is considered the participant&rsquo;s new home. This parameter will be used only when <code>[INFER_HOME_LOCATION_STRATEGY]</code> is set to <code>SUN_LI_VEGA_STRATEGY</code>.</td>
</tr>
<tr>
<td><code>[CLUSTERING_ALGORITHM]</code></td>
<td>The original Doryab et al. implementation uses <code>DBSCAN</code>, <code>OPTICS</code> is also available with similar (but not identical) clustering results and lower memory consumption.</td>
</tr>
<tr>
<td><code>[RADIUS_FOR_HOME]</code></td>
<td>All location coordinates within this distance (meters) from the home location coordinates are considered a homestay (see <code>timeathome</code> feature).</td>
</tr>
</tbody>
</table>
<p>Features description for <code>[PHONE_LOCATIONS][PROVIDERS][DORYAB]</code>:</p>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Units</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>locationvariance</td>
<td><span class="arithmatex">\(meters^2\)</span></td>
<td>The sum of the variances of the latitude and longitude columns.</td>
</tr>
<tr>
<td>loglocationvariance</td>
<td>-</td>
<td>Log of the sum of the variances of the latitude and longitude columns.</td>
</tr>
<tr>
<td>totaldistance</td>
<td>meters</td>
<td>Total distance traveled in a time segment using the haversine formula.</td>
</tr>
<tr>
<td>avgspeed</td>
<td>km/hr</td>
<td>Average speed in a time segment considering only the instances labeled as Moving. This feature is 0 when the participant is stationary during a time segment.</td>
</tr>
<tr>
<td>varspeed</td>
<td>km/hr</td>
<td>Speed variance in a time segment considering only the instances labeled as Moving. This feature is 0 when the participant is stationary during a time segment.</td>
</tr>
<tr>
<td><del class="critic">circadianmovement</del></td>
<td>-</td>
<td>Deprecated, see Observations below. &ldquo;It encodes the extent to which a person&rsquo;s location patterns follow a 24-hour circadian cycle." <a href="../../citation#doryab-locations">Doryab et al.</a>.</td>
</tr>
<tr>
<td>numberofsignificantplaces</td>
<td>places</td>
<td>Number of significant locations visited. It is calculated using the DBSCAN/OPTICS clustering algorithm which takes in EPS and MIN_SAMPLES as parameters to identify clusters. Each cluster is a significant place.</td>
</tr>
<tr>
<td>numberlocationtransitions</td>
<td>transitions</td>
<td>Number of movements between any two clusters in a time segment.</td>
</tr>
<tr>
<td>radiusgyration</td>
<td>meters</td>
<td>Quantifies the area covered by a participant</td>
</tr>
<tr>
<td>timeattop1location</td>
<td>minutes</td>
<td>Time spent at the most significant location.</td>
</tr>
<tr>
<td>timeattop2location</td>
<td>minutes</td>
<td>Time spent at the 2<sup>nd</sup> most significant location.</td>
</tr>
<tr>
<td>timeattop3location</td>
<td>minutes</td>
<td>Time spent at the 3<sup>rd</sup> most significant location.</td>
</tr>
<tr>
<td>movingtostaticratio</td>
<td>-</td>
<td>Ratio between stationary time and total location sensed time. A lat/long coordinate pair is labeled as stationary if its speed (distance/time) to the next coordinate pair is less than 1km/hr. A higher value represents a more stationary routine.</td>
</tr>
<tr>
<td>outlierstimepercent</td>
<td>-</td>
<td>Ratio between the time spent in non-significant clusters divided by the time spent in all clusters (stationary time. Only stationary samples are clustered). A higher value represents more time spent in non-significant clusters.</td>
</tr>
<tr>
<td>maxlengthstayatclusters</td>
<td>minutes</td>
<td>Maximum time spent in a cluster (significant location).</td>
</tr>
<tr>
<td>minlengthstayatclusters</td>
<td>minutes</td>
<td>Minimum time spent in a cluster (significant location).</td>
</tr>
<tr>
<td>avglengthstayatclusters</td>
<td>minutes</td>
<td>Average time spent in a cluster (significant location).</td>
</tr>
<tr>
<td>stdlengthstayatclusters</td>
<td>minutes</td>
<td>Standard deviation of time spent in a cluster (significant location).</td>
</tr>
<tr>
<td>locationentropy</td>
<td>nats</td>
<td>Shannon Entropy computed over the row count of each cluster (significant location), it is higher the more rows belong to a cluster (i.e., the more time a participant spent at a significant location).</td>
</tr>
<tr>
<td>normalizedlocationentropy</td>
<td>nats</td>
<td>Shannon Entropy computed over the row count of each cluster (significant location) divided by the number of clusters; it is higher the more rows belong to a cluster (i.e., the more time a participant spent at a significant location).</td>
</tr>
<tr>
<td>timeathome</td>
<td>minutes</td>
<td>Time spent at home (see Observations below for a description on how we compute home).</td>
</tr>
<tr>
<td>homelabel</td>
<td>-</td>
<td>An integer that represents a different home location. It will be a constant number (1) for all participants when <code>[INFER_HOME_LOCATION_STRATEGY]</code> is set to <code>DORYAB_STRATEGY</code> or an incremental index if the strategy is set to <code>SUN_LI_VEGA_STRATEGY</code>.</td>
</tr>
</tbody>
</table>
<div class="admonition note">
<p class="admonition-title">Assumptions/Observations</p>
<p><strong>Significant Locations Identified</strong>
Significant locations are determined using <code>DBSCAN</code> or <code>OPTICS</code> clustering on locations that a participant visited over the course of the period of data collection. The most significant location is the place where the participant stayed for the longest time.</p>
<p><strong>Circadian Movement Calculation</strong>
Note Feb 3 2021. It seems the implementation of this feature is not correct; we suggest not to use this feature until a fix is in place. For a detailed description of how this should be calculated, see <a href="https://pubmed.ncbi.nlm.nih.gov/28344895/">Saeb et al</a>.</p>
<p><strong>Fine-Tuning Clustering Parameters</strong>
Based on an experiment where we collected fused location data for 7 days with a mean accuracy of 86 &amp; SD of 350.874635, we determined that <code>EPS/MAX_EPS</code>=100 produced closer clustering results to reality. Higher values (&gt;100) missed out on some significant places, like a short grocery visit, while lower values (&lt;100) picked up traffic lights and stop signs while driving as significant locations. We recommend you set <code>EPS</code> based on your location data&rsquo;s accuracy (the more accurate your data is, the lower you should be able to set EPS).</p>
<p><strong>Duration Calculation</strong>
To calculate the time duration component for our features, we compute the difference between consecutive rows&rsquo; timestamps to take into account sampling rate variability. If this time difference is larger than a threshold (300 seconds by default), we replace it with NA and label that row as Moving.</p>
<p><strong>Home location</strong></p>
<ul>
<li>
<p><code>DORYAB_STRATEGY</code>: home is calculated using all location data of a participant between 12 am and 6 am, then applying a clustering algorithm (<code>DBSCAN</code> or <code>OPTICS</code>) and considering the center of the biggest cluster home for that participant.</p>
</li>
<li>
<p><code>SUN_LI_VEGA_STRATEGY</code>: home is calculated using all location data of a participant between 12 am and 6 am, then applying a clustering algorithm (<code>DBSCAN</code> or <code>OPTICS</code>). The following steps are used to infer the home location per day for that participant:</p>
<ol>
<li>
<p>if there are records within [03:30:00, 04:30:00] for that night:<br>
&nbsp;&nbsp;&nbsp;&nbsp;we choose the most common cluster during that period as a home candidate for that day.<br>
elif there are records within [midnight, 03:30:00) for that night:<br>
&nbsp;&nbsp;&nbsp;&nbsp;we choose the last valid cluster during that period as a home candidate for that day.<br>
elif there are records within (04:30:00, 06:00:00] for that night:<br>
&nbsp;&nbsp;&nbsp;&nbsp;we choose the first valid cluster during that period as a home candidate for that day.<br>
else:<br>
&nbsp;&nbsp;&nbsp;&nbsp;the home location is NA (missing) for that day.</p>
</li>
<li>
<p>If the count of consecutive days with the same candidate home location cluster label is larger or equal to <code>[MINIMUM_DAYS_TO_DETECT_HOME_CHANGES]</code>,
the candidate will be regarded as the home cluster; otherwise, the home cluster will be the last valid day&rsquo;s cluster.
If there are no valid clusters before that day, the first home location in the days after is used.</p>
</li>
</ol>
</li>
</ul>
<p><strong>Clustering algorithms</strong>
<a href="https://scikit-learn.org/stable/modules/generated/sklearn.cluster.DBSCAN.html"><code>DBSCAN</code></a> and <a href="https://scikit-learn.org/stable/modules/generated/sklearn.cluster.OPTICS.html#r2c55e37003fe-1"><code>OPTICS</code></a> algorithms are available currently. Duplicated locations are discarded while clustering. The <code>DBSCAN</code> algorithm takes the time spent at each location into consideration. However, the <code>OPTICS</code> algorithm ignores it as it is not supported in the current <a href="https://github.com/scikit-learn/scikit-learn/issues/12394">scikit-learn</a> implementation.</p>
</div>
<!-- Add custom comment system integration here -->
<!-- Utterances integration -->
<h2 id="__comments">Comments</h2>
<script type="text/javascript">
var rapids_utterances_theme = false
document.onreadystatechange = function () {
if (document.readyState == "interactive") {
// wait for utterances to load and send it's first message.
addEventListener('message', event => {
if (event.origin !== 'https://utteranc.es' || rapids_utterances_theme == true) {
return;
}
rapids_utterances_theme = true
if(document.body.getAttribute("data-md-color-scheme") == "default")
document.querySelector("iframe.utterances-frame").contentWindow.postMessage({ type: "set-theme", theme: "github-light" },"https://utteranc.es/")
else
document.querySelector("iframe.utterances-frame").contentWindow.postMessage({ type: "set-theme", theme: "photon-dark" },"https://utteranc.es/")
});
document.getElementById('__palette_1').onclick = function(){
document.querySelector("iframe.utterances-frame").contentWindow.postMessage({ type: "set-theme", theme: "github-light" },"https://utteranc.es/")
}
document.getElementById('__palette_2').onclick = function(){
document.querySelector("iframe.utterances-frame").contentWindow.postMessage({ type: "set-theme", theme: "photon-dark" },"https://utteranc.es/")
}
}
}
</script>
<script src="https://utteranc.es/client.js"
repo="carissalow/rapids"
issue-term="pathname"
label="docs comments"
theme="github-light"
crossorigin="anonymous"
async>
</script>
</article>
</div>
</div>
</main>
<footer class="md-footer">
<nav class="md-footer__inner md-grid" aria-label="Footer">
<a href="../phone-light/" 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>
Phone Light
</div>
</div>
</a>
<a href="../phone-log/" 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>
Phone Log
</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/RAPIDS_Science" 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>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../..", "features": ["navigation.sections", "search.suggest", "search.highlight"], "translations": {"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"}, "search": "../../assets/javascripts/workers/search.df8cae7d.min.js", "version": {"provider": "mike"}}</script>
<script src="../../assets/javascripts/bundle.0c4ae912.min.js"></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>
</body>
</html>