• Stars
    star
    168
  • Rank 224,176 (Top 5 %)
  • Language
    Python
  • License
    Other
  • Created about 10 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Extracting meaningful health information from large accelerometer datasets

Accelerometer data processing overview

Github all releases install flake8 junit gt3x cwa

A tool to extract meaningful health information from large accelerometer datasets. The software generates time-series and summary metrics useful for answering key questions such as how much time is spent in sleep, sedentary behaviour, or doing physical activity.

Installation

pip install accelerometer

You also need Java 8 (1.8.0) or greater. Check with the following:

java -version

You can try the following to check that everything works properly:

# Create an isolated environment
$ mkdir test_baa/ ; cd test_baa/
$ python -m venv baa
$ source baa/bin/activate

# Install and test
$ pip install accelerometer
$ wget -P data/ http://gas.ndph.ox.ac.uk/aidend/accModels/sample.cwa.gz  # download a sample file
$ accProcess data/sample.cwa.gz
$ accPlot data/sample-timeSeries.csv.gz

Usage

To extract summary movement statistics from an Axivity file (.cwa):

$ accProcess data/sample.cwa.gz

 <output written to data/sample-outputSummary.json>
 <time series output written to data/sample-timeSeries.csv.gz>

Movement statistics will be stored in a JSON file:

{
    "file-name": "sample.cwa.gz",
    "file-startTime": "2014-05-07 13:29:50",
    "file-endTime": "2014-05-13 09:49:50",
    "acc-overall-avg(mg)": 32.78149,
    "wearTime-overall(days)": 5.8,
    "nonWearTime-overall(days)": 0.04,
    "quality-goodWearTime": 1
}

See Data Dictionary for the list of output variables.

Actigraph and GENEActiv files are also supported, as well as custom CSV files. See Usage for more details.

To visualise the activity profile:

$ accPlot data/sample-timeSeries.csv.gz
 <output plot written to data/sample-timeSeries-plot.png>

Time series plot

Under the hood

Interpreted levels of physical activity can vary, as many approaches can be taken to extract summary physical activity information from raw accelerometer data. To minimise error and bias, our tool uses published methods to calibrate, resample, and summarise the accelerometer data.

Accelerometer data processing overview Activity classification

See Methods for more details.

Citing our work

When using this tool, please consider the works listed in CITATION.md.

Licence

See LICENSE.md.

Acknowledgements

We would like to thank all our code contributors and manuscript co-authors.

Contributors Graph

More Repositories

1

ssl-wearables

Self-supervised learning for wearables using the UK-Biobank (>700,000 person-days)
Jupyter Notebook
96
star
2

actipy

Python Software Development Kit (SDK) to process Axivity, GENEActiv, and Actigraph files
Python
18
star
3

stepcount

A step-counting model based on self-supervised learning for wrist-worn accelerometer data.
Jupyter Notebook
14
star
4

ukb_download_and_prep_template

This repository facilitates common data pre-processing steps when working with UK Biobank data.
Python
13
star
5

Oxford_Wearables_Activity_Recognition

Notebooks for Oxford CDT Wearables Data Challenge
Jupyter Notebook
11
star
6

capture24

Capture24: Human activity recognition with activity trackers
Jupyter Notebook
11
star
7

asleep

asleep: a sleep classifier for wearable sensor data using machine learning
Python
11
star
8

rap_wearables

A demo/example pipeline for analysing wearables data using the RAP.
Jupyter Notebook
7
star
9

epicoda

Supports epidemiological analyses using compositional exposure variables
R
6
star
10

oxford-wearable-camera-browser

Browse and annotate wearable camera images in health studies
JavaScript
5
star
11

UKB_steps_mortality

This repository holds the statistical analysis code for the association of steps and mortality in the UK Biobank
Jupyter Notebook
5
star
12

RMLHDS

Jupyter Notebook
4
star
13

capture24_neurips

Capture24: Activity recognition on a large activity tracker dataset collected in the wild
Jupyter Notebook
3
star
14

wearable-camera-desktop-browser

Analysing wearable camera on a standalone PC
C#
2
star
15

pyfew

A simple and light-weight feature extractor for wearable accelerometer data.
Python
2
star
16

actinet

An activity classification model based on self-supervised learning for wrist-worn accelerometer data.
Python
2
star
17

wearable-teaching

Jupyter Notebook
1
star
18

manuscript_ml_behaviours_cvd_2021

R
1
star
19

pd_walking

Detect walking in the PD population
Python
1
star