ORIGINAL RESEARCH article
Sec. Personalized Medicine
Volume 5 - 2023 | https://doi.org/10.3389/fdgth.2023.1142021
Hypoglycemia risk with physical activity in type 1 diabetes: a data-driven approach
- 1Department of Bioengineering, Rice University, Houston, TX, United States
- 2Department of Electrical and Computer Engineering, Rice University, Houston, TX, United States
- 3Division of Precision Medicine, Department of Medicine, NYU Grossman School of Medicine, New York, NY, United States
- 4Department of Pediatrics, Diabetes, and Endocrinology, Baylor College of Medicine, Houston, TX, United States
- 5Department of Biomedical Engineering, Vanderbilt University, Nashville, TN, United States
Physical activity (PA) provides numerous health benefits for individuals with type 1 diabetes (T1D). However, the threat of exercise-induced hypoglycemia may impede the desire for regular PA. Therefore, we aimed to study the association between three common types of PA (walking, running, and cycling) and hypoglycemia risk in 50 individuals with T1D. Real-world data, including PA duration and intensity, continuous glucose monitor (CGM) values, and insulin doses, were available from the Tidepool Big Data Donation Project. Participants' mean (SD) age was 38.0 (13.1) years with a mean (SD) diabetes duration of 21.4 (12.9) years and an average of 26.2 weeks of CGM data available. We developed a linear regression model for each of the three PA types to predict the average glucose deviation from 70 mg/dl for the 2 h after the start of PA. This is essentially a measure of hypoglycemia risk, for which we used the following predictors: PA duration (mins) and intensity (calories burned), 2-hour pre-exercise area under the glucose curve (adjusted AUC), the glucose value at the beginning of PA, and total bolus insulin (units) within 2 h before PA. Our models indicated that glucose value at the start of exercise and pre-exercise glucose adjusted AUC (p < 0.001 for all three activities) were the most significant predictors of hypoglycemia. In addition, the duration and intensity of PA and 2-hour bolus insulin were weakly associated with hypoglycemia for walking, running, and cycling. These findings may provide individuals with T1D with a data-driven approach to preparing for PA that minimizes hypoglycemia risk.
Type 1 diabetes (T1D) is a chronic disease caused by insulin deficiency (1). However, there has been significant progress in understanding this disease, leading to many new management approaches (1). A key enabler for the progress is the growing use of continuous glucose monitors (CGMs), a device that tracks glucose levels in the interstitial fluid throughout the day (2). CGMs allow users to view their glucose levels at any time and observe trends and fluctuations that may help them adjust their food, physical activity, insulin dosing, and other factors to optimize glycemic control (2).
Hypoglycemia, or low blood sugar, poses an acute danger to people with type 1 diabetes. It can result in loss of consciousness, seizure, coma, or even death if not addressed urgently (3). The risk of hypoglycemia-associated effects is especially increased during and after aerobic physical activity such as running, walking, cycling, and swimming (4). Fear of hypoglycemia is stated as one of the main hindrances among individuals with T1D to performing exercise, despite clear evidence that exercise provides several health benefits (5). Despite the ability to monitor glucose in close to real-time, people with type 1 diabetes can find it challenging to manage their diet and medication to ensure safe PA. Looking at the broad categories of risks for hypoglycemia, exercise is known to consume glycogen stores, increase insulin sensitivity, and has been shown at moderate intensity to blunt autonomic response to hypoglycemia, all three of which increase the risk for hypoglycemia (6). Individuals with T1D are currently recommended to increase carbohydrate consumption and decrease insulin dosage before exercising (5). Additionally, anaerobic exercises, which are resistance and high-intensity exercises, are shown to mitigate the blood glucose decrease associated with aerobic exercise and can be used as a form of management (7). The suggestions to prevent hypoglycemia, such as carbohydrate consumption, have not yet been quantitatively understood or analyzed in depth, mainly due to the lack of data. In general, the precise nature of the relationships between exercise and glucose, especially mediated between food and insulin is unclear (5). Several hypoglycemia prediction algorithms have been proposed (8), but few that integrate real-time information from multiple devices (CGM, insulin pumps, PA trackers). Complicating this knowledge gap is the heterogeneity in defining hypoglycemia. Working groups from the American Diabetes Association, Endocrine Society, and International Society for Pediatric and Adolescent Diabetes defined hypoglycemia in diabetes as “all episodes of abnormally low plasma glucose concentration that expose the individual to potential harm”, however there is some ambiguity around the particular metrics for this definition, and over time different methods for classifying hypoglycemia and its severity have been proposed (6, 7, 9). With the advent of widespread use of CGM, consensus guidelines recommend minimizing time spent with glucose levels <70 mg/dl, to mitigate the potential harms of hypoglycemia referred to in the broader definition mentioned above, and this threshold provides a more straightforward target to define hypoglycemic events through CGM measurements (10).
In this work, we aimed for an improved quantitative understanding of the significant factors in exercise-induced hypoglycemia. We quantified the impact of different types and attributes of exercise on glucose changes, and therefore, on hypoglycemia risk in individuals with type 1 diabetes.
Materials and methods
We analyzed the dataset with information from 50 participants with T1D. The available demographic and clinical information is summarized in Table 1.
Multiple variables relevant to the post-exercise hypoglycemia risk prediction task were available for analysis. These variables are described in Table 2.
Computation and statistical analysis
Statistical analyses were performed using Matlab R2021a (The MathWorks Inc., Natick, MA, United States). Linear regression models were developed using the “fitlm” function in MATLAB. We also computed several summary statistics using information about participants' physical activities, glucose levels, carbohydrate intake, and bolus insulin.
The following predictors were used in the analysis of exercise-induced hypoglycemic events:
1. Glucose value (mg/dl) at the start of exercise (baseline glucose)
2. 2-hour pre-exercise glucose adjusted AUC: the area between the baseline glucose and the glucose curve starting from two hours before the exercise (Figure 1).
3. Calories Burned (kcal) during exercise
4. Activity Duration (minutes)
5. Bolus insulin (units)
Figure 1. Multimodal Glucose - Exercise - Carbohydrate Graph. This shows the graph of one day of a participant. The black line shows the glucose value of the start of exercise. The green shaded region shows the 2-hour pre-exercise glucose adjusted AUC. It is bordered superiorly by the glucose trend and inferiorly by 70mg/dL which is the cutoff for hypoglycemia that we are using. Both are parameters used in the analysis. The “train_9dc61” is the participant's ID..
Within the predictors, the Calories Burned variable was used as a surrogate for exercise intensity. In our analysis, we use 70 mg/dl as a threshold to determine hypoglycemia. Our main outcome is the average glucose difference from 70 mg/dl during two hours after exercise as a surrogate for hypoglycemia risk. This metric is computed by subtracting 70 from the average glucose during the two hours after exercise.
We visualized daily glucose fluctuations for all the participants, all of which yielded similar graphs (Figure 1). A couple of observations can be made in almost all the multimodal Glucose—Exercise—Carbohydrate Graphs. First, as expected, there is a sharp decrease in the glucose level as soon as the participant starts their exercise; Figure 1 shows the participant's glucose dropping below 70 mg/dl after their physical activity, resulting in hypoglycemia. Second, there is commonly an increase in glucose levels prior to exercise. This increase in glucose before the exercise can likely be attributed to the participants consuming carbohydrates, termed “carbohydrate preparation”, in an effort to minimize hypoglycemia risk with aerobic exercise (7). Unfortunately, we also observed inconsistent carb intake logging across several participants in the dataset. For example, many of the participants' appeared not to intake any carbohydrates throughout the day, and there would be drastic increases in blood glucose levels without a carbohydrate intake at the same time. These observations led us to use the 2-h glucose adjusted AUC instead of the actual carb intake logs to quantify the carbohydrate preparation before exercise (Figure 1).
Exercise events were only included in the analysis if they met the criteria of not having any other exercises being done within two hours before or after the exercise, which was logged by the participants. This is to ensure that the glucose levels within those two hours would not be influenced by other physical activities. Similarly, we only included bolus insulin administered within the two hours prior to exercise in our analysis as we assumed earlier boluses would not have significant impact on hypoglycemia risk.
Frequency of different types of PA
We first computed the frequency of different activity types included in the dataset. Figure 2 shows the percentage of the 50 participants with at least one record for the given PA type. The top three activities were found to be walking (94% of participants), running (70%), and cycling (66%). To ensure a sufficient sample size for our analysis, we focused on these three activities for the current work.
Figure 2. This graph shows the top 10 most frequently done exercises among the 50 participants in our dataset, based on the number of participants who have done each exercise at least one time.
Proposed 2-h pre-exercise adjusted AUC metric
We performed statistical analysis on the 2-h pre-exercise adjusted AUC (“adjusted AUC” hereafter) for the set of exercise events that fit the criteria and found the following number of corresponding hypoglycemic events for those exercises. There were 1,664 hypoglycemic events for walking, 494 for running, and 805 for cycling. The p-values were calculated using the Wilcoxon rank sum test. We compared the number of hypoglycemic events for high adjusted AUC vs. low adjusted AUC (top 25% vs. bottom 25%, and top 50% vs. bottom 50%). We observed that high adjusted AUC instances were associated with significantly fewer hypoglycemia events compared to low adjusted AUC instances as reported in Table 3. This finding suggests the protective role of high adjusted AUC (indicating carbohydrate preparation) on hypoglycemia risk.
Table 3. Top and bottom 25% and 50% adjusted AUC and their corresponding hypoglycemic events for each exercise instance for all participants.
The p-values were calculated using the Wilcoxon rank sum test.
Linear regression analysis
Using the adjusted AUC and non-clinical variables mentioned in the Computation and Statistical Analysis section, we created a simple linear regression model to predict the risk of hypoglycemia 2 h after each exercise. The variables used were the glucose value (mg/dl) at the start of exercise, 2-hour pre-exercise glucose adjusted AUC: the area between the baseline glucose and the glucose curve starting from two hours before the exercise, calories burned (kcal) during exercise, activity duration (minutes), and bolus insulin (units). For the prediction, we used individual metrics: for each participant, we took the distance of average glucose reading 2 h after a physical activity from 70 mg/dl for each exercise instance of running, walking, and cycling, and used those metrics to create the regression model. The linear regression model results are detailed in (Table 4).
Table 4. Linear regression results to predict the average glucose distance 2 h after exercise from 70 mg/dl (risk of hypoglycemia).
Our results indicated that higher 2-hour pre-exercise glucose adjusted AUC was associated with fewer exercise-induced hypoglycemic events. Additionally, the linear regression model showed that the proposed adjusted AUC metric and glucose level at the start of exercise were associated with exercise-induced hypoglycemia risk. These results reinforce the importance of adequately high blood glucose levels at the start of exercise, as a metric to forecast exercise-induced hypoglycemia. Most hypoglycemia predictions typically rely on this baseline blood glucose and heart rate (8). But we also identified the adjusted AUC in the two hours before exercise as a key predictor. The adjusted AUC and the glucose value at the start of exercise were significantly associated with hypoglycemia risk in walking, running, and cycling, which indicates their importance in predicting exercise-induced hypoglycemia risk. Physical activity Duration, Intensity, and Bolus Insulin were significantly associated with only some, rather than all exercise types, as shown in the results.
There have been very few studies in T1D incorporating both CGM and physical activity measurements. A recent study showed that historical CGM data by itself can reliably predict glucose values in the next 60 min, with additional physical activity information contributing very little. [Van Doorn ‘21] This aligns with our findings where CGM-based measures such as pre-exercise glucose and adjusted AUC had stronger associations with hypoglycemia than PA measures such as duration and intensity of exercise. We note that while the PA measures in our study were not as strongly predictive as CGM measures of hypoglycemia, they still had significant associations in some exercise types. This suggests that PA measures can add value to hypoglycemia risk prediction for specifically post-exercise periods.
One of the main limitations of this research was the absence of heart rate information. A previous study predicted whether exercise-induced hypoglycemia would occur given just heart rate and the glucose level at the start of exercise (8). Additionally, heart rate was found to be one of the physiological variables that improves the accuracy of overall glucose prediction in physically active individuals with T1D (13).
Certain limitations arose during our own data analysis. We used the 2-h pre-exercise glucose adjusted AUC to quantify the carbohydrate preparation of participants before exercise. Although self-recorded carb intake logs could conceivably have better estimated carbohydrate preparation, we could not use them because of empirically observed inconsistencies such as missed logs or delayed meal- logging. Missing or incorrect logging by participants is one of the downsides of using real world data. However, the drawback of the adjusted AUC is that the glucose levels may have increased for reasons other than carbohydrate preparation, which is one of the ways to achieve a higher adjusted AUC, but we are unable to fully ascribe all higher adjusted AUC to carb preparation given the limitations of real world data. Additionally, participants taking action to increase their glucose levels within the studied 2-hour window after exercise could affect their glucose readings and thus the measure of hypoglycemia risk, which we assumed to be entirely caused by PA. The model ignores other influences during exercise, and any factors that may arise are not considered. Further, we elected to use the average difference from 70 mg/dl as a measure of hypoglycemia risk instead of directly measuring hypoglycemia via the clinically recognized “time spent in hypoglycemia” (Battelino et al., 2022). This was done because the majority of exercise events had zero hypoglycemia readings and would have skewed our linear regression results. In future studies with sufficiently balanced zero and non-zero hypoglycemia instances, we will use the time spent in hypoglycemia as the clinical outcome of interest.
The results also showed that physical activity duration, intensity, and bolus insulin were significantly associated with only some exercises. Because this is real-world data, some exercise data may have been manually overwritten by the user, introducing subjective biases to the analysis. Future studies with fully automated exercise duration and intensity logging could more precisely summarize the effect of these exercise parameters on hypoglycemia risk.
Due to the limited demographic information in Tidepool dataset, we could not investigate the role of race/ethnicity on exercise-induced hypoglycemia. We also have limited pediatric data, who are a sizable T1D population and can have vastly different levels and types of activity depending on age. Thus, these metrics need to be recomputed for different populations to validate the generalizability of our findings.
Our results could pave the way to help optimize preparation for exercise for individuals with type 1 diabetes before exercise. Depending on various factors such as the type and duration of exercise, insulin in the blood, and blood glucose at that time, certain recommendations can be made on whether to consume carbs, how much to consume, and more. For example, if an individual were to go on a walk, which would increase the risk of hypoglycemia, for a certain duration, then the adjusted AUC could be used to derive a quantification of how many carbs should be consumed prior to exercise.
In further analysis of our data, we hope to create personalized regression models to accurately predict the average glucose distance from 70 mg/dl for individuals with type 1 diabetes before they exercise. The overall R-squared values for each of the exercise models showed that the models are relatively moderate in their predicting abilities. We did not include the available demographic/clinical information (age, years with type 1 diabetes, and sex) into the linear regression model which could improve the predictive power of the models. Although prior research has shown that some other key predictors of severe hypoglycemia are prior episodes of hypoglycemia, duration of diabetes, body mass index, and other anthropometric measures, this information was not available to us in this dataset. Including these variables as well as identifying appropriate interaction terms can optimize the models and allow those with T1D to have a personalized model for themselves to help them exercise safely. We plan to create a training and test set from the data to test such models in subsequent analyses.
In the future, we hope to be able to use these models to create an intervention technology for those with T1D to exercise more safely. We envision these models being able to translate individuals' inputted information into a user-friendly exercise management app. We hope that people can use this to potentially use exercise as a form of glucose management as well.
Data availability statement
The datasets presented in this article are not readily available because the dataset used in the study were generously provided by Tidepool Inc. Tidepool data can be made available to researchers at their discretion through a data sharing agreement. Request for code for generating the figures and tables of the manuscript may be directed to email@example.com or firstname.lastname@example.org.. Requests to access the datasets should be directed to Tidepool, email@example.com.
At Tidepool, we recognize the critical importance of ethical practices when it comes to handling and utilizing data. We are committed to upholding the highest standards of integrity, respect, and responsibility in all aspects of data collection, storage, analysis, and dissemination. Our ethics statement outlines our principles and commitments in relation to data, ensuring the protection of privacy, promoting transparency, and fostering trust with our stakeholders.
Data Privacy and Security: We prioritize the privacy and security of individual data subjects. We implement robust measures to safeguard personal data, ensuring it is collected, processed, stored, and transmitted securely.
Informed Consent and Data Collection: We obtain consent from individuals before collecting their data, ensuring they are fully aware of the purpose and potential implications of data collection. We employ transparent practices, clearly communicating how data will be used and shared, how it has been used and shared, and empowering individuals to make informed decisions about their data.
Data Accuracy and Integrity: We strive to maintain accurate and reliable data throughout its lifecycle. We employ appropriate quality control measures to minimize errors and inaccuracies. If errors are identified, we take prompt action to rectify them and prevent their recurrence.
Fair and Responsible Use: We utilize data in a fair and responsible manner, respecting legal, ethical, and societal norms. We do not engage in discriminatory practices, and we ensure that data analysis and decision-making processes are transparent.
Data Sharing and Transparency: We support open and transparent data practices whenever possible, while respecting privacy and confidentiality. We strive to share data in ways that benefit society, contributing to scientific research, public knowledge, and social progress. When sharing data, we take appropriate measures to de-identify personal information, protecting individual privacy.
Responsible Data Governance: We implement robust data governance frameworks and processes to ensure accountability, compliance, and oversight in our data-related activities. We designate responsible individuals or teams to oversee data management practices, and monitor compliance with policies and regulations.
Continuous Improvement: We are committed to continuously improving our data ethics practices. We regularly review and update our policies, procedures, and safeguards to align with evolving legal, technological, and societal expectations. We encourage feedback and engagement from our stakeholders, fostering a culture of transparency, responsibility, and learning.
By adhering to this ethics statement, we affirm our commitment to maintaining the highest ethical standards in our data-related activities. We aim to build trust among our stakeholders, promote responsible data practices, and contribute positively to society while ensuring the privacy, security, and integrity of the data we handle.
SP and JJJ developed the computational framework. SP created the figures and tables and led the writing of the manuscript. SB, AS, and DDS conceptualized the hypoglycemia risk prediction framework. AFS and DDS provided clinical expertise and feedback on the hypoglycemia risk prediction model. SB and AS supervised SP and JJJ in computational analysis and SP in writing of the manuscript. SP, SB, AS, AFS, and DDS contributed to writing the manuscript. All authors contributed to the article and approved the submitted version.
SP, JJJ, SB, and AS were supported by the PATHS-UP National Science Foundation Engineering Research Center (Grant no.: 1648451).
The authors would like to thank Tidepool Inc. for the dataset used in the study. In particular, we acknowledge Chris Snider, Nick Riggall, Brandon Arbiter, Jason Meno, Cameron Summers, and Stefany Shaheen for their help in data transfer and answering questions about the dataset.
Conflict of interest
DDS is an independent consultant for Dexcom, Inc.
The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
2. Anon. Continuous glucose monitoring. National Institute of Diabetes and Digestive and Kidney Diseases. Available at: https://www.niddk.nih.gov/health-information/diabetes/overview/managing-diabetes/continuous-glucose-monitoring (Accessed May 19, 2022).
4. Anon. Low blood sugar: Symptoms, causes, and treatment for hypoglycemia. JDRF. Available at: https://www.jdrf.org/t1d-resources/about/symptoms/blood-sugar/low/ (Accessed May 19, 2022).
6. Abraham MB, Jones TW, Naranjo D, Karges B, Oduwole A, Tauschmann M, et al. ISPAD clinical practice consensus guidelines 2018: assessment and management of hypoglycemia in children and adolescents with diabetes. Pediatr Diabetes. (2018) 19(Suppl 27):178–92. doi: 10.1111/pedi.12698
7. Seaquist ER, Anderson J, Childs B, Cryer P, Dagogo-Jack S, Fish L, et al. Hypoglycemia and diabetes: a report of a workgroup of the American diabetes association and the endocrine society. J Clin Endocrinol Metab. (2013) 98(5):1845–59. doi: 10.1210/jc.2012-4127
8. Reddy R, Resalat N, Wilson LM, Castle JR, El Youssef J, Jacobs PG. Prediction of hypoglycemia during aerobic exercise in adults with type 1 diabetes. J Diabetes Sci Technol. (2019) 13(5):919–27. doi: 10.1177/1932296818823792
10. Battelino T, Danne T, Bergenstal RM, Amiel SA, Beck R, Biester T, et al. Clinical targets for continuous glucose monitoring data interpretation: recommendations from the international consensus on time in range. Diabetes Care. (2019) 42(8):1593–603. doi: 10.2337/dci19-0028
12. Neinstein A, Wong J, Look H, Arbiter B, Quirk K, McCanne S, et al. A case study in open source innovation: developing the tidepool platform for interoperability in type 1 diabetes management. J Am Med Inform Assoc. (2023) 23(2):324–32. doi: 10.1093/jamia/ocv104
Keywords: hypoglycemia, physical activity, type 1 diabetes, continuous glucose monitoring, Tidepool
Citation: Prasanna S, Barua S, Siller AF, Johnson JJ, Sabharwal A and DeSalvo DJ (2023) Hypoglycemia risk with physical activity in type 1 diabetes: a data-driven approach. Front. Digit. Health 5:1142021. doi: 10.3389/fdgth.2023.1142021
Received: 11 January 2023; Accepted: 3 May 2023;
Published: 19 May 2023.
Edited by:Valeria De Luca, Novartis Institutes for BioMedical Research, Switzerland
© 2023 Prasanna, Barua, Siller, Johnson, Sabharwal and DeSalvo. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.