# STEP 10 — Region & 84 Kos Data Audit

**Status:** Audit only — **no data changed, no migration, no structural change.**  
**HEAD:** `e2d0b08` (STEP 09)  
**Database inspected:** `dham_seva_db` (development). Tests run only on `dham_seva_test`; database safety guard retained.

---

## 1. Current hierarchy and actual relationship counts

### Regions table (6 rows)

| id | slug | name | parent | status | active | sort | place_count (direct) | descendant place ids |
|----|------|------|--------|--------|--------|------|----------------------|----------------------|
| 16 | braj-84-kos | Braj – 84 Kos | (root) | published | true | 0 | 0 | 118, 120, 123, 124, 125 |
| 17 | vrindavan-region | Vrindavan Region | Braj – 84 Kos | published | true | 1 | 1 | 123 |
| 18 | mathura-region | Mathura Region | Braj – 84 Kos | published | true | 2 | 1 | 124 |
| 19 | govardhan-region | Govardhan Region | Braj – 84 Kos | published | true | 3 | 1 | 125 |
| 20 | barsana-region | Barsana Region | Braj – 84 Kos | published | true | 4 | 1 | 118 |
| 21 | gokul-region | Gokul Region | Braj – 84 Kos | published | true | 5 | 1 | 120 |

- **Root:** `Braj – 84 Kos` (no parent).
- **Children:** exactly 5 area regions, each the parent of exactly ONE place (a 1:1 town↔region mapping).
- `descendant_place_ids` on the root = the 5 region-linked towns only.

### place_region pivot (5 rows)

| place_id | place | region_id | region |
|----------|-------|-----------|--------|
| 118 | Barsana | 20 | Barsana Region |
| 120 | Gokul | 21 | Gokul Region |
| 123 | Vrindavan | 17 | Vrindavan Region |
| 124 | Mathura | 18 | Mathura Region |
| 125 | Govardhan | 19 | Govardhan Region |

### Places (6 rows) — all published + active, all `verification_status = pending`

| id | slug | name | latitude | longitude | regions | verification_status |
|----|------|------|----------|-----------|---------|---------------------|
| 118 | barsana | Barsana | 27.6511 | 77.3803 | 1 | pending |
| 120 | gokul | Gokul | 27.4521 | 77.7236 | 1 | pending |
| 125 | govardhan | Govardhan | 27.5011 | 77.4689 | 1 | pending |
| 124 | mathura | Mathura | 27.4924 | 77.6737 | 1 | pending |
| 119 | nandgaon | Nandgaon | 27.72 | 77.38 | **0** | pending |
| 123 | vrindavan | Vrindavan | 27.5806 | 77.7006 | 1 | pending |

- 5 places have coordinates and one region link each.
- **Nandgaon (id 119)** has coordinates (added in STEP 08 from Wikipedia) but **zero region links.**

### Place Entities (13 rows) — all published + active, all `verification_status = pending`

| id | slug | name | type | place (town) | own coords |
|----|------|------|------|--------------|------------|
| 33 | banke-bihari-temple | Banke Bihari Temple | temple | Vrindavan | yes |
| 35 | dwarkadhish-temple | Dwarkadhish Temple | temple | Mathura | yes |
| 45 | governor-hill | Govardhan Hill | heritage | Govardhan | yes |
| 36 | iskcon-temple-vrindavan | ISKCON Temple Vrindavan | temple | Vrindavan | yes |
| 34 | krishna-janmabhoomi | Krishna Janmabhoomi | temple | Mathura | yes |
| 42 | kusum-sarovar | Kusum Sarovar | kund | Govardhan | yes |
| 43 | nidhivan | Nidhivan | van | Vrindavan | yes |
| 37 | prem-mandir | Prem Mandir | temple | Vrindavan | yes |
| 40 | radha-kund | Radha Kund | kund | Govardhan | yes |
| 38 | radha-raman-temple | Radha Raman Temple | temple | Vrindavan | yes |
| 44 | seva-kunj | Seva Kunj | van | Vrindavan | **no (NULL)** |
| 41 | shyam-kund | Shyam Kund | kund | Govardhan | **no (NULL)** |
| 39 | vishram-ghat | Vishram Ghat | ghat | Mathura | yes |

### Categories
- One category drives places: `Sacred Place` (slug `sacred-place`, id 510), linked to all 6 places.

### Verification status (entire dataset)
- **Every place, place_entity, and region has `verification_status = pending`.** Nothing is verified. No record is `verified` or `rejected`.

---

## 2. Nandgaon — region-assignment findings and sources

### What is established (sourced)

| Source | Finding |
|--------|---------|
| Wikipedia REST summary `Nandgaon, Uttar Pradesh` | "historical town and a nagar panchayat in Mathura district ... Nandgaon is a religious centre in Braj region." Coordinates: **lat 27.72, lon 77.38** (applied to `places` in STEP 08, `verification_status` left `pending`). |
| Wikipedia `Braj` article | Nandgaon is listed among the **notable Braj pilgrimage sites** (per Entwistle 1987). The traditional Braj Yatra circuit "also includes additional sacred sites **Nandgaon and Barsana** with travel on foot." |
| Wikipedia `Barsana` article | Barsana is a historical town/nagar panchayat in Mathura district, Braj region, birthplace of Radha. Coordinates 27.6489, 77.3789. |

Source URLs consulted:
- https://en.wikipedia.org/api/rest_v1/page/summary/Nandgaon,_Uttar_Pradesh
- https://en.wikipedia.org/api/rest_v1/page/summary/Brahma (n/a) — not used
- https://en.wikipedia.org/api/rest_v1/page/summary/Barsana
- https://en.wikipedia.org/wiki/Braj

### What is NOT established

- **No source confirms that Nandgaon belongs inside any of the five existing town-regions** (Vrindavan, Mathura, Govardhan, Barsana, Gokul). Nandgaon is its own distinct **nagar panchayat** (separate local body), not a part/suburb of Barsana or Mathura.
- Nandgaon is geographically near Barsana (same longitude ~77.38, roughly 7–8 km away by straight-line), but per STEP 10 it must **not** be assigned to a region merely because it is nearby.
- There is **no authoritative source** stating which (if any) of the five app regions should contain Nandgaon.

### Conclusion on Nandgaon
Nandgaon is a verified Braj pilgrimage site and a distinct town, but it has no region link in the app and no sourced region assignment. It must remain unlinked until the administrator confirms a region (or a new Nandgaon region is created). `verification_status` remains `pending`. Existing coordinates (27.72, 77.38) and record identity are preserved.

---

## 3. Audit of the five existing regions

### Verified facts

- The root `Braj – 84 Kos` region exists and is published/active.
- Five child regions exist (Vrindavan, Mathura, Govardhan, Barsana, Gokul), each published/active, each linked to exactly one town.
- All five towns have coordinates and are published + active.

### Unverified / not established

- **The five regions are towns, not administrative regions.** The hierarchy is really root → 5 towns, each containing only itself. This is a weak/meaningful region hierarchy: `descendant_place_ids` per child = one place (itself).
- **The five regions do NOT constitute the complete 84 Kos.** Per the Wikipedia `Braj` article (citing Entwistle 1987 and Janet Cochrane 2008), the traditional Braj Yatra / 84 Kos circuit covers **2500 km² with an 84-kos (~300 km) periphery**, extending ~50 km north/west and ~10 km east of Mathura-Vrindavan, and includes **many more sites** than these five towns (the article's notable-sites list from Entwistle 1987 includes Mathura, Vrindavan, Gokul, Govardhan, Barsana, Nandgaon, Radha Kund, Kusum Sarovar, Deeg, Kaman, Kokilavan, Kosi Kalan, Mahaban, Baldeo, Nidhivan, and many others).
- The app's "84 Kos" label on the root region is therefore **not yet backed by the full 84 Kos geography.** It currently represents only 5 of the circuit's towns.
- No region boundaries (polygons/coordinates) exist anywhere in the schema — regions have no boundary fields. Any "region" display is a name + parent link only.

### Pages behaviour (live-verified)
- `/84-kos`: region explorer with descendant rollup. Currently shows the root + 5 regions; selecting a region shows only its single linked town. Nandgaon is not in any region, so it does not appear under any region rollup.
- `/map`: plots places + entities using own coordinates only; coordless places/entities go to the honest "not on map" list. Nandgaon (27.72, 77.38) is plottable.
- `/explore` / `/explore/{slug}`: town detail pages work; Nandgaon detail page is reachable but shows no region badge (no region link).
- `/planner`: Nandgaon is a selectable stop (own coords); Seva Kunj / Shyam Kund selectable but flagged "no coordinates."

---

## 4. Verified versus unverified geographical claims

| Claim | Status | Basis |
|-------|--------|-------|
| Nandgaon is a town/nagar panchayat in Mathura district, UP | Verified | Wikipedia REST summary |
| Nandgaon is a religious centre in Braj region | Verified | Wikipedia REST summary |
| Nandgaon coords 27.72, 77.38 | Verified | Wikipedia REST summary (within Braj bbox) |
| Nandgaon is a notable Braj pilgrimage site | Verified | Wikipedia `Braj` article (Entwistle 1987 notable sites) |
| Traditional Braj Yatra includes Nandgaon + Barsana | Verified | Wikipedia `Braj` article |
| 84 Kos ≈ 2500 km², ~300 km periphery | Verified | Wikipedia `Braj` article |
| Nandgaon belongs to Barsana/Mathura/Vrindavan/Govardhan/Gokul region | **Unverified** — no source; not assigned |
| The 5 app regions = complete 84 Kos | **False / not supported** — 84 Kos is much larger |
| The 5 regions are administrative regions | **Unsupported** — they are towns in the data model |
| Region boundaries exist | **False** — schema has no boundary fields |

---

## 5. Recommended changes (NOT yet implemented — pending review)

Per STEP 10, **no structural changes or data migrations are made in this step.** The following are recommendations for the administrator to review and approve before any implementation:

### Option A — Add Nandgaon as its own region (recommended)
Create a new child region `Nandgaon Region` under `Braj – 84 Kos` and link Nandgaon (place id 119) to it.
- Rationale: Nandgaon is its own nagar panchayat and a verified Braj pilgrimage site; it is not part of another town. A 1:1 town↔region mapping is consistent with the existing 5 regions.
- Requires: administrator confirmation that Nandgaon should be a region; a region name/slug choice.
- `verification_status` stays `pending` until confirmed.

### Option B — Leave Nandgaon unassigned (most conservative)
Keep Nandgaon without a region link, clearly shown as "region not assigned" on its page and in the explorer. Requires no data change; administrator can assign later.

### What must NOT be done (per STEP 10)
- Do NOT auto-assign Nandgaon to Barsana (or any region) merely by geographic proximity.
- Do NOT claim the 5 regions = the complete 84 Kos.
- Do NOT invent regions, boundaries, or boundary coordinates.
- Do NOT run migrations or change production data until this audit and a proposed mapping are approved.

### If the 84 Kos Explorer is expanded later
- Decide whether the app represents the **full 84 Kos circuit** (~many sites across 2500 km², extending into Haryana/Rajasthan/MP) or only the **5 major UP towns**. These are different scopes.
- If expanding, the region model would need more than town↔region 1:1 links (e.g., region boundaries, circuit ordering, kos distances) — none of which exist in the schema today.

---

## 6. Missing data and evidence needed to resolve it

| Missing item | Evidence needed |
|--------------|-----------------|
| Nandgaon region assignment | Administrator confirmation, or authoritative source grouping Nandgaon with an existing region (none found) |
| Full 84 Kos site list & circuit order | Authoritative pilgrimage itinerary source (e.g., Entwistle 1987, temple-board documentation) — if the app intends to represent the full circuit |
| Verified coordinates for all places/entities | All `verification_status = pending`; coordinates sourced from Wikipedia but not yet verified by admin |
| Verified coordinates for Seva Kunj & Shyam Kund | No reliable own-coordinate source found (Wikipedia 404 for both); admin-confirmed coords or leave NULL |
| Region boundaries (if regions are to mean anything geographically) | Boundary/polygon data source; schema currently has no boundary fields |

---

## 7. Regression and safety

- No data was modified during this audit. No migration created or run. No record IDs, URLs, or relationships changed.
- Backups retained: `backups/dham_seva_db_STEP08-pre_20261017_121833.sql` (pre-STEP 08) and `backups/dham_seva_db_STEP06-pre_20261017_164743.sql`.
- Any future approved data-only correction must preserve existing record IDs, URLs, and relationships; run only on `dham_seva_test`; keep the database safety guard (`Tests\Support\DatabaseGuard` + `Tests\TestCase` + `phpunit.xml` pinned to `dham_seva_test`).

---

## 8. Sources

1. Wikipedia REST summary — Nandgaon, Uttar Pradesh  
   https://en.wikipedia.org/api/rest_v1/page/summary/Nandgaon,_Uttar_Pradesh (town, nagar panchayat, Mathura district, Braj region; coords 27.72, 77.38)
2. Wikipedia REST summary — Barsana  
   https://en.wikipedia.org/api/rest_v1/page/summary/Barsana (town, nagar panchayat, Mathura district, Braj region; coords 27.6489, 77.3789)
3. Wikipedia — Braj  
   https://en.wikipedia.org/wiki/Braj (region centered at Mathura-Vrindavan; 84 Kos ≈ 2500 km² / ~300 km periphery; Nandgaon & Barsana in the traditional Braj Yatra; notable Braj pilgrimage sites per Entwistle 1987)

---

**Bottom line:** The region hierarchy exists but is shallow (root → 5 single-town regions). Nandgaon is a verified Braj pilgrimage site with coordinates, but it is **not linked to any region** and there is no sourced basis to assign it to one of the five existing regions. Recommendation (Option A): add Nandgaon as its own region under `Braj – 84 Kos`, pending administrator approval. **No changes are implemented in this audit step.**
