Get startedGet started for free

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

View Course

Exercise instructions

  • First explore the missingness structure of oceanbuoys using vis_miss().
  • Explore the distribution of wind east west (wind_ew) for the missingness of air temperature using geom_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()
Edit and Run Code