Skip to main content

A package to extract meaningful health information from large accelerometer datasets e.g. how much time individuals spend in sleep, sedentary behaviour, walking and moderate intensity physical activity

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

accelerometer-6.2.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

accelerometer-6.2.0-py3-none-any.whl (1.5 MB view details)

Uploaded Python 3

File details

Details for the file accelerometer-6.2.0.tar.gz.

File metadata

  • Download URL: accelerometer-6.2.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.16

File hashes

Hashes for accelerometer-6.2.0.tar.gz
Algorithm Hash digest
SHA256 e50778f161f229fc47f2eb2d59c5c9cfacbe409a40c91951f7a4fd2564d29841
MD5 a886878b6e7eefa7e27593a06d76c447
BLAKE2b-256 da80d38c48e936cf4e1ee222e5fc52b76c035c1a8317b0c6b2ec9a7e4f59166b

See more details on using hashes here.

File details

Details for the file accelerometer-6.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for accelerometer-6.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a0526682d7a979b6f0ba9507bc81f09853a4009cfd44bfe3274feca3c8fc2ed5
MD5 9332796bfb4dae13ae7c1d185ea9b197
BLAKE2b-256 eb2203ce3d1e243a896c6766badd1a16ec4f83dd82afe87a85f1d2d337f5317f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page