Skip to content

What Levels CGM Gives You, and How to Analyze the Data Yourself

Oak
An iridescent winged reptile on a steel mount in a dark studio, with a glowing amber channel curving beneath the skin of its flank.

Levels is a software subscription that sits on top of a continuous glucose monitor you wear on your arm. It does not make the sensor. The glucose numbers come from a Dexcom or Abbott Libre device. Levels adds meal logging, a scoring model, and a phone interface. If you are technically fluent and want to work with the underlying data, only a few decisions matter. They are which sensor you wear, how you export the series, and which metrics you compute. The app layer is a convenience, and you can replace it.

What the sensor measures, and what it does not

A CGM measures glucose in interstitial fluid and not in blood. It does so using a subcutaneous electrode, typically by a glucose oxidase reaction that produces a current proportional to glucose concentration. That current is converted to a glucose estimate by a factory calibration curve. Current-generation sensors ship pre-calibrated, so there is no fingerstick calibration step, which removes one large historical source of error 1.

Interstitial glucose lags plasma glucose. The lag is on the order of five to fifteen minutes and is not constant. The gap widens when glucose is changing fast, which matters most after a high-carbohydrate meal and during exercise 2. Practically, this means your measured peak after a meal arrives later and lower than the true plasma peak, and a sharp post-exercise drop shows up on the sensor after it has already happened.

The engineering history here is worth knowing. CGM went from a research curiosity to a device accurate enough to drive insulin dosing decisions over roughly two decades of sensor chemistry and filtering improvements 3. That trajectory is why a consumer sensor today is usable for self-measurement at all.

The sensor matters more than the app

Levels has supported Abbott Libre sensors and Dexcom devices, including Dexcom’s over-the-counter Stelo. These differ in ways that affect your analysis.

Dexcom G7 and Stelo record a value every five minutes, which gives 288 samples per day. Abbott Libre 3 samples once per minute for display, but the data you can export is usually decimated to a coarser grid. Older Libre generations were flash monitors that stored a reading every fifteen minutes and required you to scan the sensor to retrieve it, which produces gaps whenever you sleep past the memory window.

We would choose a five-minute Dexcom stream for any serious self-analysis. The grid is uniform, the export is clean, and the vendor exposes a documented API. Uniform sampling saves you from resampling artifacts when you compute rate-of-change features.

Getting the data out in a form you can compute on

There are three paths, and they are not equivalent.

The first is the vendor web portal. Dexcom Clarity and Abbott LibreView both export CSV. The Clarity export gives you one row per reading with a timestamp and a glucose value in mg/dL or mmol/L, plus event rows for logged carbs and insulin. Values are clamped at the edges of the reportable range, so you will see literal strings like Low and High rather than numbers below 40 or above 400. Parse those explicitly instead of letting pandas.read_csv turn the column into object dtype and silently break your arithmetic.

The second is the Dexcom developer API. It is a standard OAuth 2.0 flow, and the sandbox returns synthetic data for development. The production endpoint serves data on a delay of roughly three hours, which is fine for retrospective analysis and useless for anything real-time.

The third is a direct Bluetooth read with xDrip+ or a Nightscout instance. This gets you one-minute resolution and no delay, at the cost of running your own server and accepting that you are outside the vendor’s supported path. We use this when the question requires tight time alignment with another stream, such as a heart rate monitor or a workout file.

Whichever path you use, normalize to a single tidy frame. The columns are UTC timestamp, local timestamp and glucose in mg/dL. Add the sensor serial and a session index. Keep the sensor serial. Session-to-session bias is real, and you will want to check for it before comparing a meal you ate in week one to the same meal in week three.

The metrics worth computing

Start with the standardized ambulatory glucose profile, or AGP. It is a one-page summary built from a fourteen-day window that plots the median and the interquartile and interdecile bands of glucose by time of day, overlaid across days 4. It exists because clinicians needed a common visual language, and it works just as well for a single person reading their own data. The standard requires at least fourteen days with about seventy percent of possible readings present, and you should enforce that threshold in code rather than eyeballing it 4.

From the same window, compute these:

  • Mean glucose and the glucose management indicator derived from it.
  • Coefficient of variation, defined as standard deviation divided by mean. Below thirty-six percent is the conventional boundary for stable versus variable glucose.
  • Time in range. The clinical target band is 70 to 180 mg/dL, and most people without diabetes spend the large majority of the day in a much narrower band.
  • Postprandial excursion, measured as peak minus pre-meal baseline over the two hours after a logged meal.

The last one is where meal logging earns its keep, and it is also where most self-tracking falls apart. An unlogged snack contaminates the excursion window. We prefer to run explicit standardized tests rather than rely on free-living logs.

The experiment we would run first

Free-living CGM data tells you about your life. It does not tell you about your physiology. To learn something about your physiology, repeat a fixed stimulus.

Pick two or three fixed meals with known macronutrient content. Eat each one at the same time of day after an overnight fast, on separate days, with no exercise in the preceding two hours. Record the start time to the minute. Repeat each meal at least three times so you can estimate within-person variance, which is substantial. Then compare incremental area under the curve across meals using the trapezoid rule on the five-minute grid.

Run the same design for a single exercise bout, because the glucose response to exercise depends on intensity and timing in ways that free-living data will not separate 2. Aerobic work at moderate intensity tends to lower glucose, and short high-intensity efforts often raise it transiently.

Accuracy limits and failure modes

Sensor error is not uniform across the range. Accuracy requirements are tighter at low glucose, because that is where a wrong number has consequences, and error tolerance analyses in acute care settings show how much measurement error a decision rule can absorb before it misleads 5. Modern sensors are accurate enough to be used for treatment decisions without a confirmatory fingerstick in diabetes care, which is a high bar and a recent one 6.

The failure modes you will encounter in your own data:

  • Compression lows. Lying on the sensor restricts local perfusion and produces a false drop, usually overnight and usually lasting thirty to ninety minutes. Look for a sharp fall with a fast recovery and no corresponding meal or insulin event.
  • Warmup noise. The first hours of a session are the least reliable. We drop the first twelve hours of every session before analysis.
  • End-of-session drift. Signal quality often degrades in the final day of wear.
  • Timezone handling. Travel produces duplicate or missing local hours, which will corrupt any time-of-day aggregation.

Retrospective analysis and predictive alerting are different problems. Forecasting glucose a short horizon ahead from the recent trajectory is tractable, and the useful accuracy window is short 7. Do not expect a model trained on your own history to anticipate a meal it cannot see.

Where self-interpretation stops

CGM changes measured glucose in people with type 2 diabetes, with meta-analytic evidence for a modest reduction in HbA1c relative to usual care 8. That literature is about people under clinical management, and the effect comes with a treatment plan attached.

If your data shows sustained fasting values above the normal range, take the export to a physician. The same applies to frequent values below 70 mg/dL or to any pattern that concerns you. Glucose interpretation that touches medication, insulin, or a diagnosis requires a clinician. What you can do on your own is measure carefully, compute the standard metrics correctly, and understand your own variability well enough to ask a sharper question.

Footnotes

  1. Katherine E. Iscoe, Raymond J. Davey, Paul A. Fournier. Do Different Glucose Levels at Calibration Influence Accuracy of Continuous Glucose Monitoring Readings in Vitro ?. Journal of Diabetes Science and Technology, 2012. https://doi.org/10.1177/193229681200600238 ↩

  2. Michael Riddell, Bruce A. Perkins. Exercise and Glucose Metabolism in Persons with Diabetes Mellitus: Perspectives on the Role for Continuous Glucose Monitoring. Journal of Diabetes Science and Technology, 2009. https://doi.org/10.1177/193229680900300439 ↩ ↩2

  3. Rodolfo J. Galindo, Grazia Aleppo. Continuous glucose monitoring: The achievement of 100 years of innovation in diabetes technology. Diabetes Research and Clinical Practice, 2020. https://doi.org/10.1016/j.diabres.2020.108502 ↩

  4. Mary L. Johnson, Thomas W. Martens, Amy B. Criego, et al. Utilizing the Ambulatory Glucose Profile to Standardize and Implement Continuous Glucose Monitoring in Clinical Practice. Diabetes Technology & Therapeutics, 2019. https://doi.org/10.1089/dia.2019.0034 ↩ ↩2

  5. Malgorzata E Wilinska, Roman Hovorka. Glucose Control in the Intensive Care Unit by Use of Continuous Glucose Monitoring: What Level of Measurement Error Is Acceptable?. Clinical Chemistry, 2014. https://doi.org/10.1373/clinchem.2014.225326 ↩

  6. Jessica R. Castle, Peter G. Jacobs. Nonadjunctive Use of Continuous Glucose Monitoring for Diabetes Treatment Decisions. Journal of Diabetes Science and Technology, 2016. https://doi.org/10.1177/1932296816631569 ↩

  7. Jaques Reifman, Srinivasan Rajaraman, Andrei Gribok, et al. Predictive Monitoring for Improved Management of Glucose Levels. Journal of Diabetes Science and Technology, 2007. https://doi.org/10.1177/193229680700100405 ↩

  8. Cindy Park, Quang A. Le. The Effectiveness of Continuous Glucose Monitoring in Patients with Type 2 Diabetes: A Systematic Review of Literature and Meta-analysis. Diabetes Technology & Therapeutics, 2018. https://doi.org/10.1089/dia.2018.0177 ↩

Pothos builds longitudinal molecular profiles of individuals: whole-genome sequencing, single-cell RNA sequencing, and plasma proteomics, delivered as a detailed report, every data file, and stored cells. Build your profile.