ComeçarComece de graça

Exploring missing data with scatter plots

Missing values in a scatter plot in ggplot2 are removed by default, with a warning.

We can display missing values in a scatter plot, using geom_miss_point() - a special ggplot2 geom that shifts the missing values into the plot, displaying them 10% below the minimum of the variable.

Let's practice using this visualization with the oceanbuoys dataset.

Este exercício faz parte do curso

Dealing With Missing Data in R

Ver curso

Instruções do exercício

  • Explore the missingness in wind east west (wind_ew) and air temperature, and display the missingness using geom_miss_point().
  • Explore the missingness in humidity and air temperature, and display the missingness using geom_miss_point().

Exercício interativo prático

Experimente este exercício completando este código de exemplo.

# Explore the missingness in wind and air temperature, and  
# display the missingness using `geom_miss_point()`
ggplot(oceanbuoys,
       aes(x = ___,
           y = ___)) + 
  geom_miss_point()

# Explore the missingness in humidity and air temperature,  
# and display the missingness using `geom_miss_point()`
ggplot(___,
       aes(x = ___,
           y = ___)) + 
  geom_miss_point()
Editar e executar o código