The data layer for glucose products.

GlucoseIQ analyzes CGM readings and returns a typed report with metrics and chart-ready output. Use it in your own interface.

npm install @glucoseiq/core

A glucose report ready to render.

The same 14-day synthetic fixture drives the latest reading, 24-hour trace, range distribution, GMI estimate, and daily profile.

Latest 24-hour glucose trace

Latest reading

99mg/dL

SteadyIn range

Last 24 hours

93185 mg/dL

Target range

70–180 mg/dL
Last 24 hours of synthetic glucose readingsLatest 24 hours from a synthetic 14-day glucose report. The observed range is 93 to 185 milligrams per deciliter. The target range is 70 to 180 milligrams per deciliter. The latest reading is 99 milligrams per deciliter. Synthetic data; not clinically representative.

GMI estimate

Glucose management indicator

Mean
122.8 mg/dL

Calculated from the synthetic mean CGM glucose. Not a laboratory A1C or a diagnosis.

Time in range

14 days · Target 70–180 mg/dL

97.8%
  • Very low<54 mg/dL0.0%
  • Low54–69 mg/dL0.0%
  • In range70–180 mg/dL97.8%
  • High181–250 mg/dL2.2%
  • Very high>250 mg/dL0.0%

Daily profile

14-day percentile profile

CV
20%
Two-hour glucose percentile profileTwelve two-hour distributions in UTC across 14 synthetic days. Each thin stem spans the 5th to 95th percentiles, each capsule spans the middle 50 percent, and each short line marks the median. The green field marks the target range from 70 to 180 milligrams per deciliter. Coefficient of variation is 20 percent.
4,032 synthetic readings · 14 generated days · UTCSynthetic data. Not clinically representative.

Inspect the typed report.

Code used for this report

import { analyzeGlucose } from '@glucoseiq/core'
import { generateCGMSeries } from '@glucoseiq/testing'

const readings = generateCGMSeries({
  days: 14,
  seed: 7,
  mealAmplitude: 55,
  noise: 2,
  nocturnalHypoDays: [],
})

const report = analyzeGlucose(readings)

if (report.valid && report.timeInRange) {
  const result = {
    meanGlucose: report.meanGlucose,
    gmi: report.gmi,
    cv: report.cv,
    timeInRange: report.timeInRange.inRange.percentage,
  }

  console.log(JSON.stringify(result, null, 2))
}

Report summary

{
  "meanGlucose": 122.8,
  "gmi": 6.2,
  "cv": 20,
  "timeInRange": 97.8
}

This page runs @glucoseiq/core during the docs build with synthetic readings from @glucoseiq/testing.

Synthetic data. Not clinically representative.

Your application: credentials, consent, transport, and storage

GlucoseIQ: supported payload normalization and analysis

Use the returned report in the interface you build.

Read the quickstartnpm install @glucoseiq/coreView the source on GitHub

Informational use only. Not medical advice.

MIT © Mark Learst