Chapter 16 8. Why Reshape the WHO Data?

Many columns in the WHO dataset are not true variables. Instead, their names contain several pieces of information, such as diagnosis type, sex, and age group.

For example, a column name like new_sp_m014 contains:

  • new: new cases
  • sp: smear-positive pulmonary TB
  • m: male
  • 014: age group 0–14

To make the dataset tidy, we need to reshape it from wide format to long format.