Top Banner
A Quest For Better Sleep (with Fitbit data analysis) Alex Martinelli | @5agado
15

A quest for better sleep

Feb 08, 2017

Download

Data & Analytics

Alex Martinelli
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: A quest for better sleep

A Quest For Better Sleep(with Fitbit data analysis)

Alex Martinelli | @5agado

Page 2: A quest for better sleep

Index● Why?

● The Data

● Exploring Sleep Data

● The Heatmap Case

● Correlation

● What’s Next?

2/15

Page 3: A quest for better sleep

Why?

Be your own data scientist!

Learn..How data “works”: play with it, learn about tools, statistics and biases. Learn to give a meaning to data < learn to give a proper meaning to data.

..and LearnHow you “work”: an app dashboard is not enough. Investigation based on your needs and knowledge: insight, diagnosis, experiments and improvements.

3/15

Page 4: A quest for better sleep

The DataPremise: sleep trackers and their inherent inaccuracy

The Fitbit caseGetting your data is not as easy as expected, considering that is YOUR data.Options: premium plan, scraping or APIs (again with limitations)

Data format (cleaned)For each minute: 0=None (no measure taken), 1=Sleeping, 2=Restless, 3=Awake

Sleeping periods can be manually recorded, or are otherwise recognized automatically (based on amount of time you didn’t move, so there are limitations).

4/15

Page 5: A quest for better sleep

Data image (table)

Page 6: A quest for better sleep

Exploring Sleep DataBasic Stats

- sleep efficiency, hours of sleep...

Timing Stats- to bed time, wake up time- sleep intervals

Intraday Stats (minute to minute analysis)

Aggregation (hour, weekday, month, year)

Correlation

6/15

Page 7: A quest for better sleep

7/15

Page 8: A quest for better sleep

8/15

Page 9: A quest for better sleep

“Looks cool, but what does it mean?”[cit. everyone]

9/15

Page 10: A quest for better sleep

Minute Sleep QualityFor each minute, what percentage of recorded “times in bed” I was actually asleep

10/15

Page 11: A quest for better sleep

CorrelationPremise: just observations. We need more formal experiments to show causal connections.

● No correlation between steps and sleep quality (see next slide image)● Daily heart resting rate negatively correlates with sleep efficiency● Alcohol: asleep instantly, less restless, but more awakenings● Supplements

Melatonin: decrease in sleep efficiency, while minor increase with 5HTPNot enough data for vitamin B complex

11/15

Page 12: A quest for better sleep

12/15

Page 13: A quest for better sleep

What’s Next?● More data for correlation (drinking, eating, activity, cognitive performances,

habits and routines)

● Self experimentation to support causal relationship hypotheses

● Demographics

● Predictive models?

● Real quality data: EEG integration

● A personal quirky case: lucid dreaming

13/15

Page 14: A quest for better sleep

Q&A

Page 15: A quest for better sleep

Useful Links

1. Introductory article for this project

(https://medium.com/@5agado/a-quest-for-better-sleep-with-fitbit-data-analysis-5f10b3f548a#.925f35k2f)

2. Github repository with project code (https://github.com/5agado/fitbit-analyzer)

3. Intraday data via personal apps - Fitbit announcement post

(https://community.fitbit.com/t5/Web-API/Intraday-data-now-immediately-available-to-personal-apps/td-p/1014524)

4. Study on Fitbit accuracy on sleep measurements (https://www.ncbi.nlm.nih.gov/pubmed/21971963)

5. Cross-sectional study on the validity of consumer-level wearables

(https://ijbnpa.biomedcentral.com/articles/10.1186/s12966-015-0201-9)

15/15