|
Download README.md from judicialmind/IndiaTables: direct link, hf CLI and curl.
- Browser
- Download file 13.3 kB
-
https://huggingface.co/datasets/judicialmind/IndiaTables/resolve/main/README.md
- Command line
-
hf download hf://datasets/judicialmind/IndiaTables/README.md
-
curl -L -H "Authorization: Bearer $HF_TOKEN" -o README.md https://huggingface.co/datasets/judicialmind/IndiaTables/resolve/main/README.md
13.3 kB
| license: cc-by-nc-sa-4.0 | |
| language: | |
| - en | |
| - hi | |
| pretty_name: IndiaTables | |
| size_categories: 100K<n<1M | |
| task_categories: | |
| - table-question-answering | |
| - text-retrieval | |
| tags: | |
| - india | |
| - open-government-data | |
| - data.gov.in | |
| - ndap | |
| - tables | |
| - parquet | |
| extra_gated_prompt: 'This dataset is released under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 licence | |
| (CC BY-NC-SA 4.0): research, academic, personal and other non-commercial use is permitted with attribution; adaptations | |
| must be shared under the same licence; commercial use is not permitted. The original public source data remains under the | |
| Government Open Data License - India (GODL-India). Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai.' | |
| extra_gated_fields: | |
| Name: text | |
| Email: text | |
| Organization: text | |
| I accept the CC BY-NC-SA licence terms (research and non-commercial use only): checkbox | |
| extra_gated_button_content: Accept and request access | |
| # IndiaTables | |
| <!-- jm:top --> | |
| Licence: CC BY-NC-SA 4.0 — research and non-commercial use only; derivatives must be shared under the same licence. Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai | |
| Access is approved automatically when the email you enter matches your Hugging Face account email and belongs to the organisation you name; other requests are reviewed manually. | |
| <!-- /jm:top --> | |
| 266,707 cleaned, typed tables from India's Open Government Data platform (data.gov.in) and NITI Aayog's | |
| National Data and Analytics Platform (NDAP), plus catalog metadata for 289,393 resources. Snapshot: May 2026. | |
| Total rows: 558,577,193. Every table is one Parquet file (packed in zip shards of 1,000 tables) with typed columns (numbers parsed from Indian digit | |
| grouping, lakh/crore and NA tokens; dates parsed day-first) and was screened for personal data before release. | |
| **The 266,707 tables are packed into 267 zip shards under `tables/`** (`tables/shard-00000.zip` ... about 1,000 | |
| Parquet tables each). `indiatables.py` in this repo loads one table by uuid (`load_table`) or streams a shard | |
| (`iter_tables`), downloading only the shards it needs. | |
| | Source | Tables | | |
| |---|---| | |
| | ndap | 6,589 | | |
| | ogd | 260,101 | | |
| | HMIS state reports (data.gov.in) | 17 | | |
| ## Quickstart | |
| Input: a keyword (or any filter on the catalog). Output: matching tables and a pandas DataFrame of one table. | |
| ```python | |
| import sys | |
| from pathlib import Path | |
| from huggingface_hub import hf_hub_download | |
| REPO = "judicialmind/IndiaTables" | |
| sys.path.insert(0, str(Path(hf_hub_download(REPO, "indiatables.py", repo_type="dataset")).parent)) | |
| from indiatables import IndiaTables | |
| it = IndiaTables() # downloads catalog.parquet; table shards are fetched on demand | |
| catalog = it.catalog | |
| tables = catalog[catalog.table_path != ""] | |
| print(len(catalog), "resources,", len(tables), "tables") | |
| hits = tables[tables.title.str.contains("rainfall", case=False) & (tables.level == "district")] | |
| print(hits[["uuid", "title", "n_rows"]].head(3).to_string(index=False)) | |
| row = hits.iloc[0] | |
| df = it.load_table(row.uuid) # reads <uuid>.parquet from its zip shard | |
| print(df.shape) | |
| print(row.attribution) | |
| ``` | |
| Expected output: `289393 resources, 266707 tables`, then | |
| **First 3 district-level tables matching "rainfall"** | |
| | Resource id | Title | Rows | | |
| |---|---|---:| | |
| | ndap-7319 | District-wise Rainfall Distribution | 1,246,210 | | |
| | 6c05cd1b-ed59-40c2-bc31-e314f39c6971 | Daily District-wise Rainfall Data | 1,990,000 | | |
| | ndap-7066 | Water Resources Information System (WRIS): Rainfall Data Monthly | 78,876 | | |
| and for the first hit the table shape `(1246210, 28)` and its attribution line: | |
| > Source: NITI Aayog, National Data and Analytics Platform (NDAP), dataset 7319: District-wise Rainfall Distribution. https://ndap.niti.gov.in/dataset/7319 | |
| SQL over the catalog with DuckDB: | |
| ```python | |
| import duckdb | |
| from huggingface_hub import hf_hub_download | |
| path = hf_hub_download("judicialmind/IndiaTables", "catalog.parquet", repo_type="dataset") | |
| print(duckdb.sql(f"""SELECT ministry, count(*) AS tables, sum(n_rows) AS rows | |
| FROM '{path}' WHERE table_path <> '' GROUP BY ministry ORDER BY tables DESC LIMIT 5""")) | |
| ``` | |
| Download one shard (about 1,000 tables) and stream its tables: | |
| ```python | |
| import sys | |
| from huggingface_hub import snapshot_download | |
| root = snapshot_download("judicialmind/IndiaTables", repo_type="dataset", | |
| allow_patterns=["catalog.parquet", "indiatables.py", "tables/shard-00000.zip"]) | |
| sys.path.insert(0, root) | |
| from indiatables import IndiaTables | |
| for uuid, df in IndiaTables(root).iter_tables(shard="tables/shard-00000.zip"): | |
| print(uuid, df.shape) | |
| break | |
| ``` | |
| Command line: `python indiatables.py <uuid> --root <local copy>` prints the table size and its first rows. | |
| ## Files | |
| | File | What | | |
| |---|---| | |
| | `catalog.parquet` | One row per resource (289,393), including the 514 metadata-only resources and the excluded ones | | |
| | `tables/shard-NNNNN.zip` | 267 zip shards of about 1,000 tables each; member `<uuid>.parquet` is one typed table (266,707 in total) | | |
| | `indiatables.py` | Loader: `IndiaTables(root=None).load_table(uuid)`, `iter_tables(shard=None)`, CLI | | |
| | `cards.parquet` | A text card per table: title, source, level, years, columns and three sample rows (`card`), plus a short form (`card_short`) | | |
| | `templates.parquet` | One row per column layout (`template_id`), with its family, signature, table count, example uuids and ministries | | |
| | `excluded.parquet` | Every resource left out of `tables/` and why | | |
| | `lgd/states.parquet`, `lgd/districts.parquet` | Local Government Directory (LGD) state and district codes with name aliases | | |
| | `lgd/district_crosswalk.parquet` | District names as written in the source tables mapped to LGD codes | | |
| ## Schema | |
| `catalog.parquet`: | |
| | Column | Type | Meaning | | |
| |---|---|---| | |
| | `uuid` | string | data.gov.in resource uuid, `ndap-<id>` or `hmis-state-<name>` | | |
| | `source` | string | `ogd`, `ndap` or `HMIS state reports (data.gov.in)` | | |
| | `src_kind` | string | Form of the source record (portal JSON, NDAP CSV, catalog entry only, ...) | | |
| | `title`, `desc`, `desc_is_title` | string, string, bool | Portal title and description; flag when the description repeats the title | | |
| | `org`, `ministry`, `org_type` | list, string, string | Publishing organisation path, top-level ministry, Central / State | | |
| | `sector` | list | Portal sectors | | |
| | `origin` | string | Portal of origin (data.gov.in, a state portal, ndap.niti.gov.in, ...) | | |
| | `catalog_uuid`, `target_index` | string | data.gov.in catalog the resource belongs to, portal API index | | |
| | `created`, `updated` | timestamp | Portal dates | | |
| | `total` | int | Row count reported by the portal API | | |
| | `n_rows`, `n_cols` | int | Rows and columns in the released table | | |
| | `truncated` | bool | Fewer rows than the API total (cut at the portal's paging limit) | | |
| | `empty`, `duplicated` | bool | No rows; paging duplicates in the source | | |
| | `template_id`, `template_family` | string | Exact column layout; family of layouts that differ only in years/months | | |
| | `level` | string | Geographic level: national, state, district, subdistrict, block, village, city, unknown | | |
| | `years` | list[int] | Years found in the table | | |
| | `has_pii`, `pii_reasons`, `pii_policy` | bool, list, string | Personal-data screen result and the policy applied | | |
| | `attribution` | string | GODL-India attribution: provider, title, resource URL, licence, snapshot | | |
| | `shard`, `table_path` | string | Zip shard holding the table and the member name inside it (`""` when there is no table) | | |
| | `src_bytes`, `size_class`, `big` | int, string, bool | Size of the source record | | |
| | `store_version` | int | Table format version | | |
| | `columns`, `col_types` | list | Column names and types (`integer`, `number`, `date`, `text`, ...) | | |
| | `state_col`, `district_col` | string | Columns holding the state / district name, when detected | | |
| | `in_snapshot` | bool | Present in the May 2026 snapshot | | |
| | `dropped_cols` | list | Columns removed by the personal-data screen | | |
| | `note` | string | Free-text note (e.g. NDAP indicator columns are unlabelled) | | |
| Each table (`<uuid>.parquet` inside its shard): the table's own columns with their original names, plus `_row` (original record | |
| order). The Parquet metadata key `ogd` holds JSON with the uuid, title and, per column, the portal's field id, | |
| name and type. | |
| `excluded.parquet`: `uuid`, `title`, `ministry`, `reason`, `detail`. | |
| ## Coverage | |
| All of data.gov.in's API-served resources and NDAP's datasets as of May 2026, national to village level. | |
| Geographic level: subdistrict 112,360, district 50,266, village 30,380, state 26,182, unknown 20,219, block 13,992, | |
| city 9,116, national 4,192. | |
| Metadata-only resources (in the portal catalog, no rows in the dump): 514. | |
| Tables with fewer rows than the portal's API total (`truncated`): 4,393. | |
| Excluded (see `excluded.parquet`): duplicate_uuid 7,257, aggregate_only 279, pii 1,035, parse_error 53, | |
| microdata 4, empty 20,857, excluded_source 1. | |
| NDAP indicator columns are named by code (`I<id>_<n>`). | |
| Top ministries: | |
| | Ministry | Tables | | |
| |---|---| | |
| | Ministry of Health and Family Welfare | 139,355 | | |
| | Rajya Sabha | 28,869 | | |
| | Ministry of Jal Shakti | 28,196 | | |
| | Ministry of Home Affairs | 28,152 | | |
| | Ministry of Education | 13,162 | | |
| | Department of Water Resources, River Development & Ganga Rejuvenation | 3,923 | | |
| | data.gov.in | 3,653 | | |
| | Department of Health and Family Welfare | 3,599 | | |
| | Ministry of Health and Family Welfare, Department of Health and Family Welfare | 2,596 | | |
| | Department of School Education and Literacy | 1,590 | | |
| | Ministry of Agriculture and Farmers Welfare | 1,327 | | |
| | Ministry of Statistics and Programme Implementation | 1,170 | | |
| | Ministry of Consumer Affairs, Food and Public Distribution | 718 | | |
| | Ministry of Environment, Forest and Climate Change | 673 | | |
| | Ministry of Road Transport and Highways | 645 | | |
| Tables were screened for personal data (contact details, ID numbers, person names, one-row-per-person | |
| microdata); such tables are listed in `excluded.parquet` and are not in `tables/`. Row-level registries (eShram, | |
| UDYAM, MCA masters) are not included. Rajya Sabha / Lok Sabha question text is removed. | |
| ## Source data | |
| Derived from 266,707 resources published on the Open Government Data Platform India (data.gov.in), snapshot May 2026, under the [Government Open Data License - India](https://data.gov.in/government-open-data-license-india). | |
| Per-resource attribution (provider, title, resource URL) is in the `attribution` column. | |
| GODL-India does not cover personal information; tables with personal fields were excluded (see the exclusion list). | |
| Providers: AP Markfed (Andhra Pradesh), Agra (Ministry of Housing and Urban Affairs), Agriculture Department, Karnataka (Karnataka), Agriculture Department, Meghalaya (Meghalaya), Agriculture and Farmer's welfare, Govt of Meghalaya, Ahmedabad (Ministry of Housing and Urban Affairs), Aizawl (Ministry of Housing and Urban Affairs), Aligarh (Ministry of Housing and Urban Affairs), Amravati (Ministry of Housing and Urban Affairs), Amravati Municipal Corporation (Maharashtra), Amritsar (Ministry of Housing and Urban Affairs), Animal Husbandary, Darirying and Fisheries Department, Tamil Nadu (Tamil Nadu), Animal Husbandry and Fisheries Department, Karnataka (Karnataka), Animal Husbandry and Veterinary Department, Govt of Meghalaya, Animal Husbandry, Dairy Development and Fisheries Department, Maharashtra (Maharashtra), Assam Society for Comprehensive Financial Management System(AS-CFMS) (Assam), Aurangabad (Ministry of Housing and Urban Affairs), Backward Classes Department, Karnataka (Karnataka), Backward Classes Welfare Directorate (Tamil Nadu), Backward class welfare, Govt of Karnataka, and 421 more. | |
| NDAP tables: NITI Aayog, National Data and Analytics Platform (https://ndap.niti.gov.in), used under its terms of use. | |
| <!-- jm:source --> | |
| Original data: published by the ministries, departments and State governments named per table in the `attribution` column on the Open Government Data Platform India ([data.gov.in](https://data.gov.in)) and, where marked, NITI Aayog's National Data and Analytics Platform ([NDAP](https://ndap.niti.gov.in)), under the [Government Open Data License - India](https://data.gov.in/government-open-data-license-india) (GODL-India). The original public data remains under GODL-India; the CC BY-NC-SA 4.0 licence of this repository covers JudicialMind's compilation, derived fields, annotations, benchmarks and models. | |
| <!-- /jm:source --> | |
| ## Citation | |
| ```bibtex | |
| @misc{judicialmind2026indiatables, | |
| title={IndiaTables: 266,707 cleaned tables from India's Open Government Data platform and NDAP}, | |
| author={JudicialMind}, | |
| year={2026}, | |
| publisher={Hugging Face}, | |
| howpublished={\url{https://huggingface.co/datasets/judicialmind/IndiaTables}} | |
| } | |
| ``` | |
| <!-- jm:license --> | |
| ## License | |
| [CC BY-NC-SA 4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/) (see `LICENSE`): research, academic, personal and other non-commercial use, with attribution to JudicialMind and to the original data publishers; adaptations must be shared under the same licence. Commercial use requires a separate licence. | |
| Commercial use: contact surya@judicialmind.ai or hello@judicialmind.ai. | |
| <!-- /jm:license --> | |