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.

Install

Minimum requirements: Python>=3.7, Java 8 (1.8)

The following instructions make use of Anaconda to meet the minimum requirements:

  1. Download & install Miniconda (light-weight version of Anaconda).
  2. (Windows) Once installed, launch the Anaconda Prompt.
  3. Create a virtual environment:
    $ conda create -n accelerometer python=3.9 openjdk pip
    
    This creates a virtual environment called accelerometer with Python version 3.9, OpenJDK, and Pip.
  4. Activate the environment:
    $ conda activate accelerometer
    
    You should now see (accelerometer) written in front of your prompt.
  5. Install accelerometer:
    $ pip install accelerometer
    

You are all set! The next time that you want to use accelerometer, open the Anaconda Prompt and activate the environment (step 4). If you see (accelerometer) in front of your prompt, you are ready to go!

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 plot the activity profile:

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

Time series plot

Troubleshooting

Some systems may face issues with Java when running the script. If this is your case, try fixing OpenJDK to version 8:

$ conda install -n accelerometer openjdk=8

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-7.2.1.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for accelerometer-7.2.1.tar.gz
Algorithm Hash digest
SHA256 e38583bc3060ce903996e198ef8015126a956798d6a5e50320befa8b83e7cd5e
MD5 578eab9ce432d545c2c772f95b6d51aa
BLAKE2b-256 0c27e6b9e76821614cc626fe1bf11514319d0a2311288d01cdb8caf7790f2582

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for accelerometer-7.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 643df320c3889853451ed07b4807eb7e3ee5d3c1c66ab5f137368880dd23c943
MD5 419423cbe27e84e1f233bc870b59a1c7
BLAKE2b-256 ae99b6184bd65af2327e186d77ab569b7ef6b3b286424e382fb1ef452cf76cd8

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