How Data Actually Works

Kinds of data

Categories that have an order

Some categories, like small, medium and large, have a natural order that you must keep when you list or sort them.

By the end of this lesson you can tell ordered categories (small, medium, large) from unordered ones.

Why it matters

A shop orders school shirts from a table of sizes. If the table lists sizes in the wrong order, it is easy to misread, and the shop may order the wrong boxes. Keeping the order makes a table quick and safe to read.

The idea in plain words

Think of the steps on a staircase. Step 2 is always above step 1, and below step 3. You cannot swap them around.

Some categories are like that. Lucía's shirt_size column holds S, M and L: small, medium and large. Medium is bigger than small, and large is bigger than medium. These labels have an order.

Ordered category: a category whose groups have a natural order, such as small, medium, large, or Monday, Tuesday, Wednesday.

Other categories have no order at all. Is Mango "more" than Guava? Is Bus "bigger" than Car? No. They are just different.

Sizes go one way: small, medium, large. Fruits have no order like this.

Ordered categories are still labels. You still cannot add or average them. But you must list them in their order, so that a reader can see the steps.

See it done

Data: class-survey.csv (synthetic), all 30 pupils.

Question: how many shirts of each size does Lucía need for both classes?

  1. Check the kind of data. shirt_size holds S, M, L. It is an ordered category.
  2. Count each group (by tallying, as in lesson 2.2). S: 15, M: 10, L: 5.
  3. Check the total. 15 + 10 + 5 = 30. Every pupil counted once.
  4. List them in their real order. S 15, then M 10, then L 5. Not L, M, S.

Why say "not L, M, S"? Because that is what you get if you sort the labels from A to Z. L comes before M, and M before S, in the alphabet. The computer does not know that S means small.

Same counts, two orders. Only one of them reads naturally from small to large.

Your turn, with help

Amara's day column holds Mon, Tue, Wed, Thu, Fri, Sat.

  1. Is day an ordered category?
  2. If you sorted these six labels from A to Z, which day would come first?

Hint: for question 2, write the six labels and put them in alphabetical order by their first letter.

Show the answer
  1. Yes. Days of the week come in a fixed order.
  2. Fri. A to Z gives Fri, Mon, Sat, Thu, Tue, Wed, which is not the order of the week.

Your turn, alone

Ordered or not ordered?

  1. Payment method: Cash, Transfer, Card.
  2. Pain level in a clinic: none, mild, strong, very strong.
  3. Class: 5A, 5B.
  4. Months of the year.
Check your answers
  1. Not ordered.
  2. Ordered.
  3. Not ordered (5A is not "more" than 5B; they are just two classes).
  4. Ordered.

Watch out

  • Letting A to Z decide. Sorting labels alphabetically breaks their natural order (L, M, S; or Fri, Mon, Sat ...). Put ordered labels in their real order yourself.
  • Treating order as an amount. L is bigger than S, but L is not "3" and S is not "1". You still cannot do sums with the labels.
  • Inventing an order. Fruit names, payment methods and countries have no natural order. Do not pretend they do.

Say it back

  1. What is an ordered category?
  2. Give one example that is ordered and one that is not.
  3. Why can sorting A to Z go wrong for sizes?
Show the answers
  1. A category whose groups have a natural order.
  2. Ordered: shirt sizes (or days). Not ordered: fruit (or payment method).
  3. The computer sorts the letters, giving L, M, S, which is not small to large.

What is next

Days have an order. So do dates. But is 03/04/2026 the 3rd of April or March the 4th? It depends on where you live. Next lesson.

Enjoying the free course?

Join the list and we will email you when new courses and launch offers go live. No spam.