/Serlette-medical-data-visualizer

Using two functions, draw_cat_plot and draw_heat_map, to visualize data from a medical exam dataset. And matplotlib.pyplot.show() to plot.

Primary LanguagePython

This code appears to define two functions, <draw_cat_plot> and <draw_heat_map>, to visualize data from a medical examination dataset.

The first function <draw_cat_plot> creates a categorical plot using Seaborn's catplot method. It first creates a list of the columns to include in the plot, then uses <pd.melt> to reshape the data so that each row represents an observation of a variable-value pair. It then uses 'sns.catplot' to create a count plot of the variables, separated by the cardio column. The second function <draw_heat_map> creates a heatmap using Seaborn's heatmap method. It first filters the original data frame using specific conditions. It then calculates the correlation matrix and generates a mask for the upper triangle of the matrix. Finally, it uses 'sns.heatmap' to create the heatmap of the correlation matrix with annotated correlation coefficients.

Both functions use <matplotlib.pyplot.show()> to display the resulting plots in the Jupyter Notebook.The final lines of each function contain commented-out code to save the plots as image files, and a commented-out return statement.