Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2024 Jan;7(1):jmpb.2023-0037.
doi: 10.1123/jmpb.2023-0037. Epub 2024 Apr 26.

agcounts: An R Package to Calculate ActiGraph Activity Counts From Portable Accelerometers

Affiliations

agcounts: An R Package to Calculate ActiGraph Activity Counts From Portable Accelerometers

Brian C Helsel et al. J Meas Phys Behav. 2024 Jan.

Abstract

Portable accelerometers are used to capture physical activity in free-living individuals with the ActiGraph being one of the most widely used device brands in physical activity and health research. Recently, in February 2022, ActiGraph published their activity count algorithm and released a Python package for generating activity counts from raw acceleration data for five generations of ActiGraph devices. The nonproprietary derivation of the ActiGraph count improved the transparency and interpretation of accelerometer device-measured physical activity, but the Python release of the count algorithm does not integrate with packages developed by the physical activity research community using the R Statistical Programming Language. In this technical note, we describe our efforts to create an R-based translation of ActiGraph's Python package with additional extensions to make data processing easier and faster for end users. We call the resulting R package agcounts and provide an inside look at its key functionalities and extensions while discussing its prospective impacts on collaborative open-source software development in physical behavior research. We recommend that device manufacturers follow ActiGraph's lead by providing open-source access to their data processing algorithms and encourage physical activity researchers to contribute to the further development and refinement of agcounts and other open-source software.

Keywords: measurement; open-source; physical activity; wearable devices.

PubMed Disclaimer

Figures

Figure 1 —
Figure 1 —
Average time elapsed running the calibrated reader functions. Microbenchmark was used to run 100 iterations on a 42-MB GT3X file.
Figure 2 —
Figure 2 —
The raw acceleration data module of the agcounts Shiny app. ENMO = Euclidean norm minus one; MAD = mean amplitude deviation.

References

    1. ActiGraph Data Science Team. (2023). Actiapi: A python package for accessing ActiGraph data through the official ActiGraph API. Version 0.2.6. https://pypi.org/project/actiapi/
    1. Adamowicz L, Christakis Y, Czech MD, & Adamusiak T (2022). SciKit digital health: Python package for streamlined wearable inertial sensor data processing. JMIR mHealth and uHealth, 10(4), Article e36762. 10.2196/36762 - DOI - PMC - PubMed
    1. Bakrania K, Yates T, Rowlands AV, Esliger DW, Bunnewell S, Sanders J, Davies M, Khunti K, & Edwardson CL (2016). Intensity thresholds on raw acceleration data: Euclidean norm minus one (ENMO) and mean amplitude deviation (MAD) approaches. PLoS One, 11(10), Article e0164045. 10.1371/journal.pone.0164045 - DOI - PMC - PubMed
    1. Barker M, Chue Hong NP, Katz DS, Lamprecht AL, Martinez-Ortiz C, Psomopoulos F, Harrow J, Castro LJ, Gruenpeter M, Martinez PA, & Honeyman T (2022). Introducing the FAIR principles for research software. Scientific Data, 9(1), Article 622. 10.1038/s41597-022-01710-x - DOI - PMC - PubMed
    1. Brønd JC, Aadland E, Andersen LB, Resaland GK, Andersen SA, & Arvidsson D (2019). The ActiGraph counts processing and the assessment of vigorous activity. Clinical Physiology and Functional Imaging, 39(4), 276–283. 10.1111/cpf.12571 - DOI - PubMed

LinkOut - more resources