Semi-Automated Processing of Harmonized Accelerometer and GPS Data in R: AGPSR
Abstract
1. Introduction
2. Methods
2.1. E3 Study Protocols
2.1.1. Accelerometer
2.1.2. Global Positioning System (GPS)
2.2. AGPSR
2.3. AGPSR Step 1. Accelerometer Data Pre-Processing via the gt3x_Function
2.4. AGPSR Step 2. GPS Data Pre-Processing via the gps_Function
2.5. AGPSR Step 3. Harmonized Accelerometer and GPS Data via the Harmonize_Function
2.6. Preliminary Validity and Software Demonstration
2.7. Manual Actilife Scoring Approach
3. Results
3.1. AGSPR Step 1
3.2. AGPSR Step 2
3.3. AGPSR Step 3
4. Discussion
Supplementary Materials
Author Contributions
Funding
Conflicts of Interest
References
- Kim, E.-K.; Conrow, L.; Röcke, C.; Chaix, B.; Weibel, R.; Perchoux, C. Advances and challenges in sensor-based research in mobility, health, and place. Health Place 2023, 79, 102972. [Google Scholar] [CrossRef] [PubMed]
- Comini, E. Achievements and Challenges in Sensor Devices. Front. Sens. 2021, 1, 607063. [Google Scholar] [CrossRef]
- Ortega, F.; Cano, E.L. Sensor Data Analytics: Challenges and Methods for Data-Intensive Applications. Entropy 2022, 24, 850. [Google Scholar] [CrossRef] [PubMed]
- Jankowska, M.M.; Yang, J.A.; Luo, N.; Spoon, C.; Benmarhnia, T. Accounting for space, time, and behavior using GPS derived dynamic measures of environmental exposure. Health Place 2023, 79, 102706. [Google Scholar] [CrossRef] [PubMed]
- TIOBE Index. Available online: https://www.tiobe.com/tiobe-index/r/ (accessed on 23 March 2025).
- ActiLife Software|ActiGraph. Available online: https://actigraphcorp.com/support/software/actilife/ (accessed on 23 March 2025).
- Migueles, J.H.; Cadenas-Sanchez, C.; Ekelund, U.; Delisle Nyström, C.; Mora-Gonzalez, J.; Löf, M.; Labayen, I.; Ruiz, J.R.; Ortega, F.B. Accelerometer Data Collection and Processing Criteria to Assess Physical Activity and Other Outcomes: A Systematic Review and Practical Considerations. Sports Med. 2017, 47, 1821. [Google Scholar] [CrossRef] [PubMed]
- Accelerometry R Package. Available online: https://cran.r-project.org/web/packages/accelerometry/index.html (accessed on 23 March 2025).
- GGIR R Package. Available online: https://cran.r-project.org/web/packages/GGIR/GGIR.pdf (accessed on 23 March 2025).
- Physical Activity R Package. Available online: https://cran.r-project.org/web/packages/PhysicalActivity/PhysicalActivity.pdf (accessed on 23 March 2025).
- Patrick, K.; Kerr, J.; Norman, G.; Ryan, S.; Sallis, J.; Krueger, I.; Griswold, W.; Demchak, B.; Dietrich, S.; Raab, F. A tool for geospatial analysis of physical activity: Physical Activity Location Measurement System (PALMS). Med. Sci. Sports Exerc. 2009, 41, 10. [Google Scholar] [CrossRef]
- Chaix, B.; Benmarhnia, T.; Kestens, Y.; Brondeel, R.; Perchoux, C.; Gerber, P.; Duncan, D.T. Combining sensor tracking with a GPS-based mobility survey to better measure physical activity in trips: Public transport generates walking. Int. J. Behav. Nutr. Phys. Act. 2019, 16, 84. [Google Scholar] [CrossRef] [PubMed]
- Fernandes, A.; Van Lenthe, F.J.; Vallée, J.; Sueur, C.; Chaix, B. Linking physical and social environments with mental health in old age: A multisensor approach for continuous real-life ecological and emotional assessment. J. Epidemiol. Community Health 2021, 75, 477–483. [Google Scholar] [CrossRef] [PubMed]
- Zhu, L.; Duval, C.; Boissy, P.; Montero-Odasso, M.; Zou, G.; Jog, M.; Speechley, M. Comparing GPS-Based Community Mobility Measures with Self-report Assessments in Older Adults with Parkinson’s Disease. J. Gerontol. A Biol. Sci. Med. Sci. 2020, 75, 2361–2370. [Google Scholar] [CrossRef] [PubMed]
- Breasail, M.; Biswas, B.; Smith, M.D.; Mazhar, M.K.A.; Tenison, E.; Cullen, A.; Lithander, F.E.; Roudaut, A.; Henderson, E.J. Wearable GPS and Accelerometer Technologies for Monitoring Mobility and Physical Activity in Neurodegenerative Disorders: A Systematic Review. Sensors 2021, 21, 8261. [Google Scholar] [CrossRef] [PubMed]
- E3. Dynamic Environmental Exposure Approach to Study Behaviors. Available online: https://e3.uic.edu/ (accessed on 23 March 2025).
- ActiGraph wGT3X-BT. Available online: https://actigraphcorp.com/actigraph-wgt3x-bt/ (accessed on 23 March 2025).
- Knaier, R.; Höchsmann, C.; Infanger, D.; Hinrichs, T.; Schmidt-Trucksäss, A. Validation of automatic wear-time detection algorithms in a free-living setting of wrist-worn and hip-worn ActiGraph GT3X+. BMC Public Health 2019, 19, 244. [Google Scholar] [CrossRef] [PubMed]
- QStarz International Co. QStarz bt-q1000xt Travel Recorder XT; QStarz International Co.: Taipei, Taiwan, 2013. [Google Scholar]
- Jtucode/AGPSR. Available online: https://github.com/qiqipower029/AGPSR (accessed on 23 March 2025).
- Brond, J.C.; Andersen, L.B.; Arvidsson, D. Generating ActiGraph Counts from Raw Acceleration Recorded by an Alternative Monitor. Med. Sci. Sports Exerc. 2017, 49, 2351–2360. [Google Scholar] [CrossRef] [PubMed]
- Luong, A.; Goodyke, M.; Dunn, S.L.; Baynard, T.; Bronas, U. ActiGraph and Short-term Heart Rate Variability Study Protocol: Amended for the COVID-19 Pandemic. J. Cardiovasc. Nurs. 2021, 36, 599–608. [Google Scholar] [CrossRef] [PubMed]
- Matarazzo, T.J.; Kondor, D.; Milardo, S.; Eshkevari, S.S.; Santi, P.; Pakzad, S.N.; Buehler, M.J. Crowdsourcing bridge dynamic monitoring with smartphone vehicle trips. Commun. Eng. 2022, 1, 29. [Google Scholar] [CrossRef]
- Qu, X.; Ding, X.; Xu, Y.-L.; Yu, W. Real-time outlier detection in integrated GNSS and accelerometer structural health monitoring systems based on a robust multi-rate Kalman filter. J. Geod. 2023, 97, 38. [Google Scholar] [CrossRef]
Date | First Wear Minute | Last Wear Minute | Non-Wear Time (Hours) | Wear Time (Hours) | Decision on Inclusion | Reason for Exclusion | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
ActiLife | R | ActiLife | R | ActiLife | R | ActiLife | R | ActiLife | R | ActiLife | R | |
4/28/2022 | Exclude | Exclude | 1st day of study | 1st day of study | ||||||||
4/29/2022 | 7:00 a.m. | 6:55:00 | 9:45 p.m. | 21:37:00 | 9.25 | 0 | 14.25 | 14.7 | Include | Include | ||
4/30/2022 | 7:15 a.m. | 7:15:00 | 10:30 p.m. | 22:20:00 | 10.75 | 0.75 | 13.25 | 14.33 | Include | Include | ||
5/1/2022 | 8:15 a.m. | 8:08:00 | 10:00 p.m. | 21:54:00 | 10.75 | 1.5 | 16 | 12.27 | Include | |||
5/2/2022 | 7:15 a.m. | 7:13:00 | 9:30 p.m. | 21:26:00 | 9.75 | 0 | 14.5 | 14.22 | Include | |||
5/3/2022 | 6:45 a.m. | 6:50:00 | 10:00 p.m. | 21:55:00 | 10.75 | 0 | 14.25 | 15.08 | Include | |||
5/4/2022 | 7:00 a.m. | 7:00:00 | 8:00 p.m. | 20:04:00 | 11 | 0 | 14.75 | 13.07 | Include | |||
5/5/2022 | 7:00 a.m. | 6:55:00 | 9:15 p.m. | 21:08:00 | 9.75 | 0 | 14.25 | 14.22 | Include | |||
5/6/2022 | 6:45 a.m. | 6:45:00 | 8:45 p.m. | 20:42:00 | 10 | 0 | 14 | 13.95 | Include | |||
5/7/2022 | 8:00 a.m. | 8:01:00 | 9:15 p.m. | 21:15:00 | 10.75 | 0.75 | 14.75 | 12.48 | Include | |||
5/8/2022 | 8:00 a.m. | 8:02:00 | 9:15 p.m. | 21:15:00 | 10.75 | 0 | 14.5 | 13.22 | Include | |||
5/9/2022 | 6:30 a.m. | 6:35:00 | 9:15 p.m. | 21:10:00 | 9.25 | 0 | 14.5 | 14.58 | Include | |||
5/10/2022 | 6:45 a.m. | 6:39:00 | 8:45 p.m. | 20:45:00 | 10 | 0 | 14 | 14.1 | Include | |||
5/11/2022 | Excluded | 16:43:00 | Excluded | 20:10:00 | Excluded | 0 | <10 | 3.45 | Exclude | Exclude | <10 h wear time | wear time < 10 h |
5/12/2022 | 7:15 a.m. | 7:12:00 | 10:15 p.m. | 22:08:00 | 9 | 0 | 14.25 | 14.93 | Include | |||
5/13/2022 | 7:15 a.m. | 6:40:00 | 9:15 p.m. | 21:14:00 | 10 | 0 | 13.25 | 14.57 | Include | |||
5/14/2022 | 9:30 a.m. | 9:28:00 | 8:15 p.m. | 22:41:00 | 13.25 | 0 | 13.25 | 13.22 | Include | |||
5/15/2022 | 8:45 a.m. | 8:42:00 | 9:15 p.m. | 21:16:00 | 11.5 | 1.5 | 13.25 | 11.07 | Include | |||
5/16/2022 | 7:30 a.m. | 7:29:00 | 9:30 p.m. | 21:20:00 | 10 | 0 | 15.25 | 13.85 | Include | |||
5/17/2022 | 6:30 a.m. | 6:35:00 | 9:15 p.m. | 21:17:00 | 9.25 | 0 | 13.75 | 14.7 | Include | |||
5/18/2022 | 7:00 a.m. | 7:04:00 | 9:00 p.m. | 21:05:00 | 10 | 0.75 | 14 | 13.27 | Include | |||
5/19/2022 | Excluded | 7:18:00 | Excluded | 23:57:00 | Excluded | 7.5 | Excluded | 9.15 | Exclude | Exclude | <10 h wear time | wear time <10 h |
Local Date | Local Time | Latitude | North (N)/South (S) | Longitude | East (E)/West (W) | Height (M) | Speed (km/h) |
---|---|---|---|---|---|---|---|
… | … | … | … | … | … | … | … |
2022/05/12 | 12:49:54 | 43.08822 | N | 90.06465 | W | 150.083 | 0.086 |
2022/05/12 | 12:50:54 | 43.08822 | N | 90.06465 | W | 150.263 | 0.120 |
2022/05/12 | 12:51:54 | 43.08822 | N | 90.06465 | W | 150.366 | 0.152 |
2022/05/12 | 12:52:54 | 43.08821 | N | 90.06464 | W | 150.411 | 0.041 |
2022/05/12 | 12:53:54 | 43.08821 | N | 90.06463 | W | 150.512 | 0.059 |
2022/05/12 | 12:54:54 | 43.08821 | N | 90.06463 | W | 150.527 | 0.061 |
2022/05/12 | 12:55:54 | 43.08821 | N | 90.06463 | W | 150.724 | 0.067 |
2022/05/12 | 12:56:54 | 43.0882 | N | 90.06463 | W | 150.776 | 0.116 |
2022/05/12 | 12:57:54 | 43.0882 | N | 90.06463 | W | 151.118 | 0.147 |
2022/05/12 | 12:58:54 | 43.0882 | N | 90.06461 | W | 150.992 | 0.229 |
2022/05/12 | 12:59:54 | 43.08819 | N | 90.06461 | W | 150.895 | 0.069 |
2022/05/12 | 13:00:54 | 43.08819 | N | 90.06461 | W | 150.981 | 0.152 |
2022/05/12 | 13:01:54 | 43.08819 | N | 90.06461 | W | 151.061 | 0.210 |
2022/05/12 | 13:02:54 | 43.08814 | N | 90.06454 | W | 150.809 | 0.690 |
2022/05/12 | 13:03:54 | 43.08809 | N | 90.06459 | W | 150.271 | 0.772 |
2022/05/12 | 13:04:54 | 43.08811 | N | 90.0646 | W | 151.155 | 0.897 |
2022/05/12 | 13:05:54 | 43.08804 | N | 90.06461 | W | 151.734 | 1.754 |
2022/05/12 | 13:06:54 | 43.08817 | N | 90.06452 | W | 151.621 | 1.309 |
2022/05/12 | 13:07:54 | 43.08825 | N | 90.06464 | W | 151.464 | 0.572 |
2022/05/12 | 13:08:54 | 43.08826 | N | 90.06464 | W | 151.070 | 0.515 |
2022/05/12 | 13:09:54 | 43.08827 | N | 90.06464 | W | 154.035 | 0.740 |
2022/05/12 | 13:10:54 | 43.08829 | N | 90.06466 | W | 157.247 | 0.571 |
2022/05/12 | 13:11:54 | 43.08829 | N | 90.06468 | W | 159.437 | 0.049 |
2022/05/12 | 13:12:54 | 43.08829 | N | 90.06467 | W | 159.374 | 0.043 |
2022/05/12 | 13:13:54 | 43.08828 | N | 90.06467 | W | 159.315 | 0.137 |
… | … | … | … | … | … | … | … |
Local Date | Local Time | Latitude | North (N)/South (S) | Longitude | East (E) or West (W) | Height (M) | Speed | Activity Type |
---|---|---|---|---|---|---|---|---|
… | … | … | … | … | … | … | … | … |
2022/05/12 | 12:49:54 | 42.8391 | N | 85.34715 | W | 160.264 | 0.149 | Sedentary |
2022/05/12 | 12:50:54 | 42.83911 | N | 85.34715 | W | 160.086 | 0.173 | Sedentary |
2022/05/12 | 12:51:54 | 42.83911 | N | 85.34714 | W | 160.123 | 0.157 | Sedentary |
2022/05/12 | 12:52:54 | 42.8391 | N | 85.34714 | W | 160.375 | 0.093 | Sedentary |
2022/05/12 | 12:53:54 | 42.8391 | N | 85.34713 | W | 160.338 | 0.065 | Sedentary |
2022/05/12 | 12:54:54 | 42.83909 | N | 85.34713 | W | 160.422 | 0.025 | Sedentary |
2022/05/12 | 12:55:54 | 42.8391 | N | 85.34712 | W | 160.350 | 0.031 | Low light |
2022/05/12 | 12:56:54 | 42.8391 | N | 85.34712 | W | 160.305 | 0.063 | Low light |
2022/05/12 | 12:57:54 | 42.8391 | N | 85.34712 | W | 159.964 | 0.035 | Low light |
2022/05/12 | 12:58:54 | 42.8391 | N | 85.34712 | W | 160.022 | 0.007 | High light |
2022/05/12 | 12:59:54 | 42.8391 | N | 85.34712 | W | 159.706 | 0.052 | Sedentary |
2022/05/12 | 13:00:54 | 42.8391 | N | 85.34712 | W | 159.438 | 0.043 | Sedentary |
2022/05/12 | 13:01:54 | 42.8391 | N | 85.34712 | W | 159.150 | 0.048 | Sedentary |
2022/05/12 | 13:02:54 | 42.8391 | N | 85.34712 | W | 158.740 | 0.005 | Sedentary |
2022/05/12 | 13:03:54 | 42.8391 | N | 85.34711 | W | 158.473 | 0.068 | Sedentary |
2022/05/12 | 13:04:54 | 42.8391 | N | 85.34712 | W | 158.068 | 0.024 | Sedentary |
2022/05/12 | 13:05:54 | 42.8391 | N | 85.34712 | W | 157.828 | 0.032 | Sedentary |
2022/05/12 | 13:06:54 | 42.8391 | N | 85.34712 | W | 157.755 | 0.010 | Sedentary |
2022/05/12 | 13:07:54 | 42.8391 | N | 85.34712 | W | 157.648 | 0.029 | Sedentary |
2022/05/12 | 13:08:54 | 42.8391 | N | 85.34712 | W | 157.797 | 0.014 | Sedentary |
2022/05/12 | 13:09:54 | 42.8391 | N | 85.34713 | W | 157.913 | 0.024 | Sedentary |
2022/05/12 | 13:10:54 | 42.8391 | N | 85.34713 | W | 158.087 | 0.038 | Sedentary |
2022/05/12 | 13:11:54 | 42.8391 | N | 85.34713 | W | 158.096 | 0.046 | Sedentary |
2022/05/12 | 13:12:54 | 42.8391 | N | 85.34713 | W | 158.145 | 0.035 | Sedentary |
2022/05/12 | 13:13:54 | 42.8391 | N | 85.34712 | W | 157.846 | 0.025 | Sedentary |
… | … | … | … | … | … | … | … | … |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Tintle, N.; Tu, J.; Luong, A.; Min, S.; Kershaw, K.N.; Bronas, U.G. Semi-Automated Processing of Harmonized Accelerometer and GPS Data in R: AGPSR. Sensors 2025, 25, 3883. https://doi.org/10.3390/s25133883
Tintle N, Tu J, Luong A, Min S, Kershaw KN, Bronas UG. Semi-Automated Processing of Harmonized Accelerometer and GPS Data in R: AGPSR. Sensors. 2025; 25(13):3883. https://doi.org/10.3390/s25133883
Chicago/Turabian StyleTintle, Nathan, Jieqi Tu, Anna Luong, Shina Min, Kiarri N. Kershaw, and Ulf G. Bronas. 2025. "Semi-Automated Processing of Harmonized Accelerometer and GPS Data in R: AGPSR" Sensors 25, no. 13: 3883. https://doi.org/10.3390/s25133883
APA StyleTintle, N., Tu, J., Luong, A., Min, S., Kershaw, K. N., & Bronas, U. G. (2025). Semi-Automated Processing of Harmonized Accelerometer and GPS Data in R: AGPSR. Sensors, 25(13), 3883. https://doi.org/10.3390/s25133883