diff --git a/Juggluco/iglu.html b/Juggluco/iglu.html index 7802585..45c27d9 100644 --- a/Juggluco/iglu.html +++ b/Juggluco/iglu.html @@ -1,112 +1,99 @@ - + -
- - -Juggluco - let you export continuous glucose monitoring values. Here I describe how - you can use these data to generate a picture of you glucose percentiles - with the R package Iglu.
-First you have to save - your streaming data. In Juggluco for Android you can select Export from - the left middle menu and press Stream to save it in some file. You need to - save in mg/dL so before you save it you should set mg/dL in Settings. The - resulting graph is also in mg/dL. This file you can then transfer to you - computer.
-You can also run cmdline - juggluco on you computer. Setting it to receive glucose values via IP/TCP - connection by selecting Mirror in the left middle menu and adding a - connection with you computers' IP and Stream checked. On you computer you - press
-juggluco -ra- Set unit to mg/dL: -
juggluco -G- Make it a receiver and run in the background by pressing: -
juggluco&-
If the data are - transferred to the computer, you can press
-juggluco -B filename-
to save the stream data - to filename. See https://www.juggluco.nl/Juggluco/cmdline/index.html - for more information about cmdline juggluco.
-First you have to - install the statistics computing language R and preferentially Rstudio - which are both freely available on the web. The only drawback is that the - installation takes a lot of time.
-Under ubuntu (which also - runs under Windows 10), you can press
-apt install R-base r-cran-devtools libcurl4-openssl-dev libssl-dev gfortran
- Rstudio you get from - here: https://www.rstudio.com/products/rstudio/download/
-Now you have to install - some packages, which also can take ages and you have to answer questions - or press return in between:
--install.packages("devtools", dependencies = TRUE)
install.packages("iglu", dependencies = TRUE )
library("devtools")
install.packages("tidyverse", dependencies = TRUE
)
And say that you use - them:
-library("tidyverse") -library(iglu) --
Use for directory the - full name of your current directory, for stream.tsv the file you have your - stream data in and for 3MH0042XDKM the name of the sensor you want to - show.
-setwd("directory")-
streamdata<-read.csv("stream.tsv",header=TRUE,sep='\t');
cgmdata<-data.frame(streamdata$Sensorid,as.POSIXct(streamdata$UnixTime, origin="1970-01-01"),streamdata$mg.dL) -colnames(cgmdata)[1]<-"id" -colnames(cgmdata)[2]<-"time" -colnames(cgmdata)[3]<-"gl" -
unique(cgmdata$id) # to see the sensor id's -agp(dplyr::filter(cgmdata,id=="3MH0042XDKM")) # display one particular sensor
If you want the analyze a period that is not restricted to a single - sensor, you can do the following:
-cgmdata2<-data.frame("Name",as.POSIXct(streamdata$UnixTime, origin="1970-01-01"),streamdata$mg.dL) -colnames(cgmdata2)[1]<-"id" -colnames(cgmdata2)[2]<-"time" -colnames(cgmdata2)[3]<-"gl" + ++Iglu
+Juggluco +let you export continuous glucose monitoring values. Here I describe +how you can use these data to generate a picture of you glucose +percentiles with the R +package Iglu.
+First you have to +save your streaming data. In Juggluco for Android you can select +Export from the left middle menu and press Stream to save it in some +file. You need to save in mg/dL so before you save it you should set +mg/dL in Settings. The resulting graph is also in mg/dL. This file +you can then transfer to your computer.
+You can also run +Juggluco +server on you computer.
+Set unit to mg/dL: +
+juggluco -G+If the data are transferred to the computer, you can press +
+juggluco -B filename+to save the stream data to filename. See +https://www.juggluco.nl/Juggluco/cmdline/index.html +for more information about cmdline juggluco.
+First you have to +install the statistics computing language R and preferentially +Rstudio which are both freely available on the web. The only drawback +is that the installation takes a lot of time. +
+Under ubuntu +(which also runs under Windows 10), you can press
+apt install R-base r-cran-devtools libcurl4-openssl-dev libssl-dev gfortran
+Rstudio you get from here: +https://www.rstudio.com/products/rstudio/download/
+Now you have to +install some packages, which also can take ages and you have to +answer questions or press return in between: +
+install.packages("devtools", dependencies = TRUE)
+library("devtools")
+install.packages("iglu", dependencies = TRUE )
+install.packages("tidyverse", dependencies = TRUE
)+And say that you use them:
+library("tidyverse") +library(iglu)+Use for directory the full name of your current directory, for +stream.tsv the file you have your stream data in and for 3MH0042XDKM +the name of the sensor you want to show.
+setwd("directory") +streamdata<-read.csv("stream.tsv",header=TRUE,sep='\t'); +cgmdata<-data.frame(streamdata$Sensorid,as.POSIXct(streamdata$UnixTime, origin="1970-01-01"),streamdata$mg.dL) +colnames(cgmdata)[1]<-"id" +colnames(cgmdata)[2]<-"time" +colnames(cgmdata)[3]<-"gl" +unique(cgmdata$id) # to see the sensor id's +agp(dplyr::filter(cgmdata,id=="3MH0042XDKM")) # display one particular sensor+If you want the analyze a period that is not restricted to a single +sensor, you can do the following:
+cgmdata2<-data.frame("Name",as.POSIXct(streamdata$UnixTime, origin="1970-01-01"),streamdata$mg.dL) +colnames(cgmdata2)[1]<-"id" +colnames(cgmdata2)[2]<-"time" +colnames(cgmdata2)[3]<-"gl" -agp(dplyr::filter(cgmdata2,time>="2021-01-26"&time<"2021-02-26")) --Replace 2021-01-26 with the start date and 2021-02-26 with the end date. -
-Later you can put the - above in file and run it by opening it in rstudio, select everything and - press run. To see the display, press on the plots penal at the right side. - Resize it so everything is visible and save it with export. You can also - cut and past to command line R, but adjusting the size of the image is - then more difficult.
- - - - +agp(dplyr::filter(cgmdata2,time>="2021-01-26"&time<"2021-02-26"))
+Replace 2021-01-26 with the start date and 2021-02-26 with the end +date. +
+Later you can put +the above in file and run it by opening it in rstudio, select +everything and press run. To see the display, press on the plots +penal at the right side. Resize it so everything is visible and save +it with export. You can also cut and past to command line R, but +adjusting the size of the image is then more difficult.
++ +History data. Not scanned often enough +for full data. Misses a lot of hypo's also because the history data +are less extream as the scans and stream + + +Bluetooth stream. 10% hypoglycemia, +instead of the 4% shown in the history data +
+