Prediction of Diabetes

Measuring your risk of diabetes

Piyush Neuapane

What is 'normal' blood glucose level?

According to Virginia Mason Medical Center:
(https://www.virginiamason.org/whatarenormalbloodglucoselevels):

  • A normal fasting (no food for eight hours) blood sugar level is between 70 and 99 mg/dL.

  • A normal blood glucose level two hours after eating is less than 140 mg/dL.

  • Diabetes is diagnosed by any one of the following: 2/3 consecutive fasting blood glucose tests that are equal to or greater than 126 mg/dL.

Diabetes Prevention App

High Blood sugar level is an indicator of Diabetes. The application "Diabetes Prediction" helps you predict the risk of diabetes given the amount of blood glucose level for 3 consecutive days.

The application can be accessed here:
https://dataproductspiyush.shinyapps.io/shinycourseproject

It might take few seconds to load the app!

How to use the App

  • Open the App.

  • Measure your fasting glucose level in mg/dl for 3 consecutive days.

  • Enter those measurements into the App.

  • Once you hit the 'submit' button, the likehood of diabetes is displayed as a number between 0 and 1.

How to read the output

The output shows the glucose readings that you entered, and plots the corresp prediction scores.

For example, if you enter the blood glucose values of 120, 140 and 180, for Days 1,2 and 3 respectively, your output will look something like this:

plot of chunk unnamed-chunk-1

APPENDIX

Code that generates the plot for Diabetes prediction:

    par(mfrow = c(2, 1), mar=c(1.1,5.1,2.1,2.1))

    diabetesRisk <- function(glucose) glucose / 200
    input = c(120,140,180)
    x = c(1,2,3)

    plot(x, diabetesRisk(input) ,type="l", col="red", xaxt='n', xlab = "Day", ylab="Prediction of Diabetes", main ="Diabetes prediction Plot generated using embedded R code!")
    axis(1,x)