A frozen, public copy of an analysis of India's official statistics (CPI, WPI, IIP, GDP, RBI forex, trade): 14 interactive charts and 20 JSON datasets you can read with nothing but a browser. New work has moved to two successor repos.
Open-Source Tools · How-To · Policy analysis
How to use mospi-dataset-analysis-public: browse India's official MoSPI data snapshot
Revised
· v1.0.0 · what changed
Code: github.com/herrrickshaw/mospi-dataset-analysis-public
Watch the walkthrough
Watch on YouTube: youtu.be/9H9iH_H0cyk
Why it is useful
- Who benefits: students, journalists and policy analysts who want India's headline macro numbers in one tidy, sourced place.
- What it replaces: querying several ministry sites by hand. Each JSON file is a ready-to-load extract with its source and retrieval date.
- Evidence from our read of the committed files: the snapshot lists CPI, IIP, WPI and RBI forex series with the pull date (2026-07-18), and records which connector calls failed or lagged.
- It logs its own data problems (for example the NAS indicator call returned an upstream 500), which is useful for judging how far to trust it.
- Status: legacy. The README says the repo was split and kept for history; use the two successors for new work.
What it is for
The repo is a chronological notebook of questions asked of India's MoSPI data connector (api.mospi.gov.in) and related sources: inflation by state, rupee and reserves, trade balance by HS chapter, import-dependency gaps, and policy coverage. The README lists the 25 MoSPI datasets and the workflow used to pull them.
Charts are static HTML files; data files are JSON. A Colab notebook loads them live. This is policy and economic analysis, not investment or legal advice.
Who it is for
- Students and researchers wanting a worked example of using India's official statistics
- Journalists checking a headline inflation or reserves number against a dated source
- Developers who want JSON extracts of CPI, WPI, IIP and RBI series
- Anything needing current figures: the snapshot is dated 2026-07-18 and the RBI reserves series stops at June 2025
- Investment or legal decisions
- Active development: new sections go into the two successor repos
What you need
| Requirement | Why | How to get it |
|---|---|---|
| A web browser | opens the HTML charts | any modern browser |
| Python 3 (optional) | to load the JSON files | python.org; only the standard json module is needed |
| Not needed | no key, GPU or database to read the committed files | Re-pulling live data needs the MoSPI connector, which we did not run |
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:
| Tool | What you need | Best for |
|---|---|---|
| GitHub | Free account to fork or star; git to clone, or the green Code button, then Download ZIP, or open in Codespaces | Getting the code and keeping up with updates |
| Claude Code | Claude subscription or API key; run claude inside the cloned folder | Letting the AI read and run the whole repo |
| Gemini CLI | Google account; run gemini inside the cloned folder | The same hands-on workflow with Gemini |
| Claude.ai, Gemini or ChatGPT in the browser | A 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 first | Editing and extending the code |
git clone https://github.com/herrrickshaw/mospi-dataset-analysis-public.git
cd mospi-dataset-analysis-public
claude # or: gemini
Install
- Get the code
git clone https://github.com/herrrickshaw/mospi-dataset-analysis-public.git cd mospi-dataset-analysis-public - Open a chart
open charts/gdp_growth_trend.html # macOS; or double-click the file
Quick start: commands and what you should see
Read the dated snapshot with Python
python3 -c "import json;d=json.load(open('data/mospi_snapshot_2026-07-18.json'));print(d['cpi']['latest_month'],d['cpi']['general_index'])"
Prints June 2026 and the Rural, Urban and Combined CPI index and year-on-year inflation, as in the sample output.
Sample outputs
Real output from a run on the date shown in the sources line; trimmed to fit.
CPI headline from the committed snapshot
python3 -c "...print(d['cpi']['latest_month'],d['cpi']['general_index'])"
June 2026 [{'sector': 'Rural', 'index': 107.24, 'inflation_yoy_pct': 4.74},
{'sector': 'Urban', 'index': 106.69, 'inflation_yoy_pct': 3.92},
{'sector': 'Combined', 'index': 107.0, 'inflation_yoy_pct': 4.38}]
CPI base year 2024, All India, as recorded in the snapshot (fetched 2026-07-18).
The snapshot's own connector health log
d['connector_health']
list_datasets: ok
get_indicators_NAS: upstream 500 from api.mospi.gov.in, fell back to bundled local indicator definitions
get_data_CPI: ok
get_data_IIP: ok (required explicit type=General param)
get_data_WPI: ok
get_data_RBI_forex: ok, but data lagged to June 2025 despite requesting 2025,2026
Honest provenance: the author recorded what failed.
RBI forex reserves in the snapshot (US$ million)
d['rbi_forex_reserves']['series']
2025 January 630,607.39
...
2025 June 698,117.77 (6 monthly points)
Six points, January to June 2025, so it is not current.
Ways to use it
| Method | How it works |
|---|---|
| Browse charts | Open any file in charts/ in a browser, for example the CPI heatmap, GDP growth or forex reserves. |
| Load JSON | Every data/*.json has a purpose, source and retrieval date near the top. |
| Colab notebook | notebooks/mospi_live_reference.ipynb loads the data from GitHub; we did not run it. |
| Go to the successors | india-trade-data-analysis (descriptive) and india-trade-sector-policy-recommendations (prescriptive) carry the maintained versions. |
Sample prompts for your AI assistant
Copy, paste and edit the parts in [brackets].
- Read README.md in this repository and explain in plain English what it contains and how the files relate to each other.
- Open the main data file and summarise the three most important findings with the exact numbers and the file they come from.
- List every caveat or data-quality warning the author documents, and tell me which ones affect the figures I plan to quote.
- Show me how to load one of the JSON files in Python (or Excel) and make a simple table of the top 10 rows by value.
- Explain how I would update this analysis with newer official data, and what I would need to re-check by hand.
Limits and honest caveats
- This is a legacy snapshot. The README says it is kept for history and that new work happens in the two successor repos.
- Figures are as of 2026-07-18; the RBI reserves series ends at June 2025 and the NAS call fell back to local definitions.
- We read committed files only. We did not re-pull any MoSPI data or run the notebook.
- Some charts and sections interpret policy; treat those as the author's analysis, not official findings.
- Policy and economic analysis only, not investment or legal advice.
Sources: Repo herrrickshaw/mospi-dataset-analysis-public (README, data/mospi_snapshot_2026-07-18.json, chart and data file listing); MoSPI/RBI data as recorded by the repo. Files read 19 October 2026; nothing re-fetched.
- v1.0.0 — 3 November 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.