Thinking global, living local

How to use india-trade-data-analysis: read India's trade, rupee and inflation data in one place

October 19, 2026

The descriptive half of a two-repo study of India's trade: what MoSPI, RBI and TRADESTAT data show about the trade deficit, imports by HS chapter, the rupee and inflation, with charts and JSON extracts you can open without installing anything.

Open-Source Tools · How-To · Policy analysis

How to use india-trade-data-analysis: read India's trade, rupee and inflation data in one place

Skip to article content
Text Size

Revised · v1.0.0 · what changed

US$ 776.0 bnmerchandise imports, FY2025-26
US$ 441.7 bnmerchandise exports, FY2025-26
+26.6% vs +4.7%five-year import vs export growth
81.5%share of imports in the top 12 HS chapters

Code: github.com/herrrickshaw/india-trade-data-analysis

Watch the walkthrough

Watch on YouTube: youtu.be/ZvdlH4DdWtA

Why it is useful

  • Who benefits: students, journalists and policy analysts who need a sourced, dated view of India's trade position without stitching together four agencies' sites.
  • What it replaces: manual downloads from TRADESTAT, RBI and MoSPI. The repo ships the extracts as JSON plus ready-made charts.
  • Evidence from our read: the five-year synthesis file shows imports up 26.58% against exports up 4.68% over FY2021-22 to FY2025-26.
  • It cross-checks itself: a validation file compares TRADESTAT totals with the Commerce Ministry TIA portal and notes a roughly 2% gap in exports.
  • Everything is in US$ million, which makes cross-source comparison simple.

What it is for

The repo records what the data show: CPI and WPI by state, GDP growth with revisions, forex reserves, the rupee, the goods and services balance, and imports and exports by HS chapter, from FY2018-19 to FY2025-26. A five-year synthesis re-cuts all threads to one window and a sample FY2025-26 report standardises units.

It is the data half of a split. The prescriptive recommendations live in india-trade-sector-policy-recommendations. This is economic analysis, not investment or legal advice.

Who it is for

  • Students and researchers studying India's external sector
  • Journalists verifying a trade or reserves figure against a dated source
  • Analysts who want JSON extracts for their own notebooks
Not for.
  • Real-time figures: the snapshot is dated 2026-07-18 and FY2025-26 is provisional
  • Investment, trading or legal decisions
  • Treating the policy commentary as official findings

What you need

RequirementWhyHow to get it
A web browseropens the charts and the GitHub Pages siteany modern browser
Python 3 (optional)to read the JSON filesstandard library json is enough
Not neededno key, GPU or database for reading the committed filesLive refresh needs the MoSPI connector and scraping cells, 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:

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/india-trade-data-analysis.git
cd india-trade-data-analysis
claude      # or: gemini

Install

  1. Get the code
    git clone https://github.com/herrrickshaw/india-trade-data-analysis.git
    cd india-trade-data-analysis
  2. Or just open the live site
    https://herrrickshaw.github.io/india-trade-data-analysis/

Quick start: commands and what you should see

Print the five-year import and export totals

python3 -c "import json;d=json.load(open('data/five_year_trade_currency_synthesis_2026-07-18.json'))['trade_totals_usd_million'];print(d['years']);print(d['export']);print(d['import']);print(d['export_growth_5yr_pct'],d['import_growth_5yr_pct'])"

Five fiscal years of exports and imports in US$ million, then 4.68 and 26.58 percent growth.

Sample outputs

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

Five-year trade totals (US$ million)

data/five_year_trade_currency_synthesis_2026-07-18.json
years:   2021-22   2022-23   2023-24   2024-25   2025-26
export:  422004.4  451070.0  437072.1  437704.5  441745.9
import:  613052.1  715968.9  678214.8  721200.3  776013.7
export growth 5yr: 4.68%   import growth 5yr: 26.58%

Read from the committed file; FY2025-26 is provisional.

Goods deficit versus services surplus (US$ billion)

goods_services_balance_usd_billion
years:         2021-22  2022-23  2023-24  2024-25
goods_balance: -191.0   -264.9   -241.1   -283.5
services_net:   107.6    143.6    162.8    188.9
overall:        -83.5   -121.3    -78.3    -94.6

The file states the services surplus covers about 87.9% of the extra goods gap.

Top import chapters by value, FY2025-26 (US$ million, growth since FY2018-19)

hsn_historical_trends_2018-19_to_2025-26.json
HS27 Mineral fuels & oils        203,415.4   +21.2%
HS71 Pearls, gems & jewellery    109,430.2   +69.1%
HS85 Electrical machinery        104,852.7  +101.5%
HS84 Machinery                    74,019.5   +68.8%
HS29 Organic chemicals            25,410.7   +13.5%
HS39 Plastics                     22,234.5   +45.8%

The top 12 import chapters together are 81.5% of imports.

Ways to use it

MethodHow it works
Browse the siteThe GitHub Pages site serves every chart with no build step.
Load the JSONEach data file states its purpose, source and retrieval date.
Read the sample reportreports/FY2025-26_sample_report.html restates the figures in US$ million with a consistency-check log.
Ask an AIClone it, or upload README.md and a JSON file, and ask in plain English.

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

  • Figures are a snapshot retrieved 2026-07-18; FY2025-26 is provisional on all sources.
  • The cross-validation file itself notes TRADESTAT and the TIA portal differ by about 2% on total exports, probably vintage or revision.
  • We read committed files only and did not re-pull MoSPI, RBI or TRADESTAT data or run the Colab notebook.
  • Policy commentary is the author's interpretation, not an official finding.
  • Economic analysis only, not investment or legal advice. Services trade runs one year behind goods.

Sources: Repo herrrickshaw/india-trade-data-analysis (README; data/five_year_trade_currency_synthesis_2026-07-18.json, trade_data_cross_validation_2026-07-18.json, hsn_historical_trends_2018-19_to_2025-26.json); underlying MoSPI, RBI and DGCI&S/TRADESTAT data as recorded by the repo. Files read 19 October 2026; nothing re-fetched.

Revision history.
  • 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.

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.