Medical data Visualizer
Created by Darío López Díaz. Work in progress..
The idea of this project is to analyze the correlation between different diseases, in a medical examination Data Frame. The data represent patients and the columns represent information like body measurements, results from various blood tests, and lifestyle choices.
The Data Frame looks in the following way:
We add the 'overweight' column, where we set values 0 or 1, if the pacient is not overweight (0) or if it is overweight (1). It looks in the following way.
We also normalize the values of Cholesterol and Glucosa.
Now we will prepare the data frame in a long format, to plot by the different variables (diseases).
The count plot by different diseases for two different cardio values is the following:
We see that the most of the diseases are strongly correlated with 'heart disease' (cardio). Where Cholesterol and overweight the most dramatic cases. Now we will filter wrong data, especially those cases where the 'high value of blood pressure' is lower than the 'low value of blood pressure'. We also filter the height and weight values which are over the 97.5% and the data and below the 2.5% of the values, in order to avoid possible wrong data.
With this filtered data frame we create a correlation matrix, that gives the connection between differnet deseases.
Finally, we crate a heatmap whit the correlation matrix, that shows numerically which are the most correlated deseases.
As we spect, the most correlated variables are: weight - overweight, gender - smoke, cholesterol - glucosa and gender - height.