Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Data Sources and Limitations

NepalData v2 ships the five PHP data files from the v1 repository, byte-for-byte as found in the source checkout for the rewrite. The original repository does not identify a dated authoritative publication or a separate data license. Treat these files as a bundled snapshot of the package’s source; they do not establish the completeness or accuracy of the current official registry.

The snapshot does not provide official administrative codes, coordinates, boundaries, ward records, or an authoritative bilingual mapping for local levels. The 721 local levels in each language are the records in this package, not a claim about the current official total. Some districts are particularly sparse: Dhanusa, for example, has one local level in the bundled hierarchy.

Which file does the typed API use?

The typed catalog follows allData.php, which provides the province, district, classification, and local level hierarchy for each language. Using one hierarchy keeps parent-child relationships consistent and avoids joining on names that vary among the other files. The remaining views are accessible through raw().

The core loads the raw views on demand and keeps an in-memory catalog for each language it uses. Within a catalog, dataset indexes are built when needed; record IDs make direct lookups possible without re-reading the files. ID constants map to the exact source names for provinces and districts. For local levels, the index follows the source order of the selected language. Filters and sorting derive separate read-only selections. None of this uses a database, persistent cache, or network service.

Differences to account for

AreaWhat differs
English province namesprovinces() and provincesWithDistricts() in raw() say Madesh; raw()->all() and the typed catalog say Madhesh.
English district namesThe flat district list and province-to-district map say Kavrepalanchowk and Tehrathum; the hierarchy and district-to-local-level map say Kavrepalanchok and Terhathum.
Nepali district countThe original flat list contains 79 entries. The nested hierarchy and province-to-district map each contain 77.
Local level namesNames are not necessarily unique, even within one language. For example, Madi occurs in four English district entries. The typed catalog preserves each occurrence with its source classification and parent.

The Nepali flat-list-only district names are वैतडी, कन्चनपुर, काभ्रेपालाञ्चोक, नवलपरासी ( बर्दघाट सुस्ता पूर्व ), नवलपरासी ( बर्दघाट सुस्ता पश्चिम ), रुकुम, रुकुम ( पूर्वी भाग ), रुकुम ( पश्चिम भाग), and संखुवासभा. Names present in the nested hierarchy but absent from the flat list are बैतडी, कञ्चनपुर, काभ्रेपलान्चोक, नवलपुर, पूर्वी रुकुम, पश्चिम रुकुम, and सङ्खुवासभा.

The raw district-to-local-level map matches the nested hierarchy when flattened by district in either language. The English and Nepali flat lists are not a reliable record-by-record translation table. Use the stable province and district constants for bilingual lookups of those two entity types.

For a correction, follow Testing and Contributing. The DATA.md file in the v2 package source also records these observations.