Foundations & the Data-Science Workflow
Variable Types
Variable types describe what kind of information a variable holds, which in turn decides what you are allowed to do with it. The two broadest families are categorical (labels or groups) and numerical (quantities you can do arithmetic on).
Knowing the type is not pedantry — it dictates the right summary and the right chart. You can average numerical ages but not categorical eye colours; you compare groups with a bar chart but distributions with a histogram (直方圖). A common subtlety is the ordinal type: categories with a meaningful order, like “small, medium, large,” which behave partly like labels and partly like numbers.
Also called