Nabular data and filling by missingness
Summary statistics are useful to calculate, but as they say, a picture tells you a thousand words.
In this exercise, we are going to explore how you can use nabular
data to explore the variation in a variable by the missingness of another.
We are going to use the oceanbuoys
dataset from naniar
.
This exercise is part of the course
Dealing With Missing Data in R
Exercise instructions
- First explore the missingness structure of
oceanbuoys
usingvis_miss()
. - Explore the distribution of wind east west (
wind_ew
) for the missingness of air temperature usinggeom_density()
. - Explore the distribution of sea temperature for the missingness of humidity using
geom_density()
.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# First explore the missingness structure of `oceanbuoys` using `vis_miss()`
vis_miss(___)
# Explore the distribution of `wind_ew` for the missingness
# of `air_temp_c_NA` using `geom_density()`
bind_shadow(oceanbuoys) %>%
ggplot(aes(x = ___,
color = air_temp_c_NA)) +
geom_density()
# Explore the distribution of sea temperature for the
# missingness of humidity (humidity_NA) using `geom_density()`
___(___) %>%
ggplot(aes(x = ___,
color = ___)) +
geom_density()