Sub topic 7
Open coding your observations
This chapter assumes you already have atomic observations. Each one is a single, self-contained note with an ID and a participant label, and it can be traced back to its source. It also assumes you have read through the data once (familiarization). Open coding is the next step. You attach short labels, called codes, to observations. This turns a pile of notes into something you can group, count, and compare.
What open coding is
A code is a short label that says what an observation is about or what it shows. Open coding means you create those labels from the data as you read, instead of picking them from a fixed list. It is an inductive technique. The codes come from what participants did and said.
Coding sits between two stages:
- Before it, you have notes. Each note is a single observation, but nothing yet links similar ones.
- After it, you have a set of labels. These labels let you cluster observations on an affinity map and build themes.
Codes are not themes. A code is small and close to the data, such as setup_friction. A theme is a claim about meaning, built later from several codes. If you try to write themes while coding, you will stop reading closely and start confirming what you already believe.
How to code a note
Work through the notes one at a time, in a consistent order. For each note, ask: "What is happening here?" Then pick or create a code that answers it.
Take this note: "Gave up looking for the export button." Several codes could fit:
navigation_confusion: the participant could not find a feature.task_abandonment: the participant stopped before finishing.export_discoverability: the problem is specific to export.
All three may be valid. Which ones you apply depends on your research question and on how fine-grained you want the analysis to be. A note can carry more than one code, as long as each code is true of the observation.
Good codes
Good codes are:
- Descriptive. They name what is in the note.
frustrationis an interpretation.repeated_failed_searchis a description. - Short and consistent. Pick a naming style, such as lowercase words joined by underscores, and keep it.
- Specific enough to be useful. A code like
usability_problemwould apply to almost every note and would separate nothing. - General enough to recur. A code used on only one note is fine early on, but a long tail of single-use codes usually means the labels are too narrow.
Code the behavior, not your conclusion
Compare these two codes for the same note:
| Note | Descriptive code | Interpretive code |
|---|---|---|
| Skipped the setup tour because it felt long. | `skipped_onboarding` | `bad_onboarding_design` |
| Asked a coworker how to share a board. | `asked_colleague_for_help` | `sharing_is_broken` |
The interpretive codes jump to a conclusion the note does not establish. The participant may have skipped the tour for another reason, or the sharing feature may work well once found. Descriptive codes keep that question open until you have looked at all the evidence.
Coding in practice
You can code in a spreadsheet, a research repository tool, or on sticky notes. What matters is that each code is attached to the note's ID. The following Python sketch shows the data structure and a first grouping view.
from collections import defaultdict
notes = [
{"id": "n1", "participant": "P1", "text": "Skipped the setup tour because it felt long.", "codes": ["setup_friction"]},
{"id": "n2", "participant": "P2", "text": "Could not find where to import old data.", "codes": ["setup_friction", "navigation_confusion"]},
{"id": "n3", "participant": "P2", "text": "Asked a coworker how to share a board.", "codes": ["sharing_unclear"]},
{"id": "n4", "participant": "P3", "text": "Gave up looking for the export button.", "codes": ["navigation_confusion"]},
]
by_code = defaultdict(list)
for note in notes:
for code in note["codes"]:
by_code[code].append(note["id"])
for code, ids in sorted(by_code.items()):
print(code, ids)The output is:
navigation_confusion ['n2', 'n4']
setup_friction ['n1', 'n2']
sharing_unclear ['n3']Notice that n2 appears under two codes. That is expected. The grouping gives you a first view of which observations might cluster together later.
Check for notes with no code
After a coding pass, confirm that every note has at least one code. Uncoded notes drop out of later analysis without anyone noticing.
uncoded = [n["id"] for n in notes if not n["codes"]]
print("Uncoded notes:", uncoded)An empty list means every note was coded. If the list is not empty, either code those notes or record why they were left out.
Keeping the codes consistent
Open coding creates a risk: you invent setup_friction on Monday and onboarding_difficulty on Wednesday for the same thing. Two habits reduce this.
- Keep a running list of codes with definitions. This is the start of your codebook, which the next chapter covers in detail. Before creating a new code, scan the list.
- Do a second pass. Open coding is rarely right the first time. Early notes get coded before you know what the data contains. After the first pass, reread the early notes and apply the codes you developed later.
A codebook entry makes a code usable by someone else. It states what the code means and where its edges are:
{
"code": "navigation_confusion",
"definition": "The participant cannot find a feature or setting they are looking for.",
"include_when": "The participant searches, backtracks, or asks where something is.",
"exclude_when": "The participant finds the feature but dislikes how it works.",
"example_note_ids": ["n2", "n4"]
}The exclude_when field often matters more than the definition. It tells you what to do with look-alike cases.
Common errors in open coding
- Coding the topic instead of the content. The code
sharingsays what the note is about. It does not say what happened.sharing_uncleardoes. - Coding too coarsely. If three codes cover 80 notes, each code is carrying too much. Split it.
- Coding too finely. If you have 150 codes for 80 notes, you will struggle to cluster. Merge codes that always occur together or mean the same thing.
- Letting expectations drive the labels. If you went into the study believing onboarding was a problem, you may over-apply
setup_friction. Look for notes that contradict your expectation and code those too. - Dropping the evidence trail. A code with no note IDs behind it cannot be checked. Always store the ID alongside each code.
When to stop
You can stop open coding when:
- Every note has at least one code.
- New notes mostly receive codes you already have.
- Your codes have written definitions.
- A second pass over a sample of notes does not change many codes.
Stopping does not mean the codes are final. Clustering will show you which codes overlap, and you will revise them then.
Exercise
A participant says, "I looked in settings, then in the profile menu, and finally searched the help page to find how to change my notification email." Give two descriptive codes for this note, one interpretive code you should avoid, and explain why you should avoid it.
Show answer
Two descriptive codes: navigation_confusion (the participant searched several places for a setting) and used_help_search (the participant turned to help content). An interpretive code to avoid is poor_information_architecture. It states a conclusion about the cause of the problem, which this single note does not establish. Descriptive codes keep the analysis open until you can compare the note with others.
Exercise
You have coded 40 notes and find that 22 of them carry the code usability_problem. What is wrong, and what do you do?
Show answer
The code is too coarse to separate anything, because it applies to over half the notes. Go back through those 22 notes and split the code into more specific ones, such as navigation_confusion, unclear_label, or error_recovery_failed. Add definitions to the codebook and recode the affected notes.