Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option(s) to Enable Raw Data #386

Merged
merged 14 commits into from
Feb 1, 2015
Merged

Option(s) to Enable Raw Data #386

merged 14 commits into from
Feb 1, 2015

Conversation

jasoncalabrese
Copy link
Member

Goal is a have a lab that will allow more advanced users to enable raw data in the mainline version

New ENABLE Option:
ENABLE="rawbg" or ENABLE="rawbg-on" (to default to on)

Tasks:

  • Port Basic Raw Data code from wip/iob/cob branch
  • Refactor code that filters/sends errors codes
  • Add options to enable Raw Data via the ENABLE env var
  • Based on enable option and UI settings display show/hide Raw Data
  • Based on enable option include/exclude cal records and filtered, unfiltered, and rssi rawbg fields in /pebble endpoint

@jasoncalabrese
Copy link
Member Author

@ELUTE, I'm planning to take care of #361 with this

@coveralls
Copy link

Coverage Status

Coverage remained the same at 65.43% when pulling e744042 on wip/enable-raw into 0eef982 on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.12%) to 65.31% when pulling ccd917a on wip/enable-raw into 0eef982 on dev.

@jimsiff
Copy link
Contributor

jimsiff commented Jan 30, 2015

Looks good Jason... great for mobile because it renders faster than IOB-COB.

@jasoncalabrese
Copy link
Member Author

With the last commits the ENABLE option is requred

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.12%) to 65.31% when pulling beba8b0 on wip/enable-raw into 0eef982 on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.12%) to 65.31% when pulling 30f56f5 on wip/enable-raw into 0eef982 on dev.

@jimsiff
Copy link
Contributor

jimsiff commented Jan 30, 2015

+1. Also tested with ENABLE array of 'careportal rawbg'

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.12%) to 65.31% when pulling 3daa7d9 on wip/enable-raw into 0eef982 on dev.

@jasoncalabrese
Copy link
Member Author

@ELUTE / @YYGIRL, basic raw data in /pebble now looks like:

I'm using the same field names we use elsewhere, might not be what you had when using the uploader from @hackingtype1's fork

{
  "status": [{"now":1422602605616}],
  "bgs":[{"sgv":"164","bgdelta":-9,"trend":5,"direction":"FortyFiveDown","datetime":1422602506000,"battery":"87","filtered":200960,"unfiltered":189472,"rssi":185}],
  "cals":[{"_id":"54caf5305b6d4ba395ba0b3a","device":"dexcom","date":1422587207000,"dateString":"Thu Jan 29 19:06:47 PST 2015","slope":1006.8263237320385,"intercept":30000,"scale":1,"type":"cal"}]
}

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.12%) to 65.31% when pulling b267ee8 on wip/enable-raw into 0eef982 on dev.

@ELUTE
Copy link
Contributor

ELUTE commented Jan 30, 2015

TY Jason

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.12%) to 65.31% when pulling 0828424 on wip/enable-raw into 0eef982 on dev.

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.12%) to 65.31% when pulling 60ef5bd on wip/enable-raw into 0eef982 on dev.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.18%) to 66.6% when pulling 1c723b3 on wip/enable-raw into 0eef982 on dev.

@coveralls
Copy link

Coverage Status

Coverage increased (+4.41%) to 69.84% when pulling a689039 on wip/enable-raw into 0eef982 on dev.

@coveralls
Copy link

Coverage Status

Coverage increased (+5.39%) to 70.82% when pulling 30ee5f7 on wip/enable-raw into 0eef982 on dev.

@jasoncalabrese
Copy link
Member Author

ready for final testing and review

@hackingtype1
Copy link
Contributor

A few notes on possible UI/UX for raw data
img_2781

@coveralls
Copy link

Coverage Status

Coverage increased (+5.39%) to 70.82% when pulling 3331250 on wip/enable-raw into 0eef982 on dev.

@ELUTE
Copy link
Contributor

ELUTE commented Feb 1, 2015

Is it possible to display noise? I think that would be helpful as well.

@jasoncalabrese
Copy link
Member Author

@ELUTE maybe as a tooltip?, but the raw dots are so small might be hard to get the hover events on them.

@hackingtype1
Copy link
Contributor

At the very least, there should be no "raw" dot drawn if the noise level is clean.

@jasoncalabrese
Copy link
Member Author

The minor difference that we see while the noise is clean is only because we're using a simplified formula?

@hackingtype1
Copy link
Contributor

Yes, omitting white dots when Dex is using raw to calculate EGV makes sense - limits confusion. Also makes a clear distinction to viewer that the noise level is or is not clean, and whether the displayed value (receiver) is now based on the filtered value.

@YYGIRL
Copy link

YYGIRL commented Feb 1, 2015

I always want to see the white dot, even if the noise level is clean.
Sometimes the value of the white dot or it's trend is more indicative of
what's going on than the dexcom value.

Also note that we have people using ped and 505 receivers, which is going
to produce different results too.

Plus what are you going to show when clean and in a special value? You have
to show a white dot then.

I want more data, not less.

On Sun, Feb 1, 2015 at 11:46 AM, John Costik [email protected]
wrote:

Yes, omitting white dots when Dex is using raw to calculate EGV makes
sense - limits confusion. Also makes a clear distinction to viewer that the
noise level is or is not clean, and whether the displayed value (receiver)
is now based on the filtered value.


Reply to this email directly or view it on GitHub
#386 (comment)
.

Join the Jack Attack!
Fight Type 1 Diabetes
_Give to the JDRF - _www.jdrf.org http://www.jdrf.org

@jasoncalabrese
Copy link
Member Author

Right now while correcting a mild low noise is clean, dex shows 67, but raw is 76. I can't think of a reason I don't want to see that 76.

@YYGIRL
Copy link

YYGIRL commented Feb 1, 2015

There have been too many times where the raw helped me feel more confident
about what was going on, even with clean noise. And it wasn't about the
number. It was about the trend. Where he truly was and where he was
heading. Especially in my little one who can't express really what's going
on.

On Sun, Feb 1, 2015 at 11:54 AM, Jason Calabrese [email protected]
wrote:

Right now while correcting a mild low noise is clean, dex shows 67, but
raw is 76. I can't think of a reason I don't want to see that 76.


Reply to this email directly or view it on GitHub
#386 (comment)
.

Join the Jack Attack!
Fight Type 1 Diabetes
_Give to the JDRF - _www.jdrf.org http://www.jdrf.org

@hackingtype1
Copy link
Contributor

If the noise level is "clean" then the white dot is merely our generalized calculation based on what's we know of Dexcom's. The value Dexcom is showing IS based on the raw value.

The only time the noise is clean w/ a special value is when the special value is 5 (start up cal period). It will be very risky to show folks data that maps to EGV during this period, particularly with new sensors. Restarted sensors are a bit easier, as we can use the last know slope & intercept to calculate the EGV. If we want to show people the raw values during this period w/ new sensors, I would remove any and all numbers from the graph.

hackingtype1 added a commit that referenced this pull request Feb 1, 2015
@hackingtype1 hackingtype1 merged commit c0be495 into dev Feb 1, 2015
@YYGIRL
Copy link

YYGIRL commented Feb 1, 2015

I understand. But the raw value shows a disturbing trend much sooner than
Dexcom? Right now Dex is showing Jack is at 200, but raw calculated is at
240 and raw unfiltered is at 224. My noise level is clean. Yes everything
is showing a jump in BG, raw is telling me to correct him NOW, a more
urgent need. I just gave him a steroid so I know he is much higher. This
happens all the time.

On Sun, Feb 1, 2015 at 1:15 PM, John Costik [email protected]
wrote:

If the noise level is "clean" then the white dot is merely our generalized
calculation based on what's we know of Dexcom's. The value Dexcom is
showing IS based on the raw value.

The only time the noise is clean w/ a special value is when the special
value is 5 (start up cal period). It will be very risky to show folks data
that maps to EGV during this period, particularly with new sensors.
Restarted sensors are a bit easier, as we can use the last know slope &
intercept to calculate the EGV. If we want to show people the raw values
during this period w/ new sensors, I would remove any and all numbers from
the graph.


Reply to this email directly or view it on GitHub
#386 (comment)
.

Join the Jack Attack!
Fight Type 1 Diabetes
_Give to the JDRF - _www.jdrf.org http://www.jdrf.org

@hackingtype1
Copy link
Contributor

If the Dexcom is reporting clean noise, then your calculations based on raw values should have a consistent offset from any displayed "clean" data. There should be no need to show a secondary calculation based on the same raw value, certainly not one that is not fully tested and verified.

-John

On Feb 1, 2015, at 1:34 PM, YYGIRL [email protected] wrote:

I understand. But the raw value shows a disturbing trend much sooner than
Dexcom? Right now Dex is showing Jack is at 200, but raw calculated is at
240 and raw unfiltered is at 224. My noise level is clean. Yes everything
is showing a jump in BG, raw is telling me to correct him NOW, a more
urgent need. I just gave him a steroid so I know he is much higher. This
happens all the time.

On Sun, Feb 1, 2015 at 1:15 PM, John Costik [email protected]
wrote:

If the noise level is "clean" then the white dot is merely our generalized
calculation based on what's we know of Dexcom's. The value Dexcom is
showing IS based on the raw value.

The only time the noise is clean w/ a special value is when the special
value is 5 (start up cal period). It will be very risky to show folks data
that maps to EGV during this period, particularly with new sensors.
Restarted sensors are a bit easier, as we can use the last know slope &
intercept to calculate the EGV. If we want to show people the raw values
during this period w/ new sensors, I would remove any and all numbers from
the graph.


Reply to this email directly or view it on GitHub
#386 (comment)
.

Join the Jack Attack!
Fight Type 1 Diabetes
_Give to the JDRF - _www.jdrf.org http://www.jdrf.org

Reply to this email directly or view it on GitHub.

@jasoncalabrese
Copy link
Member Author

This pull request was merged to master a little early, we still need to come to some consensus on the display of raw data when the noise level is clean. My proposal is to do that in a new pull request before the dev branch is released to master

@hackingtype1
Copy link
Contributor

My bad - I have no idea why the codehub app triggered the merge.

-John

On Feb 1, 2015, at 3:11 PM, Jason Calabrese [email protected] wrote:

This pull request was merged to master a little early, we still need to come to some consensus on the display of raw data when the noise level is clean. My proposal is to do that in a new pull request before the dev branch is released to master


Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants