Converting Raw Accelerometer Data to Activity Counts Using Open-Source Code: Implementing a MATLAB Code in Python and R, and Comparing the Results to ActiLife

in Journal for the Measurement of Physical Behaviour

Click name to view affiliation

Ruben BrondeelGhent University
Research Foundation—Flanders (FWO)

Search for other papers by Ruben Brondeel in
Current site
Google Scholar
PubMed
Close
*
,
Yan KestensUniversity of Montreal

Search for other papers by Yan Kestens in
Current site
Google Scholar
PubMed
Close
*
,
Javad Rahimipour AnarakiMemorial University of Newfoundland

Search for other papers by Javad Rahimipour Anaraki in
Current site
Google Scholar
PubMed
Close
*
,
Kevin StanleyUniversity of Saskatchewan

Search for other papers by Kevin Stanley in
Current site
Google Scholar
PubMed
Close
*
,
Benoit ThierryUniversity of Montreal

Search for other papers by Benoit Thierry in
Current site
Google Scholar
PubMed
Close
*
, and
Daniel FullerMemorial University of Newfoundland

Search for other papers by Daniel Fuller in
Current site
Google Scholar
PubMed
Close
*
Restricted access

Background: Closed-source software for processing and analyzing accelerometer data provides little to no information about the algorithms used to transform acceleration data into physical activity indicators. Recently, an algorithm was developed in MATLAB that replicates the frequently used proprietary ActiLife activity counts. The aim of this software profile was (a) to translate the MATLAB algorithm into R and Python and (b) to test the accuracy of the algorithm on free-living data. Methods: As part of the INTErventions, Research, and Action in Cities Team, data were collected from 86 participants in Victoria (Canada). The participants were asked to wear an integrated global positioning system and accelerometer sensor (SenseDoc) for 10 days on the right hip. Raw accelerometer data were processed in ActiLife, MATLAB, R, and Python and compared using Pearson correlation, interclass correlation, and visual inspection. Results: Data were collected for a combined 749 valid days (>10 hr wear time). MATLAB, Python, and R counts per minute on the vertical axis had Pearson correlations with the ActiLife counts per minute of .998, .998, and .999, respectively. All three algorithms overestimated ActiLife counts per minute, some by up to 2.8%. Conclusions: A MATLAB algorithm for deriving ActiLife counts was implemented in R and Python. The different implementations provide similar results to ActiLife counts produced in the closed source software and can, for all practical purposes, be used interchangeably. This opens up possibilities to comparing studies using similar accelerometers from different suppliers, and to using free, open-source software.

Brondeel is with the Department of Movement and Sports Sciences, Ghent University, Gent, Belgium; and the Research Foundation—Flanders (FWO), Brussels, Belgium. Kestens and Thierry are with the University of Montreal, Montreal, Canada. Anaraki and Fuller are with the Memorial University of Newfoundland, St. John’s, Canada. Stanley is with the University of Saskatchewan, Saskatoon, Canada.

Brondeel (ruben.brondeel@ugent.be) is corresponding author.
  • Collapse
  • Expand
  • Bai, J., Di, C., Xiao, L., Evenson, K.R., LaCroix, A.Z., Crainiceanu, C.M., & Buchner, D.M. (2016). An activity index for raw accelerometry data and its comparison with other activity metrics. PLoS One, 11(8), e0160644. PubMed ID: 27513333 doi:10.1371/journal.pone.0160644

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Bassett, D.R., Troiano, R.P., Mcclain, J.J., & Wolff, D.L. (2015). Accelerometer-based physical activity: Total volume per day and standardized measures. Medicine & Science in Sports & Exercise, 47(4), 833838. PubMed ID: 25102292 doi:10.1249/MSS.0000000000000468

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Brønd, J.C. (2019, June 7, 2019). ActiGraph counts. Retrieved from https://github.com/jbrond/ActigraphCounts

  • Brønd, J.C., Andersen, L.B., & Arvidsson, D. (2017). Generating ActiGraph counts from raw acceleration recorded by an alternative monitor. Medicine & Science in Sports & Exercise, 49(11), 23512360. PubMed ID: 28604558 doi:10.1249/MSS.0000000000001344

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Brønd, J.C., & Arvidsson, D. (2016). Sampling frequency affects the processing of Actigraph raw acceleration data to activity counts. Journal of Applied Physiology, 120(3), 362369. doi:10.1152/japplphysiol.00628.2015

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Brondeel, R., Rahimipour Anaraki, J., Khataei Pour, S., & Fuller, D. (2019). activityCounts: Generating ActiLife Counts. R package version 0.1.2. https://CRAN.R-project.org/package=activityCounts

    • Search Google Scholar
    • Export Citation
  • Cain, K.L., Conway, T.L., Adams, M.A., Husak, L.E., & Sallis, J.F. (2013). Comparison of older and newer generations of ActiGraph accelerometers with the normal filter and the low frequency extension. International Journal of Behavioral Nutrition and Physical Activity, 10(1), 51. doi:10.1186/1479-5868-10-51

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Center, M.-H. (2020). Resample function—Resample uniform or nonuniform data to new fixed rate. Retrieved from https://nl.mathworks.com/help/signal/ref/resample.html

    • Search Google Scholar
    • Export Citation
  • Choi, L., Ward, S.C., Schnelle, J.F., & Buchowski, M.S. (2012). Assessment of wear/nonwear time classification algorithms for triaxial accelerometer. Medicine & Science in Sports & Exercise, 44(10), 20092016. PubMed ID: 22525772 doi:10.1249/MSS.0b013e318258cb36

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Choi, L.a., Cole, B., Liu, Z., Matthews, C.E., & Buchowski, M.S. (2018). PhysicalActivity: Process accelerometer data for physical activity measurement. R package version 0.2-2. Retrieved from https://CRAN.R-project.org/package=PhysicalActivity

    • Search Google Scholar
    • Export Citation
  • Clevenger, K.A., Pfeiffer, K.A., Mackintosh, K.A., McNarry, M.A., Brønd, J., Arvidsson, D., & Montoye, A.H. (2019). Effect of sampling rate on acceleration and counts of hip-and wrist-worn ActiGraph accelerometers in children. Physiological Measurement, 40(9), 095008. PubMed ID: 31518999 doi:10.1088/1361-6579/ab444b

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Eaton, J.W., Bateman, D., & Hauberg, S. (2013). GNU octave - A high-level interactive language for numerical computations. GNU Octave. Retrieved from https://octave.org/octave.pdf

    • Search Google Scholar
    • Export Citation
  • Hallal, P.C., Andersen, L.B., Bull, F.C., Guthold, R., Haskell, W., Ekelund, U., & Workin, L.P.A.S. (2012). Global physical activity levels: Surveillance progress, pitfalls, and prospects. The Lancet, 380(9838), 247257. doi:10.1016/S0140-6736(12)60646-1

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Hildebrand, M., Van Hees, V.T., Hansen, B.H., & Ekelund, U. (2014). Age group comparability of raw accelerometer output from wrist-and hip-worn monitors. Medicine & Science in Sports & Exercise, 46(9), 18161824. PubMed ID: 24887173 doi:10.1249/MSS.0000000000000289

    • Crossref
    • Search Google Scholar
    • Export Citation
  • INTERACT. (2019). Activity count algorithms. Retrieved from https://github.com/TeamINTERACT/publications/tree/master/count_algorithm_2019_Brondeel

    • Search Google Scholar
    • Export Citation
  • Kestens, Y., Chaix, B., Gerber, P., Despres, M., Gauvin, L., Klein, O., . . . Wasfi, R. (2016). Understanding the role of contrasting urban contexts in healthy aging: An international cohort study using wearable sensor devices (the CURHA study protocol). BMC Geriatrics, 16(1), 112.

    • Search Google Scholar
    • Export Citation
  • Kestens, Y., Winters, M., Fuller, D., Bell, S., Berscheid, J., Brondeel, R., . . . Wasfi, R. (2019). INTERACT: A comprehensive approach to assess urban form interventions through natural experiments. BMC Public Health, 19(1), 111. doi:10.1186/s12889-018-6339-z

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Open Lab at Newcastle University. AX3 OMGUI configuration and analysis tool (version V43). Retrieved from https://github.com/digitalinteraction/openmovement/wiki/AX3-GUI

    • Search Google Scholar
    • Export Citation
  • Plasqui, G., & Westerterp, K.R. (2007). Physical activity assessment with accelerometers: An evaluation against doubly labeled water. Obesity, 15(10), 23712379. PubMed ID: 17925461 doi:10.1038/oby.2007.281

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Rowlands, A., & Stiles, V. (2012). Accelerometer counts and raw acceleration output in relation to mechanical loading. Journal of Biomechanics, 45(3), 448454. PubMed ID: 22218284 doi:10.1016/j.jbiomech.2011.12.006

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Rowlands, A.V., Fraysse, F., Catt, M., Stiles, V.H., Stanley, R.M., Eston, R.G., & Olds, T.S. (2015). Comparability of measured acceleration from accelerometry-based activity monitors. Medicine & Science in Sports & Exercise, 47(1), 201210. PubMed ID: 24870577 doi:10.1249/MSS.0000000000000394

    • Crossref
    • Search Google Scholar
    • Export Citation
  • Signal developers. (2014). signal: Signal processing. Retrieved from http://r-forge.r-project.org/projects/signal/

  • Troiano, R.P., Berrigan, D., Dodd, K.W., Masse, L.C., Tilert, T., & McDowell, M. (2008). Physical activity in the United States measured by accelerometer. Medicine & Science in Sports & Exercise, 40(1), 181188. PubMed ID: 18091006 doi:10.1249/mss.0b013e31815a51b3

    • Crossref
    • Search Google Scholar
    • Export Citation
  • van Hees, V.a., Zhou F., Mirkes, E., Heywood, J., Zhao, J.H., Joan, C.P., Sabia, S., & Migueles, J.H. (2019). GGIR: Raw Accelerometer Data Analysis (Version 1.10-7): Zenodo.

    • Search Google Scholar
    • Export Citation
  • Van Rossum, G., & Drake , F.L., Jr. (1995). Python reference manual. Amsterdam, The Netherlands: Centrum voor Wiskunde en Informatica.

All Time Past Year Past 30 Days
Abstract Views 1830 1228 126
Full Text Views 33 20 1
PDF Downloads 52 31 0