Created
October 3, 2018 20:34
-
-
Save zxqx/fcb3feb259e93987ec4780f31b575420 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"components": [ | |
{ | |
"id": "glucose-component", | |
"period": { | |
"start_date": "2018-07-11T00:00:00Z", | |
"end_date": "2018-08-10T23:59:59Z" | |
}, | |
"links": [ | |
{ | |
"rel": "report", | |
"href": "/reports/b28f5e30-ea9-4e01-8608-57e2675490", | |
"title": "CBG Report" | |
} | |
], | |
"metrics": [ | |
{ | |
"key": "measurement_counts_by_category", | |
"type": "aggregation", | |
"data": [ | |
{ | |
"name": "category", | |
"data": [ | |
{ | |
"key": "In Range", | |
"value": 35 | |
}, | |
{ | |
"key": "Out of Range", | |
"value": 23 | |
}, | |
{ | |
"key": "Inconclusive", | |
"value": 2 | |
} | |
] | |
} | |
] | |
} | |
], | |
"charts": [ | |
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v2.json", | |
"width": 350, | |
"data": { | |
"name": "measurements", | |
"format": { | |
"type": "json" | |
}, | |
"values": [ | |
{ | |
"Date": "2018-08-04T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 101 | |
}, | |
{ | |
"Date": "2018-08-04T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 121 | |
}, | |
{ | |
"Date": "2018-08-05T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 90 | |
}, | |
{ | |
"Date": "2018-08-05T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "High", | |
"Status": "After Meal", | |
"Value": 140 | |
}, | |
{ | |
"Date": "2018-08-06T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 104 | |
}, | |
{ | |
"Date": "2018-08-06T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 124 | |
}, | |
{ | |
"Date": "2018-07-11T09:01:00Z", | |
"Category": "Inconclusive", | |
"Range": "Inconclusive", | |
"Status": "Unknown", | |
"Value": 104 | |
}, | |
{ | |
"Date": "2018-07-11T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-07-18T09:01:00Z", | |
"Category": "Out of Range", | |
"Range": "High", | |
"Status": "After Meal", | |
"Value": 150 | |
}, | |
{ | |
"Date": "2018-07-25T09:01:00Z", | |
"Category": "Out of Range", | |
"Range": "High", | |
"Status": "After Meal", | |
"Value": 150 | |
}, | |
{ | |
"Date": "2018-08-01T09:01:00Z", | |
"Category": "Out of Range", | |
"Range": "High", | |
"Status": "After Meal", | |
"Value": 150 | |
}, | |
{ | |
"Date": "2018-07-30T09:01:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "Fasting", | |
"Value": 50 | |
}, | |
{ | |
"Date": "2018-08-08T09:01:00Z", | |
"Category": "Out of Range", | |
"Range": "High", | |
"Status": "After Meal", | |
"Value": 150 | |
}, | |
{ | |
"Date": "2018-07-12T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 144 | |
}, | |
{ | |
"Date": "2018-07-19T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-07-26T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-08-02T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-08-09T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-08-09T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-07-15T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 111 | |
}, | |
{ | |
"Date": "2018-07-23T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 80 | |
}, | |
{ | |
"Date": "2018-07-16T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 121 | |
}, | |
{ | |
"Date": "2018-07-24T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 121 | |
}, | |
{ | |
"Date": "2018-08-02T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 121 | |
}, | |
{ | |
"Date": "2018-08-09T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 121 | |
}, | |
{ | |
"Date": "2018-07-13T09:01:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "Fasting", | |
"Value": 70 | |
}, | |
{ | |
"Date": "2018-07-20T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "After Meal", | |
"Value": 60 | |
}, | |
{ | |
"Date": "2018-07-27T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "After Meal", | |
"Value": 60 | |
}, | |
{ | |
"Date": "2018-08-03T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "After Meal", | |
"Value": 60 | |
}, | |
{ | |
"Date": "2018-08-09T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "After Meal", | |
"Value": 60 | |
}, | |
{ | |
"Date": "2018-07-31T08:08:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 101 | |
}, | |
{ | |
"Date": "2018-07-31T00:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 121 | |
}, | |
{ | |
"Date": "2018-07-30T19:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 90 | |
}, | |
{ | |
"Date": "2018-07-30T02:36:00Z", | |
"Category": "Out of Range", | |
"Range": "High", | |
"Status": "After Meal", | |
"Value": 140 | |
}, | |
{ | |
"Date": "2018-07-29T19:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 104 | |
}, | |
{ | |
"Date": "2018-07-29T08:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 124 | |
}, | |
{ | |
"Date": "2018-07-28T09:01:00Z", | |
"Category": "Inconclusive", | |
"Range": "Inconclusive", | |
"Status": "Unknown", | |
"Value": 104 | |
}, | |
{ | |
"Date": "2018-07-28T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 124 | |
}, | |
{ | |
"Date": "2018-07-27T09:01:00Z", | |
"Category": "Out of Range", | |
"Range": "High", | |
"Status": "After Meal", | |
"Value": 150 | |
}, | |
{ | |
"Date": "2018-07-27T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 100 | |
}, | |
{ | |
"Date": "2018-07-22T05:01:00Z", | |
"Category": "Out of Range", | |
"Range": "High", | |
"Status": "After Meal", | |
"Value": 150 | |
}, | |
{ | |
"Date": "2018-07-22T23:01:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "Fasting", | |
"Value": 50 | |
}, | |
{ | |
"Date": "2018-07-21T09:01:00Z", | |
"Category": "Out of Range", | |
"Range": "High", | |
"Status": "After Meal", | |
"Value": 150 | |
}, | |
{ | |
"Date": "2018-07-19T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 144 | |
}, | |
{ | |
"Date": "2018-07-18T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-07-17T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-07-16T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-07-15T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-07-14T09:01:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "Fasting", | |
"Value": 114 | |
}, | |
{ | |
"Date": "2018-07-13T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 111 | |
}, | |
{ | |
"Date": "2018-07-12T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 80 | |
}, | |
{ | |
"Date": "2018-07-22T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 121 | |
}, | |
{ | |
"Date": "2018-07-21T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 105 | |
}, | |
{ | |
"Date": "2018-07-14T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 121 | |
}, | |
{ | |
"Date": "2018-07-20T20:36:00Z", | |
"Category": "In Range", | |
"Range": "Normal", | |
"Status": "After Meal", | |
"Value": 121 | |
}, | |
{ | |
"Date": "2018-07-13T09:01:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "Fasting", | |
"Value": 70 | |
}, | |
{ | |
"Date": "2018-07-27T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "After Meal", | |
"Value": 60 | |
}, | |
{ | |
"Date": "2018-07-25T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "After Meal", | |
"Value": 60 | |
}, | |
{ | |
"Date": "2018-07-24T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "After Meal", | |
"Value": 60 | |
}, | |
{ | |
"Date": "2018-07-23T20:36:00Z", | |
"Category": "Out of Range", | |
"Range": "Low", | |
"Status": "After Meal", | |
"Value": 60 | |
} | |
] | |
}, | |
"layer": [ | |
{ | |
"mark":{ | |
"type":"rect" | |
}, | |
"data":{ | |
"name":"normal_range", | |
"format":{ | |
"type":"json" | |
}, | |
"values":[ | |
{ | |
"label":"Normal", | |
"start":"70", | |
"end":"130", | |
"inception":"2018-07-11T05:00:01Z", | |
"completion":"2018-08-08T01:50:15Z" | |
}, | |
{ | |
"label":"Normal", | |
"start":"80", | |
"end":"140", | |
"inception":"2018-08-08T01:50:15Z", | |
"completion":"2018-08-10T04:59:59Z" | |
} | |
] | |
}, | |
"encoding":{ | |
"x":{ | |
"type":"temporal", | |
"field":"inception" | |
}, | |
"x2":{ | |
"type":"temporal", | |
"field":"completion" | |
}, | |
"y":{ | |
"type":"quantitative", | |
"field":"start" | |
}, | |
"y2":{ | |
"type":"quantitative", | |
"field":"end" | |
}, | |
"color":{ | |
"value":"#bcd0ed" | |
}, | |
"opacity":{ | |
"value":0.5 | |
} | |
} | |
}, | |
{ | |
"mark":{ | |
"type":"rect" | |
}, | |
"data":{ | |
"name":"post_meal_range", | |
"format":{ | |
"type":"json" | |
}, | |
"values":[ | |
{ | |
"label":"2 Hours Post Meal Normal", | |
"start":"130", | |
"end":"180", | |
"inception": "2018-07-11T05:00:01Z", | |
"completion": "2018-08-08T01:50:15Z" | |
}, | |
{ | |
"label":"2 Hours Post Meal Normal", | |
"start":"140", | |
"end":"190 ", | |
"inception": "2018-08-08T01:50:15Z", | |
"completion": "2018-08-10T04:59:59Z" | |
} | |
] | |
}, | |
"encoding":{ | |
"x":{ | |
"type":"temporal", | |
"field":"inception" | |
}, | |
"x2":{ | |
"type":"temporal", | |
"field":"completion" | |
}, | |
"y":{ | |
"type":"quantitative", | |
"field":"start" | |
}, | |
"y2":{ | |
"type":"quantitative", | |
"field":"end" | |
}, | |
"color":{ | |
"value":"#e4ecf6" | |
}, | |
"opacity":{ | |
"value":0.6 | |
} | |
} | |
}, | |
{ | |
"mark": { | |
"type": "point", | |
"filled": true | |
}, | |
"encoding": { | |
"x": { | |
"title": null, | |
"field": "Date", | |
"axis": { | |
"format": "%m/%d", | |
"tickCount": 30, | |
"labels": true | |
}, | |
"scale": { | |
"type": "time", | |
"nice": { | |
"interval": "day", | |
"step": 0 | |
} | |
}, | |
"type": "temporal" | |
}, | |
"y": { | |
"title": null, | |
"field": "Value", | |
"type": "quantitative", | |
"scale": { | |
"domain": [ | |
0, | |
250 | |
] | |
} | |
}, | |
"color": { | |
"field": "Category", | |
"type": "nominal", | |
"sort": null, | |
"legend": { | |
"direction": "horizontal", | |
"orient": "bottom", | |
"title": null | |
}, | |
"scale": { | |
"type": "ordinal", | |
"domain": [ | |
"In Range", | |
"Out of Range", | |
"Inconclusive" | |
], | |
"range": [ | |
"#99cc5c", | |
"#ff3b53", | |
"#9e9e9e" | |
] | |
} | |
}, | |
"opacity": { | |
"value": 1 | |
}, | |
"size": { | |
"value": 60 | |
} | |
} | |
} | |
] | |
} | |
] | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment