A table linking 82,593 petrol pumps to the City Gas Distribution (CGD) area and company authorised in their district, with an offline interactive map. Tests pass and the headline numbers reproduce.
Open-Source Tools · How-To · Energy & fuels models
How to use cng-cgd-retail-outlet-mapping: find which gas distributor is authorised to supply CNG to each petrol pump
Revised
· v1.0.0 · what changed
Code: github.com/herrrickshaw/cng-cgd-retail-outlet-mapping
Watch the walkthrough
Watch on YouTube: youtu.be/G50sN8U0pJA
Why it is useful
- Who benefits: CNG and EV-charging developers, gas-distribution companies, consultants and regulators-watchers who need to know who may supply CNG at a given pump.
- What it replaces: reading the regulator's state-by-state PDF list and matching districts to pumps by hand.
- Evidence from the run: 17 of 17 tests pass; the linkage table shows 82,261 outlets in an authorised area, 305 in districts with no authorised company and 27 outside the district map.
- The per-state view is instantly useful: Gujarat has 23.9% of its outlets already CNG-equipped, Haryana 22.1%, against about 10% in West Bengal, Karnataka and Rajasthan.
What it is for
The repo parses the regulator PNGRB's list of authorised City Gas Distribution geographical areas (309 areas, 58 companies), assigns each petrol pump to a district by point-in-polygon, and publishes the result as a table plus a self-contained map webpage.
Authorisation is not the same as a built pipeline: an outlet inside an authorised area can be supplied by the authorised company, but the list does not say how far its steel network has reached.
Indicative planning data, not legal advice or an official registry.
Who it is for
- CNG and EV-charging site planners
- Energy consultants and analysts
- Students of India's gas-distribution regulation
- Legal conclusions about who holds a licence in a specific place (check the regulator)
- Assuming pipeline gas is available; the data is about authorisation only
- Latest bidding rounds; the committed list runs through round 12A and was a 22 Jul 2026 snapshot
What you need
| Requirement | Why | How to get it |
|---|---|---|
| git and a terminal | To clone the repo | Terminal on macOS/Linux, WSL/Git Bash on Windows; or GitHub Codespaces |
| Python 3.10 or newer | To run the tests and analysis | python.org, or brew install python |
| Python packages: requests, pdfplumber, shapely, pytest | Needed by the pipeline scripts and tests | pip install -r requirements-dev.txt |
| A web browser | To open the offline map | Any modern browser |
| API keys, accounts, licences | None needed for the steps shown | Nothing 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:
| 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/cng-cgd-retail-outlet-mapping.git
cd cng-cgd-retail-outlet-mapping
claude # or: gemini
Install
- Clone the repository (needs git)
git clone https://github.com/herrrickshaw/cng-cgd-retail-outlet-mapping.git cd cng-cgd-retail-outlet-mapping - Create a virtual environment
python3 -m venv .venv && source .venv/bin/activate - Install the dependencies
pip install -r requirements-dev.txt
Quick start: commands and what you should see
Run the tests
pytest -q
17 passed in under a second. The tests use small fixtures and do not touch the network.
Summarise the linkage table
python3 - <<'E'
import csv,gzip,collections
rows=list(csv.DictReader(gzip.open('data/outlets_cgd.csv.gz','rt')))
print(len(rows));print(collections.Counter(r['cgd_status'] for r in rows))
print(sum(r['has_cng']=='True' for r in rows))
E
82593 outlets; CGD GA authorised 82,261, no authorised CGD GA 305, outside district map 27; 11198 with CNG.
Open the map
open webapp/cgd_ga_map.html
A self-contained map in your browser (on Linux use xdg-open). Not opened in this run; I only read the data.
Sample outputs
Real output from a run on the date shown in the sources line; trimmed to fit.
Link status of all outlets (data/outlets_cgd.csv.gz)
82593 outlets
CGD GA authorised 82,261
no authorised CGD GA 305
outside district map 27
CNG-equipped (has_cng) 11,198
The README says 11,194 CNG-equipped; the file I read has 11,198. A four-outlet difference, probably from a later edit of the table.
CNG share of outlets by state (states with 1,000+ outlets)
state outlets cng cng share
Gujarat 6,325 1,510 23.9%
Haryana 3,160 699 22.1%
Uttar Pradesh 9,814 1,612 16.4%
Maharashtra 8,270 1,276 15.4%
...
West Bengal 2,596 251 9.7%
Karnataka 5,954 584 9.8%
Andhra Pradesh 4,040 399 9.9%
Rajasthan 6,369 635 10.0%
Derived by me from outlets_cgd.csv.gz; this table is not in the repo. Outlets are counted by their state field.
Which companies are authorised to supply the most CNG-equipped outlets
Indian Oil Corporation Limited 846
Adani Total Gas Limited 808
Bharat Petroleum Corp. Ltd 800
Gujarat Gas Limited 798
GAIL Gas Limited 622
Indian Oil-Adani Gas Pvt Ltd 605
Counts outlets already carrying CNG that fall in each company's authorised areas, not market share. Where two companies' areas overlap an outlet is assigned to the first-listed one.
Ways to use it
| Method | How it works |
|---|---|
| Open the map | webapp/cgd_ga_map.html works offline: colour by company, filter to CNG-only or by oil company, search the table. |
| Python / pandas | Load data/outlets_cgd.csv.gz and group by cgd_entity, state or district. |
| Re-run the pipeline | Follow the six scripts in the README (parse, normalise, join, crawl, join outlets, build html); some need extra inputs. |
| Through an AI assistant | Open the folder in Claude Code or Gemini CLI and ask for a state or company view; or upload README.md and a sample of the CSV to a chat assistant. |
Sample prompts for your AI assistant
Copy, paste and edit the parts in [brackets].
- Claude: Read README.md and data/outlets_cgd.csv.gz, then list the 305 outlets' districts that have no authorised gas company and group them by state.
- Gemini: Which companies are authorised in the most districts in data/cgd_ga_allotment.csv? Show the top ten.
- ChatGPT: Explain in plain English the difference between a gas area being authorised and a pipeline reaching an outlet.
- GitHub (Copilot Chat or Codespaces): Write a script that counts non-CNG outlets per authorised company, to find sites where adding CNG would be easiest.
- Claude: Walk through the PNGRB PDF quirks the README lists and show where each is handled in join_final.py.
- Any assistant: Help me design a shortlist of districts for new CNG dispensers using this table.
Limits and honest caveats
- Authorisation, not pipeline reach, and not licence status; verify with the regulator before acting.
- Snapshot of 22 Jul 2026; the SSRI source has since grown to 107,380 raw records and newer PNGRB bidding rounds are not included.
- The pipeline cannot be fully rerun from a fresh clone: join_final.py needs a 47 MB district geojson that is not committed, and parse_ga.py expects the regulator PDF, which the public repo has replaced with a markdown extract. I ran only the tests and read the committed outputs.
- Chhota Udaipur and several districts are left unassigned rather than guessed; 45 districts fall under more than one area and the map colours the first-listed company.
- Counts differ slightly from the README (11,198 vs 11,194 CNG outlets).
- The raw outlet source contains duplicate rows; the repo removes them before linking.
Sources: Cloned github.com/herrrickshaw/cng-cgd-retail-outlet-mapping (commit 141108a) into a throwaway virtualenv on 19 October 2026, installed requirements-dev.txt, ran pytest (17 passed), and read data/outlets_cgd.csv.gz and data/cgd_ga_allotment.csv with the Python standard library. Pipeline scripts, map and network crawl not run.
- 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.