Sub topic 7
Cluster observations into themes
This chapter assumes you have already split your interview notes into atomic observations and given each one consistent tags. You need a spreadsheet or notes tool where you can move items around. Code examples use Python 3.
What a theme is
A theme is a group of observations that point at the same underlying situation. Tags describe single observations. Themes describe patterns across observations and participants. Clustering turns a long list of tagged items into a few groups you can reason about.
This step is often called affinity clustering. You group by similarity, then name each group afterward. Naming a group first makes you hunt for evidence that fits the name.
A working procedure
- Put every observation on its own row or card, with its ID, participant, and tags visible.
- Group items that share a tag or describe the same situation. Do not decide on names yet.
- Name each group with a short phrase that describes the situation, such as "Manual weekly reporting".
- Check each member. If an item only loosely fits, move it or give it its own group.
- Split groups that hold two distinct situations. Merge groups that differ only in wording.
- Record which observations and which participants sit in each theme.
Cluster on problems, not on topics
Clustering by topic gives vague buckets such as "Reporting" or "Pricing". A bucket like that holds unrelated problems, so it tells you little. Cluster by the situation behind the observation.
| Topic bucket | Better theme |
|---|---|
| Reporting | Totals from different sources do not match |
| Reporting | Weekly report is rebuilt by hand |
| Onboarding | New hires cannot find where data lives |
If an observation is a requested solution, such as "add an export button", trace it back to the problem it implies before you place it. Cluster the problem, and keep the request as evidence in that theme.
Cluster in code
For larger note sets, a small script can show how your tags map to themes and who contributed to each one. The mapping is still your judgment. The script only keeps it consistent.
from collections import defaultdict
observations = [
{"id": "o1", "participant": "P1", "tags": ["manual_reporting"]},
{"id": "o2", "participant": "P1", "tags": ["data_mismatch"]},
{"id": "o3", "participant": "P2", "tags": ["manual_reporting", "data_mismatch"]},
{"id": "o4", "participant": "P3", "tags": ["weekly_routine"]},
{"id": "o5", "participant": "P3", "tags": ["pricing_confusion"]},
]
theme_for_tag = {
"manual_reporting": "Reports are rebuilt by hand",
"weekly_routine": "Reports are rebuilt by hand",
"data_mismatch": "Totals from sources disagree",
}
themes = defaultdict(lambda: {"observations": set(), "participants": set()})
unassigned = []
for obs in observations:
placed = False
for tag in obs["tags"]:
theme = theme_for_tag.get(tag)
if theme:
themes[theme]["observations"].add(obs["id"])
themes[theme]["participants"].add(obs["participant"])
placed = True
if not placed:
unassigned.append(obs["id"])
for name, data in themes.items():
print(name, sorted(data["observations"]), sorted(data["participants"]))
print("Unassigned:", unassigned)The script prints each theme with its observation IDs and participants. It also prints o5 as unassigned. Do not force leftovers into a theme. Keep them visible, because a lone observation can become a new theme once more interviews arrive.
Common errors
- Too few, too large themes. If a theme has a dozen members from one vague tag, split it by situation.
- One theme per participant. If groups mirror interviews, you are summarizing people, not finding patterns.
- Counting mentions. One talkative participant can fill a theme. Note how many distinct participants appear in it. The next chapter covers how to judge that.
- Hiding outliers. Observations that contradict a theme belong in your notes. Record them under the theme as counter-evidence.
- Losing the link to the source. A theme without observation IDs cannot be checked later.
Exercise
Your cluster "Reporting" contains 14 observations from 5 participants. Some describe manual copying, some describe totals that disagree, and one asks for a dashboard. What do you do?
Show answer
Split the cluster by situation. Create one theme for manual copying and one for disagreeing totals. Trace the dashboard request back to the problem behind it, then place it with the matching theme as evidence. Keep the observation IDs and participants attached to each new theme.