Thinking global, living local

How to use lok-rajya-sabha-qa: see which parties and ministries Parliament questions are about

October 29, 2026

A ledger of 59,381 Parliament questions from the 18th Lok Sabha and matching Rajya Sabha sessions, ranked by party, ministry and state, ready to query in DuckDB. This post shows aggregates only.

Open-Source Tools · How-To · Govt data & research ops

How to use lok-rajya-sabha-qa: see which parties and ministries Parliament questions are about

Skip to article content
Text Size

Revised · v1.0.0 · what changed

59,381questions (34,720 Lok Sabha + 24,661 Rajya Sabha)
56ministries in the ranking
22,881questions asked by BJP members, the most of any party
3,550questions to Health and Family Welfare, the most of any ministry

Code: github.com/herrrickshaw/lok-rajya-sabha-qa

Watch the walkthrough

Watch on YouTube: youtu.be/ZjVYwOQZ2to

Why it is useful

  • Who benefits: policy researchers, journalists, civic-tech teams and students who want to see which subjects and ministries draw parliamentary scrutiny.
  • What it replaces: searching the Lok Sabha and Rajya Sabha sites session by session and merging two different party and ministry naming systems.
  • Evidence from the run: the party table sums exactly to the 59,381 questions, and one SQL query ranks the ministries.
  • The repo also computes a 'lift' score for each party-and-ministry pair (how much more a party asks about a ministry than average), a quick way to see signature interests.

What it is for

The repo pulls every question since the 18th Lok Sabha convened in June 2024 from the public Parliament sources, matches each to the asking member's party and state, and aggregates by party, ministry, state and topic. It also compares scrutiny with what ministries publish through the Press Information Bureau.

This post shows aggregates only. It reports no individual MPs' records. Not political or legal advice; counts of questions say nothing about the merit of the questions.

Who it is for

  • Policy and government-affairs researchers
  • Journalists and civic-tech volunteers
  • Students of Indian parliamentary practice
Not for.
  • Judging a party or an MP on question counts alone; seat numbers and sitting time differ
  • Reading the answers; the data has questions and metadata, not the replies
  • Anything needing the question text from the Lok Sabha (only subject and ministry are in the data)

What you need

RequirementWhyHow to get it
git and a terminalTo clone the repoTerminal on macOS/Linux, WSL/Git Bash on Windows; or GitHub Codespaces
Python 3.10 or newerTo query the databasepython.org, or brew install python
duckdb Python packageTo read data/pq_ledger.duckdbpip install duckdb
API keys, accounts, licencesNone needed for the steps shownNothing to sign up for

Get the code and an AI assistant

You do not have to be a programmer. Get the repository, give it to an AI assistant, and ask in plain language. Any of these routes works:

ToolWhat you needBest for
GitHubFree account to fork or star; git to clone, or the green Code button, then Download ZIP, or open in CodespacesGetting the code and keeping up with updates
Claude CodeClaude subscription or API key; run claude inside the cloned folderLetting the AI read and run the whole repo
Gemini CLIGoogle account; run gemini inside the cloned folderThe same hands-on workflow with Gemini
Claude.ai, Gemini or ChatGPT in the browserA chat account; upload README.md and the files you care about (or paste the output of git ls-files)Understanding the project and asking questions without installing anything
Other tools (Copilot Chat, Cursor, Codex CLI)Open the cloned folder in the tool and point it at README.md firstEditing and extending the code
git clone https://github.com/herrrickshaw/lok-rajya-sabha-qa.git
cd lok-rajya-sabha-qa
claude      # or: gemini

Install

  1. Clone the repository (needs git)
    git clone https://github.com/herrrickshaw/lok-rajya-sabha-qa.git
    cd lok-rajya-sabha-qa
  2. Create a virtual environment and install DuckDB
    python3 -m venv .venv && source .venv/bin/activate && pip install duckdb

Quick start: commands and what you should see

Rank parties by questions asked

python3 - <<'E'
import duckdb
c=duckdb.connect('data/pq_ledger.duckdb',read_only=True)
for r in c.sql('select * from party_summary order by total_questions desc limit 6').fetchall(): print(r)
E

BJP 22,881, INC 11,184, DMK 3,537, AITC 2,544, SP 2,331, TDP 2,178, each with Lok Sabha and Rajya Sabha splits.

Rank ministries by questions received

python3 - <<'E'
import duckdb
c=duckdb.connect('data/pq_ledger.duckdb',read_only=True)
print(c.sql('select * from ministry_summary order by questions desc limit 6').fetchall())
E

Health and Family Welfare 3,550, Railways 2,900, Education 2,802, Agriculture and Farmers Welfare 2,754, Finance 2,253, Civil Aviation 2,129.

Sample outputs

Real output from a run on the date shown in the sources line; trimmed to fit.

Questions by party (table party_summary)

party  lok_sabha  rajya_sabha  total
BJP      11,755      11,126  22,881
INC       7,921       3,263  11,184
DMK       2,299       1,238   3,537
AITC      1,503       1,041   2,544
SP        1,959         372   2,331
TDP       1,830         348   2,178
(all parties: 34,720 + 24,661 = 59,381)

Raw counts. Parties with more members ask more questions.

Questions by ministry (table ministry_summary, 56 ministries)

HEALTH AND FAMILY WELFARE        3,550
RAILWAYS                         2,900
EDUCATION                        2,802
AGRICULTURE AND FARMERS WELFARE  2,754
FINANCE                          2,253
CIVIL AVIATION                   2,129

Ministry names are the repo's canonical forms.

Questions by state of the asking member (table state_summary)

Uttar Pradesh   6,514
Tamil Nadu      6,031
Maharashtra     5,703
Andhra Pradesh  4,072
Kerala          3,722

Counts by the asking member's state, not by the subject of the question.

Party-ministry lift (kg_party_ministry_lift, 100+ questions)

AITC  FINANCE                          166 qs  lift 1.72
BJP   COOPERATION                     459 qs  lift 1.63
SP    EDUCATION                        167 qs  lift 1.52
SP    AGRICULTURE AND FARMERS WELFARE  164 qs  lift 1.52
BJP   DEVELOPMENT OF NORTH EASTERN     102 qs  lift 1.50

Lift above 1 means the party asks about the ministry more than its overall share would suggest.

Ways to use it

MethodHow it works
SQLQuery data/pq_ledger.duckdb for the summary and knowledge-graph tables.
SpreadsheetOpen Lok_Rajya_Sabha_PQ_Analysis.xlsx.
DashboardOpen site/index.html in a browser for the charts.
Through an AI assistantOpen the folder in Claude Code or Gemini CLI and ask for rankings or cross-tabs; or upload README.md and the CSVs in data/processed to a chat assistant.

Sample prompts for your AI assistant

Copy, paste and edit the parts in [brackets].

  • Claude: Read README.md and query data/pq_ledger.duckdb to show the top five ministries for [party] by lift.
  • Gemini: Compare Lok Sabha and Rajya Sabha question counts for the ten largest parties and explain the differences.
  • ChatGPT: Here is a table of questions per ministry. Which ministries draw many questions but have few press releases?
  • GitHub (Copilot Chat or Codespaces): Write a DuckDB query that shows questions per state per ministry and exports it to CSV.
  • Claude: Explain the difference between starred and unstarred questions and why that matters when reading these counts.
  • Any assistant: Help me write a short, neutral summary of what these tables show, with caveats about interpreting question counts.

Limits and honest caveats

  • Question counts are not a measure of an MP's or a party's quality; they depend on seats, sessions attended and rules on notices.
  • Lok Sabha data holds subject and ministry only; the question text and every answer are in PDFs not fetched here. Rajya Sabha answers are null.
  • The sources are undocumented APIs; party and state names from the two houses were reconciled by alias tables and a table of unmatched members exists.
  • Some scripts need external inputs (a PIB index and the sibling yellow-pages repo's minister directory) that are not in the repo, so a full rebuild is not possible from a fresh clone.
  • I ran only SQL on the committed database; none of the build, comparison or network scripts were run.
  • The repo links to a minister directory; this post uses no personal data and shows no individual MPs.

Sources: Queried data/pq_ledger.duckdb of github.com/herrrickshaw/lok-rajya-sabha-qa (commit d2517ea) from a fresh clone in a throwaway virtualenv with duckdb on 19 October 2026. Aggregate tables only (party_summary, ministry_summary, state_summary, kg_party_ministry_lift). Underlying data: sansad.in and rsdoc.nic.in. Build scripts not run.

Revision history.
  • v1.0.0 — 30 October 2026 — first published.

About this article: Researched, written and edited by Umashankar Triplicane Dwarakanathan, with AI research assistance; every figure is meant to trace to the primary source cited. See the Editorial Policy for how sourcing, AI use and corrections work.

Umashankar Triplicane Dwarakanathan
Contact Us
Umashankar Triplicane Dwarakanathan
Investment Promotion & Energy-Sector Leader · Chennai, Tamil Nadu, India
LinkedIn → GitHub → Email +91 78273 81696
How this site works

Data-led analysis of India's trade, currency and industrial policy. Every article is built from primary official sources, and every figure links back to the release, table or filing it came from.

Sources. DGCI&S TradeStat (imports/exports, HSN-wise) · PIB (government press releases, January 2017 to today, refreshed daily) · RBI (circulars, balance of payments) · MoSPI (CPI/WPI, IIP) · PARIVESH (environmental clearances) · CCIL (bond yields) · BIS (policy rates) · SEBI, NSE/BSE and SEC filings for company data.

Interpretation. Figures carry their vintage and retrieval date; estimates and press-reported numbers are labelled as such; where sources disagree, both are shown. Corrections are made visibly, never silently. Articles are written with AI assistance from the cited sources — AI-generated text can misstate figures even when working from real material, so verify any number that matters to a decision against the linked primary source.

footer

Browse all articles by topic

Every piece on this blog, grouped. Or read the full index.

Agriculture & FertilisersAI ToolsChemicalsClimate & CarbonEnergy & FuelsGas & LNGImport SubstitutionIndustrial PolicyMarkets & FinanceMobility & EVPrices & InflationTextilesTrade & Tariffs

Each topic is a live archive page that updates itself as pieces are labelled. It replaces a hand-kept list that had fallen 18 articles behind.