Databetes 7729

This is the printed version of the Databetes 7729 data visualization I presented at the ITP Fall 2011 show. I created it as my ITP class Intro to Computational Media final project.

The data set is 7729 blood sugar readings from my Dexcom 7 CGM (continuous glucose monitor), representing all the CGM readings for November, 2011. I produced the visualization in Processing, then generated a PDF for the entire month on top and additional PDFs for every individual day of the month below. The circle spans the respective time frames starting at the top (12:00), progressing clockwise.

I changed the color scheme to blue from an earlier yellow version. I think the blue looks better. But it also builds on a comment a classmate made about an earlier version, stating that it reminded her of an eye. I thought changing it to blue would enhance this feeling even more. The blue represents in-range readings (80-140 mg/dL). The gray represents low blood sugar readings (79-40 mg/dL) and the outside white contains all the high blood sugars readings above 140 mg/dL.

I am encouraged by the results of this visualization. The feedback at the show was also positive and supportive. I already have some thoughts about changes I can make in the future. It will be nice to add other data variable to provide greater context. I am convinced that there are better ways of quickly and effectively communicating to patients the message hidden in thousands of data points. This could be part of a more responsive feedback look, giving patients both the motivation and ability to change their behavior and improve their control.

I am excited about taking the Data Representation class at ITP this coming term with Jer Thorpe. Check back later for future iterations!


  1. Pingback: Databetes 7729 | Becoming Databetic
  2. Chris J

    So.. this is amazing – Looking at this, and the other blog post…

    How do I do it? I’m also using a Dexcom and tried playing with what you have here.. and have completely failed. Can I get some step by step instructions on how to make Processing work?

    • dougkanter

      Hi Chris

      Thanks for your message! Always nice to hear from another type-1.

      Are you familiar at all with Processing? It takes a little getting used to at first, but is not too bad. I assume you have downloaded the program from (I am using one of the Processing 2.0 beta releases) and used the Dexcom software to export your readings as an XML file.

      The code that I used is all there (although I did change the colors for the later version). It may need to be changed based on the number of days in the month. The code as it is now is for a 30-day month. You can see towards the very end of that every reading needs to be converted into a time measurement relative to the total number of minutes in the month. Once you determine the total number you want to graph, you need to change the TOTALTIME variable that appears in the middle of the code.

      Also, at the start of the code, you need to change the name of the file you are importing (mine was called dexcom1111.xml). That file needs to be inside of a folder called “data” inside your saved Processing sketch folder.

      Let me know if this helps!

  3. Chris J

    It’s helped tremendously – but still not working.

    I’m completely unfamiliar with Sketch – but mostly smart enough to hack my way through it.

    Here’s what I’ve done and what I’m having an issue with –

    I’ve exported my dexcom data – it happens to cover about 3 months of data – just trying to make it work before I get more detailed in the script… I’ve saved it with the same file name you have. It’s raw XML, unmodified from the dexcom program. It includes the dexcom header with my name, doctor, etc info in it along with my meter and and sensor readings.

    When I run the script, I’m erroring out on line: xml = loadXML(“dexcom1111.xml”);

    I’m getting a javascript error: unexpected char: ‘\’

    I’m under the assumption that it’s not liking something in my dexcom export file.

    This is the header and first few lines of my dexcom .xml

  4. Jim

    Very cool! Have you considered posting your code somewhere like and adding an open source license? I’m also interested in running it myself.

    • dougkanter

      Thanks, Jim. Yes, I hope to post it at some point. But I’ll need to figure out a way for people to adjust it based on the number of days in a month. Right now, that requires some manual adjustment of the code.

  5. Pingback: Numbers From Around the Web: Round 8 | Quantified Self