data visualization Flashcards
what are bar plots?
Bar Plots are the most common way of displaying the distribution of a qualitative (categorical) variable.
how do we generate a bar plot?
import seaborn as sns
sns.countplot(data = births, x = ‘Maternal Smoker’);
how do we generate a histogram?
sns.histplot(data = births, x = ‘Maternal Pregnancy Weight’);
what is skewed right?
If a distribution has a long right tail, we call it skewed right. Mean is typically to the right of the median.
what is skewed left?
If the tail is on the left, we say the data is skewed left.
what is unimodial
A plot with one clear maximum
what is bimodial
A plot with 2 maximums, even if one is taller–it’s like two mountain peaks right next to eachother
how do we plot a histogram for density?
sns.histplot(data = births, x = ‘Maternal Pregnancy Weight’,
kde = True, stat = “density”);
how do we plot a violonplot?
sns.violinplot(data=births, x=’Maternal Smoker’, y=’Birth Weight’)
what is KDE?
Kernel Density Estimation is used to estimate a probability density function (or density curve) from a set of data.
Just like a histogram, a density curve’s total area must sum to 1.