rwanda-geo-data 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -72,20 +72,6 @@ getLocationPath(501010101);
|
|
|
72
72
|
| `findVillageByName(name, cellId?)` | Case-insensitive, optionally scoped |
|
|
73
73
|
| `getLocationPath(villageId)` | Full resolved chain up to province |
|
|
74
74
|
|
|
75
|
-
## Populating the data
|
|
76
|
-
|
|
77
|
-
This repo ships with **empty placeholder data files**. To populate them
|
|
78
|
-
from a raw source JSON (shape: nested `Province[]` with `districts` ->
|
|
79
|
-
`sectors` -> `cells` -> `villages`, each child carrying a `*_id` foreign
|
|
80
|
-
key to its parent):
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npm run generate:data -- path/to/raw-source.json
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
This flattens the nested JSON into `src/data/{provinces,districts,sectors,cells,villages}.ts`,
|
|
87
|
-
and throws if it finds duplicate ids or a child whose FK doesn't resolve
|
|
88
|
-
to a real parent — catch those before they ship, not after.
|
|
89
75
|
|
|
90
76
|
## Scripts
|
|
91
77
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rwanda-geo-data",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Typed, zero-dependency Rwanda administrative geography data (provinces, districts, sectors, cells, villages) with a fast query API.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "SHUMBUSHO Irumva",
|