1. Learn
  2. /
  3. Courses
  4. /
  5. Dealing With Missing Data in R

Exercise

Visualizing missingness patterns

Let's practice a few different ways to visualize patterns of missingness using:

  • gg_miss_upset() to give an overall pattern of missingness.
  • gg_miss_fct() for a dataset that has a factor of interest: marriage.
  • and gg_miss_span() to explore the missingness in a time series dataset.

What do you notice with the missingness and the faceting in the data?

Instructions

100 XP
  • Explore missingness pattern of the airquality dataset with gg_miss_upset().
  • Explore how the missingness changes in the riskfactors dataset across the marital variable using gg_miss_fct()
  • Explore how the missingness changes in the pedestrian dataset across the hourly_counts variable over a span of 3000 (you can also try different spans from 2000-5000).
  • Explore the impact of month on hourly_counts by including it in the facet argument, with a span of 1000.