Sub topic 10
Code Transcripts into Themes
This chapter shows how to turn raw interview transcripts into a short list of themes, each with a count of how many interviews mention it. It assumes you have already run several interviews and have transcripts or detailed notes. It also assumes you are comfortable with simple counting and percentages.
What coding is and why it matters
Coding means attaching short labels, called codes, to pieces of what people said. A theme is a group of related codes that point to one idea, such as "trust" or "easy setup". Coding turns a pile of conversation into something you can compare, count and explain to other people.
Without coding, you tend to remember the vivid interview, the recent one, or the one that agreed with what you already believed. Coding forces you to go through every transcript with the same method, so the result reflects all of your interviews and not just the memorable ones.
The coding workflow
The work moves from raw text to a defensible list of themes. Each step produces something you can check.
Step 1: Read before you code
Read every transcript once without labeling anything. Note your first impressions in a separate place. This gives you a feel for the whole set, so you do not invent codes from the first interview alone and then force the rest to fit.
Step 2: Highlight excerpts
Go through each transcript and mark passages that answer your research question. In this tutorial, that question is why the customer chose your brand over the alternatives. Mark reasons, triggers, worries, alternatives they considered, and comparisons. Skip small talk and off-topic stories.
An excerpt is usually one to four sentences. If you highlight whole pages, nothing stands out. If you highlight single words, you lose the context that gives them meaning.
Step 3: Assign codes
Write a short label for what each excerpt is about. Two styles are common:
- Descriptive codes name the topic. "Price", "support", "setup".
- Interpretive codes name what you think is going on. "Fear of being locked in", "wanted a safe choice".
Start close to the customer's words, then move toward interpretation once you have seen the pattern. Early on, descriptive codes keep you honest.
Here is an example of coded excerpts from a hypothetical interview with a customer called P2.
| Excerpt | Code |
|---|---|
| "My boss had been burned by a vendor that vanished, so I wanted a name I'd heard before." | trust |
| "I was up and running in an afternoon. I didn't need IT." | ease_of_setup |
| "Honestly, the other two were cheaper, but I didn't think about that for long." | price_not_decisive |
The third row shows a useful habit. A code can record that something was not a deciding factor. That is also a finding.
Step 4: Group codes into themes
After a few transcripts, you will see codes that overlap. "Trust", "known name" and "not a risky choice" might all describe the same idea. Group them under one theme and give the theme a clear name.
Keep the grouping rules simple:
- A theme should be describable in one sentence.
- Each code belongs under one theme. If it fits two, the codes are probably too vague, so split it.
- Merge themes that you cannot tell apart in practice.
- Split themes that contain two different reasons customers would act on differently.
Expect to revise. Return to step 3 and re-label earlier transcripts when you change a code, so the whole set is coded the same way.
Step 5: Count interviews per theme
For each theme, count the number of interviews that mention it at least once. Count interviews, not mentions. If one person says "trust" six times, that is still one interview. This prevents one talkative participant from making a theme look bigger than it is.
Counting themes with Python
If you have more than a few interviews, a short script avoids counting errors. The script below takes a dictionary of interviews, where each value is the list of codes you assigned to that transcript. It turns each list into a set so that repeated codes count once, then counts how many interviews contain each code.
from collections import Counter
# Theme codes assigned by hand to each interview transcript.
interviews = {
"p1": ["price", "trust", "support"],
"p2": ["trust", "ease_of_setup"],
"p3": ["trust", "price"],
"p4": ["support", "ease_of_setup", "trust"],
}
# Count each theme once per interview, even if it was mentioned repeatedly.
counts = Counter(code for codes in interviews.values() for code in set(codes))
for code, n in counts.most_common():
print(f"{code}: {n} of {len(interviews)} interviews")The output is:
trust: 4 of 4 interviews
price: 2 of 4 interviews
support: 2 of 4 interviews
ease_of_setup: 2 of 4 interviewsItems with equal counts may appear in a different order, because most_common keeps the order in which they were first seen. Do not read meaning into the order of tied items.
The script does not code anything for you. You assign the codes by reading. The script only does the arithmetic.
Reading the counts correctly
Counts help you see what recurs. They do not turn interviews into a statistical sample.
- Small numbers are not percentages. "Trust: 4 of 4" is fine to report. "100% of customers value trust" is not, because four interviews cannot support a claim about all customers.
- Frequency is not importance. A reason mentioned by two people might be the deciding factor for both. A reason mentioned by everyone might be a minor point that people agree with politely.
- Your sample shapes the counts. If you interviewed only recent buyers, you cannot say what lost customers think. Chapter notes on sampling apply here: report which groups the counts come from.
- Counts of codes you chose depend on how you defined them. A broad code like "trust" will always collect more mentions than a narrow one. Check that the codes in a comparison are about the same size.
To keep the comparison fair, report counts by group when you can. For example, show how many recent buyers and how many lost customers mentioned each theme.
Keeping the coding honest
Coding involves judgment, so build in checks.
Separate what people said from what you concluded
Keep a short quote with each code. When you write a finding later, you can point to the actual words. If you cannot find a quote that supports a theme, the theme may be your own assumption.
Look for evidence against your theme
After you settle on a theme, search the transcripts for cases that contradict it. A person who chose you despite poor support challenges the idea that support drives choice. Note these cases. They show where a theme does not apply.
Watch for reasons reconstructed after the fact
People often explain a decision in a neat way after they have made it. Compare what a customer says drove the choice with what they describe happening: who they talked to, what they tried, what they compared. If the story and the stated reason do not match, record both. The earlier chapter on response bias explains why this gap exists.
Use a second coder when it matters
If the findings will drive a large decision, ask a colleague to code two or three transcripts using your code list, without seeing your labels. Compare the results. Where you differ, the code definition is probably unclear. Rewrite the definition and recode.
A simple agreement check is the share of excerpts that both of you gave the same code. Agreement well below about 80% usually means the definitions need work. This is a rule of thumb for judging your own process, not a formal standard.
Common errors
| Error | What it looks like | Fix |
|---|---|---|
| Coding too early | Codes come from the first two interviews and the rest are forced to fit | Read all transcripts once before coding |
| Too many codes | Sixty codes, most used once | Merge codes that you cannot tell apart |
| Counting mentions | One participant inflates a theme | Count interviews, not mentions |
| Themes as topics | A theme named "Pricing" with no point of view | Name the finding, such as "Price was checked but did not decide" |
| Ignoring contradictions | Every quote supports the theme | Search for cases that disagree |
| Treating counts as proof | "75% of customers say..." from eight interviews | Report counts as "6 of 8 interviews" |
A short worked example
Suppose you have eight interviews. After coding, your counts look like this:
| Theme | Interviews mentioning it |
|---|---|
| Known and safe name | 6 of 8 |
| Quick setup without IT help | 5 of 8 |
| Responsive support during trial | 4 of 8 |
| Lower price than alternatives | 2 of 8 |
You would write the finding as: "Six of eight interviewees said they picked us because we felt like a safe, familiar choice. Five described setting up without IT help. Price was mentioned in two interviews and was described as not decisive in both."
You would also note the limits: eight interviews, all recent buyers, no lost customers. The next chapters use themes like these to shape positioning and to design a survey that checks them with more people.
Checklist before you move on
- Every transcript was coded with the same final code list.
- Each theme has a one-sentence definition and at least two supporting quotes.
- You counted interviews, not mentions.
- You searched for contradicting cases and recorded them.
- Your write-up states the sample and its limits.
Exercise
Four interviews are coded as follows. P1: trust, trust, price. P2: price, support. P3: trust. P4: support, support, support. Using the "count each theme once per interview" rule, how many interviews mention each of trust, price and support? Then explain why counting every mention would give a misleading picture.
Show answer
Trust: 2 of 4 (P1 and P3). Price: 2 of 4 (P1 and P2). Support: 2 of 4 (P2 and P4). Counting every mention would give trust 3, price 2 and support 4, which makes support look like the leading reason. That result comes mostly from P4 repeating one point three times. Counting interviews shows that the three themes are equally common across participants.
Exercise
A colleague reports "Ease of setup matters to 80% of our customers" based on 5 interviews in which 4 people mentioned it. List two problems with this statement and rewrite it so it is accurate.
Show answer
First, 5 interviews are too few to estimate a percentage of all customers. Second, the statement says "matters", but the interviews show only that people mentioned it, and it also does not say which customers were interviewed. A better version: "Four of the five customers we interviewed, all recent buyers, mentioned ease of setup as part of their decision. We will test this with a larger survey."