Sub topic 5
Find topic frequency and year-wise trends
Subject-wise weightage tells you how many questions each subject contributed. This chapter goes one level down. It asks which topics inside a subject keep returning, and whether each topic is growing, fading or holding steady across papers.
This chapter assumes you have the tagged pyq.csv from the earlier chapters, with one row per question and at least the columns year, subject and topic. It also assumes you can read a simple table and work out a percentage or an average.
What topic frequency measures
Topic frequency is the number of questions tagged with a given topic across the papers you collected. Two numbers describe it, and you need both:
- Total count. How many questions the topic produced over all years.
- Spread. In how many different years the topic appeared at all.
A topic with 8 questions that all came from one paper is different from a topic with 8 questions spread over 8 papers. The first is a one-off cluster, perhaps tied to an event that year. The second is a dependable part of the paper. Total count alone cannot tell them apart.
A year-wise trend is the pattern of a topic's count as you move from older papers to newer ones. A trend is only worth reading when you have enough papers. With three or fewer, almost any pattern is noise.
Step 1: Fix a topic vocabulary
Choose topic names from the official syllabus headings and keep them stable. A few practical rules:
- Use a topic list of roughly 8 to 15 topics per subject. Fewer than that hides detail. More than that spreads questions so thinly that every topic looks rare.
- Add a topic only when at least two questions need it. Otherwise file the question under the nearest existing topic.
- Keep a short note of what each topic includes, so you tag the same way a month from now.
- Retag old rows when you rename a topic. Do not leave two names for one idea.
Step 2: Count topics and the years they appear in
This script counts questions per subject and topic pair, and the number of distinct years each pair appeared in. Grouping by the pair matters because two subjects can both have a topic called "Introduction" or "Basics".
import csv
from collections import Counter, defaultdict
with open("pyq.csv", newline="", encoding="utf-8") as f:
rows = list(csv.DictReader(f))
years = sorted({r["year"] for r in rows})
topic_count = Counter()
topic_years = defaultdict(set)
for r in rows:
key = (r["subject"], r["topic"])
topic_count[key] += 1
topic_years[key].add(r["year"])
print(f"{'Subject / topic':42} {'Qs':>3} Years")
for (subject, topic), n in topic_count.most_common(15):
label = f"{subject} / {topic}"
seen = len(topic_years[(subject, topic)])
print(f"{label:42} {n:>3} {seen}/{len(years)}")The last column reads like 6/7, meaning the topic appeared in 6 of the 7 papers you hold. Sort by that column as well as by the count. A topic that appears in every paper with one or two questions each often deserves more revision time than a topic that produced a single burst.
Step 3: Build a year-by-topic table
A table with topics as rows and years as columns shows the trend at a glance. The numbers below are invented for illustration. Your own data will differ.
| Topic (Polity) | 2019 | 2020 | 2021 | 2022 | 2023 | Total |
|---|---|---|---|---|---|---|
| Fundamental Rights | 2 | 1 | 2 | 3 | 3 | 11 |
| Parliament and legislature | 1 | 2 | 1 | 1 | 1 | 6 |
| Local self-government | 3 | 2 | 1 | 1 | 0 | 7 |
| Constitutional amendments | 0 | 1 | 0 | 2 | 0 | 3 |
Reading this table:
- Fundamental Rights is both frequent and rising. Treat it as a core topic.
- Parliament and legislature is steady, with one or two questions every year. Reliable but not growing.
- Local self-government is fading in this sample. Be careful, because it might return, and a Maharashtra-specific angle can keep it alive.
- Constitutional amendments is sporadic. It appears in some years and vanishes in others.
The script below prints such a table for any subject you name.
import csv
from collections import Counter
SUBJECT = "Polity"
with open("pyq.csv", newline="", encoding="utf-8") as f:
rows = list(csv.DictReader(f))
years = sorted({r["year"] for r in rows})
by_topic = {}
for r in rows:
if r["subject"] == SUBJECT:
by_topic.setdefault(r["topic"], Counter())[r["year"]] += 1
print("topic".ljust(32), *years, "total")
ordered = sorted(by_topic.items(), key=lambda kv: -sum(kv[1].values()))
for topic, c in ordered:
cells = (str(c[y]).rjust(len(y)) for y in years)
print(topic.ljust(32), *cells, str(sum(c.values())).rjust(5))A Counter returns 0 for a year with no questions, so missing years print as zeros. That matters, because a zero is information. It means the topic was absent that year.
Step 4: Label each topic's direction
Reading a table by eye works for one subject. For the whole paper, add a simple rule. Split your years into an earlier half and a recent half, compute the average questions per paper in each, and compare.
import csv
from collections import Counter
with open("pyq.csv", newline="", encoding="utf-8") as f:
rows = list(csv.DictReader(f))
years = sorted({r["year"] for r in rows})
assert len(years) >= 4, "Need at least 4 papers for a split to mean anything"
half = len(years) // 2
earlier = set(years[:half])
recent = set(years[half:])
count = {}
for r in rows:
key = (r["subject"], r["topic"])
count.setdefault(key, Counter())[r["year"]] += 1
THRESHOLD = 0.5 # change in questions per paper that we call a real move
for key, c in sorted(count.items()):
avg_early = sum(c[y] for y in earlier) / len(earlier)
avg_recent = sum(c[y] for y in recent) / len(recent)
change = avg_recent - avg_early
if change >= THRESHOLD:
label = "rising"
elif change <= -THRESHOLD:
label = "fading"
else:
label = "steady"
print(f"{key[0]} / {key[1]}: {avg_early:.1f} -> {avg_recent:.1f} ({label})")The threshold is a judgment call. With around 100 questions per paper, a move of half a question per paper is small and easily caused by chance. Raise the threshold to 1.0 if your labels flip around too much, and treat the labels as prompts for a closer look, not as conclusions.
How the workflow fits together
Common errors
Treating a count as a prediction. A topic that gave 3 questions last year is not "due" and is not "finished". Past counts describe what examiners chose before. They do not set a quota.
Reading trends from too few papers. Five or more papers give a usable picture. If you only have three, report counts and spread, and skip direction labels.
Ignoring topic size. A broad topic like "Indian history after 1857" will always outscore a narrow one like "Local self-government". Compare counts against how much material the topic holds. A narrow topic that yields two questions a year may give you more marks per hour of study.
Mixing papers from different patterns. If the number of questions, the syllabus or the marking rules changed between years, raw counts are not comparable. Compare shares of each paper's total instead, and keep a note of the change. Check the current official notification for the pattern that applies to your attempt.
Letting one year dominate. A year with a very unusual paper can inflate a topic. The spread column exposes this: a high total with a low spread is a warning sign.
Counting current-affairs-linked topics as static. A topic such as "Environment: climate policy" may spike because of news in the preceding year. Tag such questions with their source type, as covered in the tagging chapter, so you can see whether a spike came from news and not from the standing syllabus.
Interpreting the labels
| Label | Typical pattern | Reasonable response |
|---|---|---|
| Rising | Recent average clearly higher than earlier | Raise priority, and check whether the syllabus emphasis changed |
| Steady and frequent | Appears most years, similar count | Core topic, revise on a regular schedule |
| Steady and rare | Appears occasionally at a low count | Low priority, quick revision of basics only |
| Fading | Recent average lower | Reduce time, but keep a light pass |
| Sporadic | Present in few years, uneven counts | Cover basics, and do not chase it |
These responses feed into the study-plan chapter, where the labels are combined with difficulty and source type to set priorities.
Checklist before you trust a trend
- Every question has a topic from the fixed vocabulary.
- You hold at least five papers, and each was checked against its answer key.
- You counted both total questions and years of appearance.
- You compared like with like, using shares of the paper if the pattern changed.
- You looked at the zeros in the table, not only the positive counts.
- You marked any topic whose rise or fall rests on one or two questions as uncertain.
Exercise
A topic has these counts across seven papers, in order from oldest to newest: 0, 0, 1, 0, 3, 0, 0. The total is 4. Another topic has counts 1, 1, 0, 1, 1, 1, 0, with a total of 5. Which topic is more dependable to revise, and why? What should the first topic's label be?
Show answer
The second topic is more dependable. It appears in 5 of 7 papers, so its spread is high and it gives about one question in most papers. The first topic has a similar total but appears in only 2 of 7 papers, and most of its questions came from a single paper. Label the first topic sporadic, not rising, because the 3 in one year is a one-off cluster and the rest are zeros. Cover its basics and do not build your plan around it.
Exercise
In the direction-labelling script, you have 6 papers and set THRESHOLD to 0.5. A topic has counts 1, 0, 1, 2, 1, 2. Work out its label. Then explain why you might still hesitate to call it rising.
Show answer
The years split into three earlier papers (1, 0, 1) and three recent papers (2, 1, 2). The earlier average is 2/3, about 0.67. The recent average is 5/3, about 1.67. The change is 1.0, which is at least 0.5, so the label is rising. You might still hesitate because the whole change is one extra question in two or three papers. With so few data points, one different paper could erase it. Mark it as uncertain and check whether the syllabus gives a reason for more emphasis.
Exercise
Your topic table shows that "River systems" has a count of 9 over six papers, and "Soil types" has 3 over six papers. Name two checks you should make before concluding that river systems deserves three times the study time.
Show answer
First, compare the amount of material in each topic. River systems is a broad topic, so more questions are expected, and the marks per hour of study may be similar or even better for soil types. Second, look at spread and trend, not only the total. If the 9 questions are concentrated in one or two papers, or the topic is fading, the total overstates its reliability. Also confirm that the topic names were tagged consistently, so that no related questions were counted under a different label.