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/coreA 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
SteadyIn range
Last 24 hours
93–185 mg/dLTarget range
70–180 mg/dLGMI 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
- 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%
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.
npm install @glucoseiq/coreView the source on GitHub