actipy
Python Software Development Kit (SDK) to process wearable sensor data
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 4 DOI reference(s) in README -
✓Academic publication links
Links to: plos.org, zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.7%) to scientific vocabulary
Keywords
Repository
Python Software Development Kit (SDK) to process wearable sensor data
Basic Info
- Host: GitHub
- Owner: OxWearables
- License: other
- Language: Python
- Default Branch: master
- Homepage: https://actipy.readthedocs.io/en/latest/
- Size: 295 KB
Statistics
- Stars: 24
- Watchers: 3
- Forks: 11
- Open Issues: 3
- Releases: 36
Topics
Metadata Files
README.md
actipy
A Python package to process accelerometer data.
Axivity3 and Axivity6 (.cwa), Actigraph (.gt3x), GENEActiv (.bin), and Matrix (.bin) files are supported, as well as custom CSV files.
Axivity3 is the activity tracker watch used in the large-scale UK-Biobank accelerometer study.
Getting started
Prerequisite
Python 3.8 or greater
console $ python --version # or python3 --versionJava 8 (1.8.0) or greater
console $ java -version
Install
bash
$ pip install actipy
Usage
```python import actipy
data, info = actipy.readdevice("sample.cwa.gz", # or "sample.gt3x.gz" or "sample.bin.gz" lowpasshz=20, calibrategravity=True, detectnonwear=True, resample_hz=50) ```
Output: ```console data [pandas.DataFrame] x y z temperature light time 2014-05-07 13:29:50.430 -0.513990 0.070390 1.671922 20.000000 78.420235 2014-05-07 13:29:50.440 -0.233940 -0.586568 0.082067 20.000000 78.420235 2014-05-07 13:29:50.450 -0.080319 -0.950817 -0.810613 20.000000 78.420235 2014-05-07 13:29:50.460 -0.067236 -0.975886 -0.865132 20.000000 78.420235 2014-05-07 13:29:50.470 -0.109636 -0.857004 -0.508666 20.000000 78.420235 ... ... ... ... ... ...
info [dict] Filename : data/sample.cwa.gz Filesize(MB) : 69.4 Device : Axivity DeviceID : 13110 ReadErrors : 0 SampleRate : 100.0 ReadOK : 1 StartTime : 2014-05-07 13:29:50 EndTime : 2014-05-13 09:50:33 NumTicks : 51391800 WearTime(days) : 5.847725231481482 NumInterrupts : 1 ResampleRate : 100.0 NumTicksAfterResample : 25262174 LowpassOK : 1 LowpassCutoff(Hz) : 20.0 CalibErrorBefore(mg) : 82.95806873592024 CalibErrorAfter(mg) : 4.434966371604519 CalibOK : 1 NonwearTime(days) : 0.0 NumNonwearEpisodes : 0 ...
``` Refer to the Data Dictionary for a comprehensive list of outputs.
Processing a custom CSV file
You can also use the routines in actipy.processing to process custom CSV files, or for more fine-grained control:
```python import actipy.processing as P
data, infolowpass = P.lowpass(data, 100, 20) data, infocalib = P.calibrategravity(data) data, infononwear = P.flagnonwear(data) data, inforesample = P.resample(data, sample_rate) ```
See the documentation for more.
Processing from the command line
We also provide a command-line tool to process a device file (currently, only AX3 and AX6 are supported) and output to CSV:
bash
$ read_cwa sample.cwa.gz -o outputs --lowpass-hz 20 --resample-hz 50 --calibrate-gravity --detect-nonwear
Outputs: - "outputs/sample/sample.csv.gz" - "outputs/sample/sample-Info.json"
Contributing
If you would like to contribute to this repository, please check out CONTRIBUTING.md. We welcome contributions in the form of bug reports, feature requests, and pull requests.
License
See LICENSE.md.
Owner
- Name: Oxford Wearables Group
- Login: OxWearables
- Kind: organization
- Location: United Kingdom
- Twitter: OxWearables
- Repositories: 27
- Profile: https://github.com/OxWearables
Citation (CITATION.cff)
cff-version: 1.0.0 message: "If you use this software, please cite it as below." authors: - family-names: "Chan" given-names: "Shing" orcid: "https://orcid.org/0000-0001-9600-5575" - family-names: "Doherty" given-names: "Aiden" orcid: "https://orcid.org/0000-0003-1840-0451" title: "actipy: Python toolkit to process wearable sensor data" doi: 10.5281/zenodo.14514488 date-released: 2021-10-13 url: "https://github.com/OxWearables/actipy"
GitHub Events
Total
- Create event: 27
- Issues event: 6
- Release event: 10
- Watch event: 4
- Delete event: 17
- Issue comment event: 4
- Push event: 37
- Pull request event: 30
- Fork event: 3
Last Year
- Create event: 27
- Issues event: 6
- Release event: 10
- Watch event: 4
- Delete event: 17
- Issue comment event: 4
- Push event: 37
- Pull request event: 30
- Fork event: 3
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 137
- Total Committers: 1
- Avg Commits per committer: 137.0
- Development Distribution Score (DDS): 0.0
Top Committers
| Name | Commits | |
|---|---|---|
| Shing Chan | c****m@g****m | 137 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 22
- Total pull requests: 41
- Average time to close issues: 4 months
- Average time to close pull requests: 3 days
- Total issue authors: 8
- Total pull request authors: 4
- Average comments per issue: 1.36
- Average comments per pull request: 0.24
- Merged pull requests: 38
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 3
- Pull requests: 16
- Average time to close issues: 14 days
- Average time to close pull requests: 34 minutes
- Issue authors: 3
- Pull request authors: 1
- Average comments per issue: 0.67
- Average comments per pull request: 0.0
- Merged pull requests: 15
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- chanshing (7)
- angerhang (6)
- aidanacquah (3)
- muschellij2 (2)
- rmndrs89 (1)
- claaslendt (1)
- spiousas (1)
- abramschon (1)
Pull Request Authors
- chanshing (50)
- aidanacquah (6)
- angerhang (3)
- aidendoherty (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 4,645 last-month
- Total dependent packages: 5
- Total dependent repositories: 1
- Total versions: 37
- Total maintainers: 1
pypi.org: actipy
Python package to process wearable accelerometer data
- Homepage: https://github.com/OxWearables/actipy
- Documentation: https://actipy.readthedocs.io/
- License: See LICENSE.md
-
Latest release: 3.7.0
published 6 months ago
Rankings
Maintainers (1)
Dependencies
- docutils <0.18
- readthedocs-sphinx-search ==0.1.1
- sphinx ==4.2.0
- sphinx_rtd_theme ==1.0.0
- Jpype1 ==1.3.0
- numpy ==1.21.6
- pandas ==1.3.5
- scipy ==1.7.3
- statsmodels ==0.13.2
- actions/checkout v3 composite
- actions/setup-java v1 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-java v1 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-java v3 composite
- actions/setup-python v4 composite
- actions/checkout v3 composite
- actions/setup-java v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite