[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-82317":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":14,"stars7d":16,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":12,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":9,"updatedAt":24,"readmeContent":25,"aiSummary":26,"trendingCount":15,"starSnapshotCount":15,"syncStatus":27,"lastSyncTime":28,"discoverSource":29},82317,"geodata","urbanmorph\u002Fgeodata","urbanmorph","Lightweight open-source visualiser for India admin boundaries — pick a layer, view, download parquet",null,"TypeScript",36,3,23,1,0,7,10,48.31,"Other",false,"main",true,[],"2026-06-12 04:01:37","# bharatlas\n\n[![ci](https:\u002F\u002Fgithub.com\u002Furbanmorph\u002Fgeodata\u002Factions\u002Fworkflows\u002Fci.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Furbanmorph\u002Fgeodata\u002Factions\u002Fworkflows\u002Fci.yml)\n[![license: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](.\u002FLICENSE)\n[![v1.0](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Frelease-v1.0-brightgreen.svg)](https:\u002F\u002Fgithub.com\u002Furbanmorph\u002Fgeodata\u002Freleases)\n[![uptime](https:\u002F\u002Fimg.shields.io\u002Fwebsite?url=https%3A%2F%2Fbharatlas.com&label=bharatlas.com)](https:\u002F\u002Fbharatlas.com)\n[![Lighthouse: 98+](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLighthouse-98%2B-brightgreen?logo=lighthouse)](https:\u002F\u002Fpagespeed.web.dev\u002Fanalysis?url=https%3A%2F%2Fbharatlas.com)\n[![npm](https:\u002F\u002Fimg.shields.io\u002Fnpm\u002Fv\u002Fbharatlas-mcp?label=MCP&color=indigo)](https:\u002F\u002Fnpmjs.com\u002Fpackage\u002Fbharatlas-mcp)\n\nA visual catalog, REST API, MCP server, drag-drop verifier, and anonymous contribution flow for India's geo data. Admin boundaries from state to village, plus community-submitted layers under open licences.\n\n**Live**: https:\u002F\u002Fbharatlas.com\n\n```\ncatalog               → India national boundary (LGD-dissolved)\n                        + state · district · subdistrict · block · village (LGD)\n                        + cross-source alternates (SOI · Bhuvan · geoBoundaries\n                        · PMGSY per level — click \"also: ...\" on any card)\n                        + city wards across Indian cities\n                        + electoral constituencies, wildlife, eco-zones\n                        + 63k pincode polygons (bharatviz)\ndownload              → whole layer as Parquet · PMTiles · GeoJSON · KML ·\n                        Shapefile, direct from the card\nfilter & slice        → dynamic facets \u002F range \u002F typeahead search per\n                        layer schema; export the slice in any format above\npreview               → drop GeoJSON · KML · KMZ · GPX · TCX · Parquet →\n                        render + validate → optional Publish\nview (\u002Fview\u002F\u003Cid>)     → curated layer with per-layer OG card\nview (\u002Fc\u002F\u003Cid>)        → community submission, edge-rendered HTML, 👍 useful\n                        vote, per-submission OG card\nembed                 → \u002Fembed\u002F\u003Cid> iframe + PNG export from any map\nAPI (\u002Fapi\u002Fv1)         → REST API: list, query, filter, group_by any layer;\n                        locate (point-in-polygon across all layers);\n                        nearby (tile-based spatial proximity)\nMCP (npx bharatlas-mcp) → 8 tools for LLMs: list, schema, query, locate,\n                        nearby, categories, submissions, downloads\n```\n\n## What's in this repo\n\n| Path | Contents |\n|---|---|\n| `web\u002F` | Vanilla TypeScript + Vite viewer + Cloudflare Pages Functions (`web\u002Ffunctions\u002F`). |\n| `web\u002Fmigrations\u002F` | D1 SQL migrations: submissions, tokens, ratings, votes, originals. |\n| `web\u002Ftests\u002F` | vitest unit tests for pure functions (validators, tokens, view rendering, votes). |\n| `scripts\u002Ffetch.sh` | Pulls parquets + PMTiles from [yashveeeeeeer\u002Findia-geodata](https:\u002F\u002Fgithub.com\u002Fyashveeeeeeer\u002Findia-geodata) releases. |\n| `scripts\u002Fextract_per_state.py` | Slices pan-India parquets into per-state GeoJSON via DuckDB-spatial. |\n| `scripts\u002Fbake_whole_layer.py` | Bakes whole-layer GeoJSON \u002F KML \u002F Shapefile per curated layer (parquet ≤ 100 MB). |\n| `scripts\u002Fupload_r2.sh` | Mirrors `sources\u002F` + `data\u002F` to Cloudflare R2 via wrangler. |\n| `scripts\u002Fupload_baked.py` | Pushes `data\u002Fbaked\u002F*` to R2 via boto3 (S3-compat fallback when wrangler is unavailable). |\n| `scripts\u002Fadmin\u002Fcleanup_submission.sh` | Delete community submissions by name pattern (R2 + D1). |\n| `mcp\u002F` | MCP server for LLMs ([npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fbharatlas-mcp)). 8 tools: list, schema, query, locate, nearby, categories, submissions, downloads. |\n| `catalog.json` | Curated-layer index used by the viewer. Single source of truth. |\n| [\u002Fabout#caveats](https:\u002F\u002Fbharatlas.com\u002Fabout#caveats) | Data caveats (cross-source drift, coverage gaps, precision). |\n\nLarge data files (`sources\u002F`, `data\u002F`) are not in git — they live in R2. See `scripts\u002Ffetch.sh` to rebuild locally.\n\n## Stack\n\n| Layer | Tech |\n|---|---|\n| Frontend | Vanilla TypeScript, Vite, MapLibre GL JS, PMTiles, DuckDB-WASM (lazy) |\n| Static hosting | Cloudflare Pages |\n| Edge functions | Cloudflare Pages Functions (`web\u002Ffunctions\u002F`) — REST API v1, submit, vote, sitemap, edge-rendered `\u002Fc\u002F\u003Cid>` |\n| Parquet query | [hyparquet](https:\u002F\u002Fgithub.com\u002Fhyparam\u002Fhyparquet) (pure JS, runtime reads from R2) |\n| Spatial query | PMTiles tile reads + MVT decode + ray-casting PIP \u002F Haversine proximity |\n| MCP server | [`bharatlas-mcp`](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fbharatlas-mcp) — 8 tools for Claude, GPT, Gemini, Cursor, etc. |\n| Storage | Cloudflare R2 (open data, no egress) |\n| Submissions DB | Cloudflare D1 (SQLite at the edge) |\n| Anti-abuse | Cloudflare Turnstile + per-IP rate limits |\n| CI\u002FCD | GitHub Actions — tests + build + auto-deploy on push to `main` |\n\n## Develop\n\n```bash\n# clone + viewer-only dev (no submissions, no D1)\ngit clone git@github.com:urbanmorph\u002Fgeodata.git\ncd geodata\u002Fweb\nnpm install\nnpm run dev    # http:\u002F\u002Flocalhost:5173\nnpm test\n```\n\nFor the full submission flow (D1 + R2 + Turnstile + Pages Functions), see [docs\u002Ffull-dev.md](.\u002Fdocs\u002Ffull-dev.md) (TODO) or read `wrangler.toml` + `.dev.vars.example`.\n\n## Contributing\n\n1. Branch off `main`: `git checkout -b feat\u002Fshort-name`\n2. Write a test first if you're adding logic to `web\u002Ffunctions\u002Flib\u002F*`. Pure functions are tested via vitest in `web\u002Ftests\u002F`.\n3. Make sure `npm test` and `npm run build` both pass.\n4. Open a PR against `main`. CI runs tests + build automatically.\n5. The maintainer reviews and merges. Merge to main = auto-deploy.\n\nCommit messages: short subject, body explains *why* not *what*. Examples in `git log`.\n\n## Changelog\n\nSee [releases](https:\u002F\u002Fgithub.com\u002Furbanmorph\u002Fgeodata\u002Freleases) and [merged PRs](https:\u002F\u002Fgithub.com\u002Furbanmorph\u002Fgeodata\u002Fpulls?q=is%3Amerged).\n\n## Security\n\nReport vulnerabilities to **sathya@urbanmorph.com** instead of opening a public issue. Acknowledgement within 72 hours.\n\n## Licence\n\nCode: [MIT](.\u002FLICENSE). Data: each layer carries its own open licence — see the per-card line on the [catalog](https:\u002F\u002Fbharatlas.com\u002F). Curated data is sourced under CC0-1.0 \u002F CC-BY-4.0 \u002F GODL-India depending on provider.\n\n## Use of data\n\nProvided as-is, no warranty. For legal\u002Fadministrative use, go to the upstream source. Full disclaimers: [\u002Fabout → Use of data](https:\u002F\u002Fbharatlas.com\u002Fabout#use-of-data).\n\n## Credits\n\nData sources, in approximate order of catalog footprint:\n\n- [LGD](https:\u002F\u002Flgdirectory.gov.in\u002F) — Local Government Directory; the authoritative admin code chain (state → village).\n- [SOI](https:\u002F\u002Fsurveyofindia.gov.in\u002F) — Survey of India; admin alternatives.\n- [Bhuvan](https:\u002F\u002Fbhuvan.nrsc.gov.in\u002F) — NRSC\u002FISRO Bhuvan; admin alternatives, eco-sensitive zones.\n- [OpenCity](https:\u002F\u002Fdata.opencity.in\u002F) \u002F [Oorvani Foundation](https:\u002F\u002Foorvanifoundation.org\u002F) — city-scale layers (ward \u002F corporation \u002F jurisdiction polygons for 20+ cities).\n- [DataMeet](https:\u002F\u002Fgithub.com\u002Fdatameet\u002FMunicipal_Spatial_Data) — community-curated municipal spatial data (ward boundaries for multiple cities).\n- [datta07\u002FINDIAN-SHAPEFILES](https:\u002F\u002Fgithub.com\u002Fdatta07\u002FINDIAN-SHAPEFILES) — metropolitan city ward shapefiles.\n- [ramSeraph\u002Findianopenmaps](https:\u002F\u002Fgithub.com\u002FramSeraph\u002Findianopenmaps) — selectively republished layers (WRIS waterbodies, SLUSI watersheds + soil, VEDAS power infrastructure, PMGSY roads + habitations).\n- [PMGSY](https:\u002F\u002Fomms.nic.in\u002F) — Pradhan Mantri Gram Sadak Yojana; rural blocks + roads.\n- [PM GatiShakti](https:\u002F\u002Fgis.pmgatishakti.gov.in\u002F) — wildlife sanctuaries + national parks.\n- [Bharatmaps](https:\u002F\u002Fbharatmaps.gov.in\u002F) (NIC) — eco-sensitive zones.\n- [bharatviz](https:\u002F\u002Fbharatviz.org\u002F) (Saket Choudhary, MIT) — India Post pincode boundary polygons (simplified).\n- [geoBoundaries](https:\u002F\u002Fwww.geoboundaries.org\u002F) — independent cross-check.\n- [data.gov.in](https:\u002F\u002Fdata.gov.in\u002F) — additional government open data.\n\nPipelines + patterns:\n\n- [yashveeeeeeer\u002Findia-geodata](https:\u002F\u002Fgithub.com\u002Fyashveeeeeeer\u002Findia-geodata) — upstream Parquet + PMTiles re-publisher for LGD, SOI, Bhuvan, PMGSY, GatiShakti, Bharatmaps, CWC, NIC-Health and the India Flood Inventory.\n- [ramSeraph](https:\u002F\u002Fgithub.com\u002FramSeraph) — architectural guidance on geoparquet for spatial queries ([issue #100](https:\u002F\u002Fgithub.com\u002Furbanmorph\u002Fgeodata\u002Fissues\u002F100)). Hilbert sort + flat bbox cols + density-aware row groups in our \u002Fapi\u002Fv1\u002Fnearby came directly from this review.\n- [mdshare](https:\u002F\u002Fmdshare.dev\u002F) — the anonymous-token contribution pattern lineage.\n\nBuilt by [Urban Morph](https:\u002F\u002Furbanmorph.com) · [Sathya Sankaran](https:\u002F\u002Fwww.sathyasankaran.com). Drop a ⭐ if you find it useful.\n\n**Status:** v1.0. Curated layers, community submissions, REST API, MCP server ( [npm](https:\u002F\u002Fwww.npmjs.com\u002Fpackage\u002Fbharatlas-mcp)), dynamic filters with typeahead, whole-layer downloads in 5 formats. API docs at [\u002Fdocs](https:\u002F\u002Fbharatlas.com\u002Fdocs), MCP setup at [\u002Fmcp](https:\u002F\u002Fbharatlas.com\u002Fmcp). Community submissions are permanent under the open licence the contributor selected.\n","urbanmorph\u002Fgeodata 是一个轻量级开源可视化工具，用于展示印度的行政区划边界。用户可以选择不同的图层查看，并下载为Parquet格式。该项目采用TypeScript编写，提供了一个可视化的目录、REST API、MCP服务器、拖放验证器以及匿名贡献流程，支持从国家到村庄级别的行政边界数据，还包括社区提交的开放许可图层。它适用于需要快速访问和使用印度地理数据的场景，如城市规划、环境研究等。此外，项目还提供了丰富的功能，如动态筛选、预览、嵌入地图等，便于用户根据需求灵活操作和分享地理信息。",2,"2026-06-11 04:08:23","CREATED_QUERY"]