https://github.com/avh4/sleep-as-android-parser
https://github.com/avh4/sleep-as-android-parser
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/avh4/sleep-as-android-parser
- Owner: avh4
- Created: 2014-07-26T18:02:38.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2014-07-27T15:40:32.000Z (almost 11 years ago)
- Last Synced: 2025-02-11T13:46:30.470Z (5 months ago)
- Language: JavaScript
- Size: 156 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](http://travis-ci.org/avh4/sleep-as-android-parser)
This is a script to parse and simplify the data exported by the [Sleep as Android](https://play.google.com/store/apps/details?id=com.urbandroid.sleep&hl=en) sleep tracker app. See the [documentation](https://sites.google.com/site/sleepasandroid/doc/backup) on how to export your data in the `sleep-export.csv` format for use with this script.
### Movement data
```
node main.js --csv-data sleep-export.csv
```Example output:
```csv
Timestamp,Movement,Noise
2014-07-26T02:40-0700,1.7019926,4314.405
2014-07-26T02:44-0700,0.29956794,446.9163
2014-07-26T02:47-0700,0.27947846,425.9386
2014-07-26T02:50-0700,0.2592457,443.99234
```### Events
```bash
node main.js --csv-events sleep-export.csv
```Example output:
```csv
Timestamp,Event
2014-07-26T02:37:27.010-0700,LIGHT_START
2014-07-26T02:40:47.276-0700,LIGHT_END
2014-07-26T02:40:47.276-0700,DEEP_START
2014-07-26T03:44:13.926-0700,REM_START
```