Apnea Board Forum - CPAP | Sleep Apnea
how can I make histograms from my SPO2-datafiles? - Printable Version

+- Apnea Board Forum - CPAP | Sleep Apnea (https://www.apneaboard.com/forums)
+-- Forum: Public Area (https://www.apneaboard.com/forums/Forum-Public-Area)
+--- Forum: Software Support Forum (https://www.apneaboard.com/forums/Forum-Software-Support-Forum)
+--- Thread: how can I make histograms from my SPO2-datafiles? (/Thread-how-can-I-make-histograms-from-my-SPO2-datafiles)



how can I make histograms from my SPO2-datafiles? - ljongkind - 03-21-2020

my question
I am trying to find a way to make histograms from my SpO2 data.
Does anyone how to do that?
And/or which software to use?



my data files

The pulse-oximeter I have is the beurer PO 80
This pulse-oximeter produces spoR and csv files 




possible software

1. The software I use now to capture and show data from the pulse-oximeter is the SpO2viewer from Beurer (free download on their website) 
It makes two histogrammes, but very simple ones.
2. Excel does not seem to be equipped to handle a full night of data (large csv-file), or am I donig somthing wrong? 
3. I am downloading a trial version of Matlab.
4. But maybe R is the way to go?
(I don't know anything about R or Matlab yet, other than that they are used for statistical analysis of data.)
5. I have just imported my first spoR file into OSCAR. I see no histogrammes, just a table.

Why do I want histogrammes?

background: I have REM-apnea, probably position related. So now I am trying to find out if sleeping on my side instead of on my back will reduce the number of (deep) desaturations. 
But I would also like to be sure that I don't get not-so-deep-but-longer-desaturations instead.
I found a scientific article about that sort of analysis:

"A review of approaches for analysing obstructive sleep apnoearelated patterns in pulse oximetry data" by  Philip I Terrill in Respirology.
In which Terrill shows how to analyse SpO2 data beyond the AHI-number (ODI-number).
He shows for example a graph for cumulative frequencies (so you can see what proportion of the night you have a certain spo2-value)
I am attaching an illustration from the article that shows what I mean.
(this illustration is about showing differences betwee pre- en post-surgery, my question here is just about showing differences)
I would like to do this with my own spo2-data.
Can anyone here help me on my way with this?
 
Best wishes!


RE: how can I make histograms from my SPO2-datafiles? - Crimson Nape - 03-21-2020

Import the csv data file into a spreadsheet program (Excel or LibreOffice Calc) and then chart the data you wish.


RE: how can I make histograms from my SPO2-datafiles? - unidee - 03-21-2020

Oscar developers can look that attached file. Something from it's bottom diagrams can be implement to Oscar if they have something valuable with apnea treating.


RE: how can I make histograms from my SPO2-datafiles? - ljongkind - 03-22-2020

(03-21-2020, 11:05 AM)Crimson Nape Wrote: Import the csv data file into a spreadsheet program (Excel or LibreOffice Calc) and then chart the data you wish.

Thanks for the suggestion.
It would work certainly for smaller amounts of data, but an entire night of oximetry has too much rows .
Excel only imports a smal portion of the datafile
These are huge files...

(03-21-2020, 05:21 PM)unidee Wrote: Oscar developers can look that attached file. Something from it's bottom diagrams can be implement to Oscar if they have something valuable with apnea treating.

That would be wonderfull!
It should not be too difficult, and it certainly would give more insight in the de-saturations , based on oximetry data that allready are known. 
 
If I need to explain better the value of these histograms, I will do so, if anyone is interested. 

best wishes!


RE: how can I make histograms from my SPO2-datafiles? - ljongkind - 03-25-2020

(03-21-2020, 05:21 PM)unidee Wrote: Oscar developers can look that attached file. Something from it's bottom diagrams can be implement to Oscar if they have something valuable with apnea treating.

The author of the article dircted me towards another article in which an algorithm for making the graphs (= a computerized algorithm for identifying and analyzing desaturations) is given. I quote: "This algorithm has been implemented in MATLAB, and the key elements of the source code are provided as additional supplementary files. These extracts have been carefully chosen to allow readers who are not technical experts to apply the method to their data. A brief tutorial is provided." 


I will see if I can get it to work in Matlab.

For others who want to try: 
customised software for some of the analyses presented is provided as a supplement to this paper: https://onlinelibrary.wiley.com/doi/full/10.1002/ppul.23987
The supplements can be accessed without paying, just click on the blue bar that says 'supporting information'.
The paper itself  is accessible via sci-hub