top of page

Welcome
to NumpyNinja Blogs

NumpyNinja: Blogs. Demystifying Tech,

One Blog at a Time.
Millions of views. 

Clinical data analysis using Tableau

Updated: Jan 14

Picture courtesy: wix.com
Picture courtesy: wix.com


Introduction


Sepsis is a life-threatening medical emergency that happens when the body’s response to an infection damages vital organs and, often, causes death if not identified and treated early.


I got an opportunity to work on a data analytics project team, doing analysis on clinical data related to Sepsis, using Tableau. In this blog I am sharing details about our work in that project, which can help individuals who would be doing similar work in the future. Also I take this blog as an opportunity to showcase my work experience in Tableau.


We used the clinical data, described in this website: https://physionet.org/content/challenge-2019/1.0.0/  Early Prediction of Sepsis from Clinical Data


The dataset shared with us is sourced from ICU patients in two separate hospital systems, and it had about 1.5 million records, which consists of Demographics, Vital Signs, and Laboratory values for each patient for every hour during their stay in ICU.


As a team we analyzed this dataset to gain insights about sepsis detection and management.


Following are the summary of what we did in this project. I will be explaining below about my work in each of these.

  • Understand Biomarkers

  • Sepsis data analysis

  • Biomarkers analysis

  • Organ analysis

  • Analysis on Systemic Inflammatory Response Syndrome (SIRS)

  • Septic shock analysis, Multi Organ Dysfunction (MOD) analysis


  1. Understanding Biomarkers


As a team we did research to understand about the key biomarkers present in the dataset including their ideal range in normal condition, their impact during sepsis and organs affected by each biomarker during sepsis.


I did research on two biomarkers viz., Calcium and Chloride to understand the following facts / insights.


Calcium helps our body with building strong bones and teeth, clotting blood, sending and receiving nerve signals, Squeezing and relaxing muscles, Releasing hormones and other chemicals, keeping a normal heartbeat. 

Normal range of serum calcium is 8.6 to 11mg/dL and it varies by age. Ionized (free) calcium, which is the physiologically active form, has a different normal range of approximately 4.65 to 5.25 mg/dL.


Chloride is an electrolyte in our blood that helps maintain proper fluid balance, blood volume, blood pressure, and pH levels.Normal range of chloride in blood is 95 to 113 milliequivalents per liter (mEq/L) and it varies by age.


During Sepsis, Calcium levels can be impacted and cause inflammation, damages to cells specifically to endothelial cells, which line blood vessels, causing heart and kidney problems. It can also cause septic shock-like conditions.


Chloride's impact during sepsis is complex, with hyperchloremia (high levels) linked to negative outcomes like acute kidney injury, reduced heart function, and higher mortality, while hypochloremia (low levels) may be associated with decreased mortality.


2. Sepsis data in patients


This dataset has an indicator (0 or 1) to show if the patient had sepsis or not during a particular hour of their ICU stay. We can identify three groups of patients based on this: Patients with Sepsis, No sepsis, Onset Sepsis.


Onset sepsis means a patient did not have sepsis initially when they were admitted to the ICU, but later developed symptoms leading to sepsis.


I analyzed the data to identify how many patients got onset sepsis, and segregated how many of them got onset sepsis in (a) Surgical ICU (SICU) where patients are recovering from recent surgery/severe trauma and (b) Medical ICU (MICU) where patients are treated for life-threatening medical conditions that do not need surgery.


For this analysis, I created calculated fields in Tableau with the following logic : 

If the patient has the sepsis indicator value as both 0 and 1 during their stay, then they have onset sepsis.


Onset Patiens in MICU

COUNTD(IF{ FIXED [Patient ID] : COUNTD([Sepsis Label]) }= 2 and [Unit1]=1 THEN [Patient ID] END)

Onset Patiens in SICU 


COUNTD(IF{ FIXED [Patient ID] : COUNTD([Sepsis Label]) }= 2 and [Unit2]=1 THEN [Patient ID] END)
This chart shows the number of patients with onset sepsis, i.e., who got sepsis after getting admitted in MICU and SICU, but did not have sepsis initially.
This chart shows the number of patients with onset sepsis, i.e., who got sepsis after getting admitted in MICU and SICU, but did not have sepsis initially.

3. Biomarker Analysis


Our team analyzed the impact of multiple biomarkers on the incidence of sepsis, based on each patient’s laboratory values. I analyzed the biomarker PTT which means Partial Thromboplastin Time.


PTT test is a blood test that tells you how long your blood takes to make a blood clot. It takes multiple proteins or clotting factors to complete the clot-making process. If you have an issue with any of these clotting factors, it can affect how long the whole process takes. 


Normal/ideal range is 25–35 seconds


During Sepsis, PTT can initially be short causing faster clotting and then it can be elevated quickly causing slower clotting time which means blood will take longer time to clot and this will cause organ failures and death.


In Tableau, I created the following calculation to find the PTT range available in the dataset, and number of patients within each range. 


PTT_Range = if[PTT] > 35 THEN 'ELEVATED' ELSEIF [PTT] < 25 THEN 'REDUCED' ELSE 'NORMAL' END

Insight gained: It takes multiple proteins or clotting factors to complete the clot-making process. 

Sepsis could cause issues with these clotting factors, affecting how long the whole process of recovery takes. 



4. Organ analysis - Lungs


Our team analyzed multiple biomarkers that could impact normal functioning of lungs. 


I worked on the impact due to the biomarkers ‘Fraction of inspired oxygen (%)’ (FiO2) and ‘Pulse oximetry’ (%) (O2Sat) and got the following insights.


Fraction of Inspired Oxygen (FiO2) is the percentage or concentration of oxygen a person breathes in. Patients with lung problems will have difficulty breathing and they will not be able to inhale normal room air and their pulse oximetry (O2Sat) level will be less than normal. So in hospital they will be provided with ventilator support to increase their FiO2 level for some time until their O2Sat level is stabilized. Once their breathing improves (O2Sat level is > 92%), their FiO2 is gradually reduced close to normal range (21%), because High FiO2 (>60%) for prolonged periods can damage lungs (oxidative stress).


In Tableau I created the following calculation to find the range of FiO2 available in the data set and classified them as Normal, Mild, Moderate and High and find the number of patients in each range. 


FiO2 Range = if[FiO2] < 0.24 THEN 'NORMAL'
 ELSEIF ([FiO2] > 0.24 and FiO2 < 0.45) THEN 'MILD' 
    ELSEIF ([FiO2] > 0.44 and FiO2 < 0.70) THEN  'MODEARATE'
        ELSEIF ([FiO2] > 0.70 and FiO2 < 1.00) THEN 'HIGH' 
END
This chart shows the FiO2 ranges, viz., Normal (<0.24), Mild (> 0.24 and < 0.45), Moderate (>0.44 and < 0.70), High (>0.70 and < 1.0)and the distinct count of FiO2 records in each range.
This chart shows the FiO2 ranges, viz., Normal (<0.24), Mild (> 0.24 and < 0.45), Moderate (>0.44 and < 0.70), High (>0.70 and < 1.0)and the distinct count of FiO2 records in each range.

To show the trend of FiO2 and corresponding impact on O2Sat, I filtered a few patients who had more number of FiO2 readings in the dataset using the following formula, which means they needed more monitoring during their stay in ICU. This can be seen in the chart. This is to show how the sepsis was controlled in the ICU

CountD(FiO2) > 11 = {FIXED [Patient ID]: COUNTD([FiO2])}>11
This is a visualization of FiO2 and O2Sat records for two patients for whom FiO2 was adjusted multiple times during their stay in ICU to improve their O2Sat levels.
This is a visualization of FiO2 and O2Sat records for two patients for whom FiO2 was adjusted multiple times during their stay in ICU to improve their O2Sat levels.

5. Analysis on Systemic Inflammatory Response Syndrome (SIRS)


Our team did analysis using Tableau to identify SIRS indicators in the dataset and developed a code to send on-time email alerts to medical care providers about the SIRS condition of patients to get immediate medical attention.


In this, I worked on analyzing Trigger Hour related data. 


Trigger hour is the crucial moment a patient first meets at least two SIRS criteria (high fever/low temperature, high heart/respiratory rate, high/low White Blood Cell), which might lead to sepsis/organ failure. Doctors/ healthcare teams need to be notified immediately about this so that they can initiate rapid care.


I first created calculations to identify if a patient has individual SIRS criteria like abnormal heart rate, abnormal respiratory rate, abnormal temperature, abnormal white blood cell count.

SIRS_HR = IF [HR] > 90 THEN 1 ELSE 0 END  

SIRS_Resp = IF [Resp] > 20 or [PaCO2]< 32 THEN 1 ELSE 0 END

SIRS_Temp = IF  [Temp] > 38.5 OR [Temp] < 35 THEN 1 ELSE 0 END

SIRS_WBC= IF [WBC] > 12.0000 OR [WBC] < 4.0000 THEN 1 ELSE 0 END

Then calculated SIRS score for each patient by adding their SIRS score for each criteria

SIRS_SCORE = [SIRS_HR]+[SIRS_Resp]+[SIRS_Temp]+[SIRS_WBC]

Then calculated the trigger hour as their particular ICU Length of Stay (ICULOS) where their SIRS score is greater than or equal to 2.


Trigger Hour ={ FIXED [Patient ID] : 
MAX(  IF [Iculos] <
           { FIXED [Patient ID] :
                MIN( IF [SIRS_SCORE] >= 2 THEN [Iculos] END )
           }
        THEN [Iculos]    
 END   )  }

This chart shows the trend of following SIRS symptoms for each patient and their trigger hour during their hospital stay: increased Heart Rate, increased Respiratory rate, abnormal body temperature, and abnormal range of white blood cell count.
This chart shows the trend of following SIRS symptoms for each patient and their trigger hour during their hospital stay: increased Heart Rate, increased Respiratory rate, abnormal body temperature, and abnormal range of white blood cell count.

6. Septic Shock Analysis


Our team did the septic shock analysis and Multiple Organ Dysfunction (MOD) analysis


I worked on analyzing the importance of body temperature in septic shock analysis and following is the key insight from this.


Body temperature is generally categorized into 3 groups - normal temperature , high temperature called hyperthermia, and low temperature called hypothermia. When the temperature is abnormal it is a strong indicator for sepsis and septic shock.


In Tableau I created a formula to group the range of body temperature and find the number of patients in each group.



Conclusion


Participating in such data analytics projects helps us to improve our analytical skills and technical skills. 


This Sepsis-Tableau project helped me to improve the data analytics insights skills, and also improve my technical skills in Tableau.

+1 (302) 200-8320

NumPy_Ninja_Logo (1).png

Numpy Ninja Inc. 8 The Grn Ste A Dover, DE 19901

© Copyright 2025 by Numpy Ninja Inc.

  • Twitter
  • LinkedIn
bottom of page