GithubHelp home page GithubHelp logo

blood-sugars's Introduction

About This Project:

A place for me to learn more about diabetes self-management and prediction using CGM data obtained from our Nightscout server. The code in this repo will be exploratory. There will eventually be other two other repos connected to this project. The first will be dedicated to a Shiny dashboard. The second will be for an R package I intend to develop by the end of 2015. When they are ready, I'll publish links to them here and demo their usage.

Disclaimers:

  • None of this code has been reviewed by the FDA. Use at your own risk.
  • Ia m not responsible for your health or diabetes management.
  • I welcome contributions. If you find a bug, let me know.
  • #WEARENOTWAITING

Motivation:

My wife is the motivation behind this project. As a T1D, her body does not produce insulin. This means her body cannot properly process or control glucose (sugar) in her system. The following image is an "ideal" glucose-insulin curve pattern I found on Wikipedia.

Normal Blood Glucose Curves

Karen controls her blood glucose levels manually using an external supply of insulin which is injected into her body via a "pump" she wears at all times. Maintaining homeostasis requires external tools and conscious maintenance. The CGMs compliment other methods of measuring blood glucose levels, such as the classic finger-prick method. The finger prick method is actually more accurate than the CGM, but is more involved and is done infrequently thoughout the day.

Continuous Glucose Monitors such as the Dexcom G4 are revolutionary because they measure interstitial glucose levels roughly every 5 minutes. And they do so without the conscious aid or effort of the diabetic. Using alarms to notify the T1D of lows and highs can improve blood glucose control and simplify the life of the T1D. Correcting glucose imbalances is still a conscious process, but CGMs do simplify and automate part of the monitoring process.

Unfortunately, the accuracy of today's CGMs is below that of a traditional blood glucose meter. The traditional blood glucose meter (finger prick) measures the level of glucose in the blood directly. CGMs do not. They measure the level of sugar in the diabetic's interstitial fluid. Interstitial glucose levels are a lagging indicator of blood glucose level. Thus, by the time the CGM detects a change in the interstitial glucose levels, the diabetic may already be quite high or quite low. This is especially true for brittle T1Ds, like Karen, who can fluctuate rapidly.

With all that said, these things are awesome. The ability to get near-real-time feedback is a game changer for diabetes self management. Obviously, more accurate and sensitive sensors are desired, but the current generation sensors are quite good. The accuracy of a CGM is measured by something called a Mean Absolute Relative Difference (MARD) between what it reads from the interstitial fluid and what is measured by a lab blood glucose test. Dexcom claims the 2015 "G4 Platinum with share" has a 9% MARD, which they claim is the first single digit MARD on the market. The previous generation of device has a 13% MARD.

We (and many others fighting Diabetes every day) thank Dexcom for making terrific hardware and we thank the makers of the XDrip and Nightscout projects for making great software. If you are a diabetic and you want to take charge of how you manage your health, this is the best way I know of to do it. You are the one in charge, as it should be.

Data and Dexcom

The blood sugar concentration or blood glucose level is the amount of glucose (sugar) present in the blood of a human or animal. The body naturally tightly regulates blood glucose levels as a part of metabolic homeostasis.

Wikipedia/Blood_sugar

The source of the raw data is a Dexcom G4 Platinum System with Share Continuous Glucose Monitor (CGM) worn by my wife, Karen, who has been a Type 1 Diabetic (T1D) since she was seven. We are using an Android app, XDrip to collect the data from the CGM and upload it to a Nighscout database. Her cloud-based CGM data drives a website which allows her to track her CGM data on her phone and Pebble Watch.

You can do all of this with an Apple Phone and Apple watch ($$$) or you can DIY and build your own rig as we have. As of June 2015, the Dexcom website does not list Android as a supported platform for cloud-based CGM and there are no publicly announced plans to support the Android platform, let alone the Pebble Watch. The applications we are using are all open source and available to anyone who wants to learn more about diabetes self-management (diabetic required). Unlike the Apple-based system, the rig we are using is not FDA certified.

blood-sugars's People

Contributors

choens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

blood-sugars's Issues

Events data?

Hello,

I was wondering if there's any chance you guys also recorded events in nightspot, such as excursive, meals and the times the pump gave a shot in and if so if you would be able to share those?

Also, I'm a relative newbie to all of this and wondering in the CSV files, how are lines that are measured by a meter vs the CGM distinguished from one another?

Thanks much!

PS - Trying to see if i can play around with machine learning to figure out a prediction model for the glucose levels.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.