Coding qualitative interviews: how to create a codebook
How to build a codebook for qualitative interviews: code names, definitions, inclusion and exclusion criteria, examples, related codes and a change log.
A code gives you a rule for assigning passages
Two analysts can use the same name for a theme while marking different passages. “Trust” alone leaves open whether the code covers promises, transparency, previous experience or how the participant feels. A codebook makes the boundaries explicit so decisions can be discussed using examples.
The approach to coding depends on the research methodology. In reflexive thematic analysis, the role of the researcher differs from team coding based on agreed rules. Define your research stance and goal before deciding how to document codes.
Develop codes by working with passages from the data
Define the analytic question
Write down what you want to understand and which interviews are in scope. A code unrelated to the question might be interesting without being useful to this analysis.
Read the interviews first
Read several different interviews in full and make notes. Look beyond keyword matches. The same words can have different meanings, and people can describe the same theme in different words.
Document each code
Give the code a short name, a definition, inclusion and exclusion criteria and examples. Identify similar codes and explain how to choose between them. Anonymize the example while keeping enough of the passage to show the context.
Test and version the codebook
Apply it to a new passage or review a sample together. Note where the rule breaks down: a code might be too broad, overlap with another code or hide an exception. Record the reason for changes and whether previously coded material needs revisiting.
Separating expectations from actual experience
This is a fictional training example. The names, circumstances and outcomes are included solely to explain the method.
I thought they’d get back to me in an hour, but I usually waited until the next day. After the second time, I started writing to them ahead of time.
The excerpt can be marked “expected response time,” “experienced delay” and “behavioral adaptation” if those codes address the research question. “Poor service” is too evaluative. The participant describes a gap and an action without necessarily making that broader judgment.
Define the boundary of each code. Use “behavioral adaptation” when someone changes what they do after an experience. An intention without action could go under a related code. This is a fictional example.
| Code | Include | Exclude |
|---|---|---|
| Expected response time | A desired response time is named | Only the actual response time |
| Experienced delay | A specific wait is described | General opinion without an episode |
| Behavioral adaptation | A change in behavior | Intention only |
| Unclear | Insufficient context | Forcing a choice |
Code entry
Keep the code entries and change log with the dataset. Leave out unnecessary identifiers.
Code name: Link to the research question: Definition: Include when: Exclude when: Example that fits: Boundary example: Related codes: Rule for choosing: Author / date: Version: Reason for the change: Does prior material need recoding?
Check the boundaries of each code
- Each code addresses the analytic question.
- There are inclusion and exclusion criteria and a boundary example.
- The analyst’s judgment is kept distinct from the participant’s words.
- Codebook changes have a version and a reason.
A closer look
How many codes should we start with?
There is no universal number. Start with a manageable set tied to the research question and adjust it to the data and methodology.
Do analysts always have to agree?
It depends on the approach. In team coding, disagreement helps clarify the rules. In reflexive analysis, having everyone assign the same codes may be irrelevant to the aim.