actinet


Nameactinet JSON
Version 0.4.1 PyPI version JSON
download
home_pagehttps://github.com/OxWearables/actinet
SummaryActivity detection algorithm compatible with the UK Biobank Accelerometer Dataset
upload_time2025-08-28 07:31:52
maintainerShing Chan
docs_urlNone
authorAidan Acquah, Shing Chan, Aiden Doherty
requires_python<4,>=3.8
licenseSee LICENSE file.
keywords example setuptools versioneer
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ActiNet

[![GitHub all releases](https://img.shields.io/github/release/OxWearables/actinet.svg)](https://github.com/OxWearables/actinet/releases/)
[![DOI](https://zenodo.org/badge/751360921.svg)](https://doi.org/10.5281/zenodo.15310683)

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.9, Java 8 (1.8)

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

1. Download & install [Miniconda](https://docs.conda.io/en/latest/miniconda.html) (light-weight version of Anaconda).
1. (Windows) Once installed, launch the **Anaconda Prompt**.
1. Create a virtual environment:

    ```console
    conda create -n actinet python=3.9 openjdk pip
    ```

    This creates a virtual environment called `actinet` with Python version 3.9, OpenJDK, and Pip.
1. Activate the environment:

    ```console
    conda activate actinet
    ```

    You should now see `(actinet)` written in front of your prompt.
1. Install `actinet`:

    ```console
    pip install actinet
    ```

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

## Usage

```bash
# Process an AX3 file
$ actinet sample.cwa.gz

# Or an ActiGraph file
$ actinet sample.gt3x

# Or a GENEActiv file
$ actinet sample.bin

# Or a CSV file (see data format below)
$ actinet sample.csv
```

See the [Usage](https://actinet.readthedocs.io/en/latest/usage.html) page for further uses of the tool.

### Troubleshooting

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

```console
conda create -n actinet openjdk=8
```

### Output files

By default, output files will be stored in a folder named after the input file, `outputs/{filename}/`, created in the current working directory.
You can change the output path with the `-o` flag:

```console
$ actinet sample.cwa -o /path/to/some/folder/

<Output summary written to: /path/to/some/folder/sample-outputSummary.json>
<Time series output written to: /path/to/some/folder/sample-timeSeries.csv.gz>
```

The following output files are created:

- *Info.json* Summary info, as shown above.
- *timeSeries.csv* Raw time-series of activity levels

See [Data Dictionary](https://actinet.readthedocs.io/en/latest/datadict.html) for the list of output variables.

### Plotting activity profiles

To plot the activity profiles, you can use the -p flag:

```console
$ actinet sample.cwa -p
<Output plot written to: data/sample-timeSeries-plot.png>
```

### Crude vs. Adjusted Estimates

Adjusted estimates are provided that account for missing data.
Missing values in the time-series are imputed with the mean of the same timepoint of other available days.
For adjusted totals and daily statistics, 24h multiples are needed and will be imputed if necessary.
Estimates will be NaN where data is still missing after imputation.

### Processing multiple files

#### Windows

To process multiple files you can create a text file in Notepad which includes one line for each file you wish to process, as shown below for *file1.cwa*, *file2.cwa*, and *file2.cwa*.

Example text file *commands.txt*:

```console
actinet file1.cwa &
actinet file2.cwa &
actinet file3.cwa 
:END
````

Once this file is created, run `cmd < commands.txt` from the terminal.

#### Linux

Create a file *command.sh* with:

```console
actinet file1.cwa
actinet file2.cwa
actinet file3.cwa
```

Then, run `bash command.sh` from the terminal.

### Collating outputs

A utility script is provided to collate outputs from multiple runs:

```console
actinet-collate-outputs outputs/
```

This will collate all *-Info.json files found in outputs/ and generate a CSV file.

## Citing our work

When using this tool, please consider citing the works listed in [CITATION.md](https://github.com/OxWearables/actinet/blob/master/CITATION.md).

## Licence

See [LICENSE.md](https://github.com/OxWearables/actinet/blob/master/LICENSE.md).

## Acknowledgements

We would like to thank all our code contributors, manuscript co-authors, and research participants for their help in making this work possible.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OxWearables/actinet",
    "name": "actinet",
    "maintainer": "Shing Chan",
    "docs_url": null,
    "requires_python": "<4,>=3.8",
    "maintainer_email": "shing.chan@ndph.ox.ac.uk",
    "keywords": "example, setuptools, versioneer",
    "author": "Aidan Acquah, Shing Chan, Aiden Doherty",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/35/84/af4e21c50f3cfd35dac7746bcbd7ad69b35d52a26af18e654d64512cb914/actinet-0.4.1.tar.gz",
    "platform": null,
    "description": "# ActiNet\n\n[![GitHub all releases](https://img.shields.io/github/release/OxWearables/actinet.svg)](https://github.com/OxWearables/actinet/releases/)\n[![DOI](https://zenodo.org/badge/751360921.svg)](https://doi.org/10.5281/zenodo.15310683)\n\nA tool to extract meaningful health information from large accelerometer datasets.\nThe 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.\n\n## Install\n\n*Minimum requirements*: Python>=3.9, Java 8 (1.8)\n\nThe following instructions make use of Anaconda to meet the minimum requirements:\n\n1. Download & install [Miniconda](https://docs.conda.io/en/latest/miniconda.html) (light-weight version of Anaconda).\n1. (Windows) Once installed, launch the **Anaconda Prompt**.\n1. Create a virtual environment:\n\n    ```console\n    conda create -n actinet python=3.9 openjdk pip\n    ```\n\n    This creates a virtual environment called `actinet` with Python version 3.9, OpenJDK, and Pip.\n1. Activate the environment:\n\n    ```console\n    conda activate actinet\n    ```\n\n    You should now see `(actinet)` written in front of your prompt.\n1. Install `actinet`:\n\n    ```console\n    pip install actinet\n    ```\n\nYou are all set! The next time that you want to use `actinet`, open the Anaconda Prompt and activate the environment (step 4). If you see `(actinet)` in front of your prompt, you are ready to go!\n\n## Usage\n\n```bash\n# Process an AX3 file\n$ actinet sample.cwa.gz\n\n# Or an ActiGraph file\n$ actinet sample.gt3x\n\n# Or a GENEActiv file\n$ actinet sample.bin\n\n# Or a CSV file (see data format below)\n$ actinet sample.csv\n```\n\nSee the [Usage](https://actinet.readthedocs.io/en/latest/usage.html) page for further uses of the tool.\n\n### Troubleshooting\n\nSome systems may face issues with Java when running the script. If this is your case, try fixing OpenJDK to version 8:\n\n```console\nconda create -n actinet openjdk=8\n```\n\n### Output files\n\nBy default, output files will be stored in a folder named after the input file, `outputs/{filename}/`, created in the current working directory.\nYou can change the output path with the `-o` flag:\n\n```console\n$ actinet sample.cwa -o /path/to/some/folder/\n\n<Output summary written to: /path/to/some/folder/sample-outputSummary.json>\n<Time series output written to: /path/to/some/folder/sample-timeSeries.csv.gz>\n```\n\nThe following output files are created:\n\n- *Info.json* Summary info, as shown above.\n- *timeSeries.csv* Raw time-series of activity levels\n\nSee [Data Dictionary](https://actinet.readthedocs.io/en/latest/datadict.html) for the list of output variables.\n\n### Plotting activity profiles\n\nTo plot the activity profiles, you can use the -p flag:\n\n```console\n$ actinet sample.cwa -p\n<Output plot written to: data/sample-timeSeries-plot.png>\n```\n\n### Crude vs. Adjusted Estimates\n\nAdjusted estimates are provided that account for missing data.\nMissing values in the time-series are imputed with the mean of the same timepoint of other available days.\nFor adjusted totals and daily statistics, 24h multiples are needed and will be imputed if necessary.\nEstimates will be NaN where data is still missing after imputation.\n\n### Processing multiple files\n\n#### Windows\n\nTo process multiple files you can create a text file in Notepad which includes one line for each file you wish to process, as shown below for *file1.cwa*, *file2.cwa*, and *file2.cwa*.\n\nExample text file *commands.txt*:\n\n```console\nactinet file1.cwa &\nactinet file2.cwa &\nactinet file3.cwa \n:END\n````\n\nOnce this file is created, run `cmd < commands.txt` from the terminal.\n\n#### Linux\n\nCreate a file *command.sh* with:\n\n```console\nactinet file1.cwa\nactinet file2.cwa\nactinet file3.cwa\n```\n\nThen, run `bash command.sh` from the terminal.\n\n### Collating outputs\n\nA utility script is provided to collate outputs from multiple runs:\n\n```console\nactinet-collate-outputs outputs/\n```\n\nThis will collate all *-Info.json files found in outputs/ and generate a CSV file.\n\n## Citing our work\n\nWhen using this tool, please consider citing the works listed in [CITATION.md](https://github.com/OxWearables/actinet/blob/master/CITATION.md).\n\n## Licence\n\nSee [LICENSE.md](https://github.com/OxWearables/actinet/blob/master/LICENSE.md).\n\n## Acknowledgements\n\nWe would like to thank all our code contributors, manuscript co-authors, and research participants for their help in making this work possible.\n",
    "bugtrack_url": null,
    "license": "See LICENSE file.",
    "summary": "Activity detection algorithm compatible with the UK Biobank Accelerometer Dataset",
    "version": "0.4.1",
    "project_urls": {
        "Download": "https://github.com/OxWearables/actinet",
        "Homepage": "https://github.com/OxWearables/actinet"
    },
    "split_keywords": [
        "example",
        " setuptools",
        " versioneer"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "cbed30cf581dddb1cf7297df68851638b883567f9cb15ee55f5439dec84cae4b",
                "md5": "602e72840db164d4ad9c8841e216257f",
                "sha256": "a62c8ae4e3e51a3f14992c656cfedb0a92fef1fb5d1048b7611090a87b8b9ab8"
            },
            "downloads": -1,
            "filename": "actinet-0.4.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "602e72840db164d4ad9c8841e216257f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.8",
            "size": 48314,
            "upload_time": "2025-08-28T07:31:50",
            "upload_time_iso_8601": "2025-08-28T07:31:50.836648Z",
            "url": "https://files.pythonhosted.org/packages/cb/ed/30cf581dddb1cf7297df68851638b883567f9cb15ee55f5439dec84cae4b/actinet-0.4.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3584af4e21c50f3cfd35dac7746bcbd7ad69b35d52a26af18e654d64512cb914",
                "md5": "82ce54c6088b8281016792e2b93eaeaf",
                "sha256": "102c8ffe7d77f1f5a818ca1cd46b0ac1ee5080a7ea66b4338bcb94a0cbec0ba4"
            },
            "downloads": -1,
            "filename": "actinet-0.4.1.tar.gz",
            "has_sig": false,
            "md5_digest": "82ce54c6088b8281016792e2b93eaeaf",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.8",
            "size": 65287,
            "upload_time": "2025-08-28T07:31:52",
            "upload_time_iso_8601": "2025-08-28T07:31:52.034027Z",
            "url": "https://files.pythonhosted.org/packages/35/84/af4e21c50f3cfd35dac7746bcbd7ad69b35d52a26af18e654d64512cb914/actinet-0.4.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-28 07:31:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OxWearables",
    "github_project": "actinet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "actinet"
}
        
Elapsed time: 4.77722s