pakdatakit 2.2.1 → 2.3.0
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/DATA.md +302 -33
- package/README.md +172 -27
- package/dist/address.cjs +5 -5
- package/dist/address.js +3 -3
- package/dist/{chunk-4VSGCQ6K.cjs → chunk-2OBKPYJZ.cjs} +3 -3
- package/dist/chunk-33QMFE2Z.js +21244 -0
- package/dist/chunk-7E7L3NYS.cjs +11 -0
- package/dist/{chunk-TTARJWGT.js → chunk-A3HBEBXY.js} +2 -2
- package/dist/{chunk-3ZA265SK.cjs → chunk-AUQFA7EE.cjs} +172 -4
- package/dist/{chunk-HBOZIITD.js → chunk-CADQM4ZN.js} +14 -14
- package/dist/{chunk-3IARSCO6.cjs → chunk-DHOP7LQX.cjs} +25 -14
- package/dist/chunk-E6HSKRAE.js +9 -0
- package/dist/{chunk-33FXHM2E.cjs → chunk-ESKXG7Y6.cjs} +5 -5
- package/dist/{chunk-U7MWHXMF.cjs → chunk-FRBPAGEJ.cjs} +4 -4
- package/dist/chunk-I7UUPD3G.cjs +21252 -0
- package/dist/{chunk-YPPKY5XZ.js → chunk-IBZPJS4H.js} +26 -15
- package/dist/{chunk-47P7HILD.cjs → chunk-J5ARB4TE.cjs} +8 -8
- package/dist/{chunk-XCXFGTHW.cjs → chunk-J5ZF46NZ.cjs} +14 -14
- package/dist/{chunk-NZQ47NWD.js → chunk-KRYHLYN2.js} +1 -1
- package/dist/{chunk-RXNYY5K5.js → chunk-LQHM3ADX.js} +172 -4
- package/dist/{chunk-HTERSQGF.cjs → chunk-MTS6SVNP.cjs} +4 -4
- package/dist/chunk-N4S22XX3.js +6208 -0
- package/dist/chunk-OKMBYX3F.cjs +6220 -0
- package/dist/{chunk-6IPPANNX.js → chunk-P7LVE2TF.js} +2 -2
- package/dist/chunk-RZQJAZKC.js +22 -0
- package/dist/{chunk-PLDVGOKZ.js → chunk-S274QFFB.js} +2 -2
- package/dist/chunk-SQIHFEXI.cjs +25 -0
- package/dist/chunk-TBTWZC74.cjs +32 -0
- package/dist/{chunk-NAJGGUAM.cjs → chunk-TC3VRWZV.cjs} +2 -2
- package/dist/{chunk-QKH7W2CC.js → chunk-TQP2T33V.js} +5 -5
- package/dist/{chunk-AZV45DMG.js → chunk-V2XE3NCG.js} +2 -2
- package/dist/{chunk-NTD4JLDW.cjs → chunk-YTLE5K7G.cjs} +1 -1
- package/dist/{chunk-HUQY2WR5.js → chunk-YTSMFGTW.js} +13 -3
- package/dist/{chunk-EMH4IP2U.js → chunk-ZRONAQBV.js} +1 -1
- package/dist/class-validator.cjs +57 -0
- package/dist/class-validator.d.cts +57 -0
- package/dist/class-validator.d.ts +57 -0
- package/dist/class-validator.js +47 -0
- package/dist/cli.js +1 -1
- package/dist/geo.cjs +22 -6
- package/dist/geo.d.cts +56 -1
- package/dist/geo.d.ts +56 -1
- package/dist/geo.js +1 -1
- package/dist/holidays.cjs +4 -4
- package/dist/holidays.js +1 -1
- package/dist/iban.cjs +5 -5
- package/dist/iban.d.cts +8 -6
- package/dist/iban.d.ts +8 -6
- package/dist/iban.js +1 -1
- package/dist/index.cjs +106 -68
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +16 -14
- package/dist/input.cjs +9 -9
- package/dist/input.js +3 -3
- package/dist/joi.cjs +37 -0
- package/dist/joi.d.cts +24 -0
- package/dist/joi.d.ts +24 -0
- package/dist/joi.js +31 -0
- package/dist/networks.cjs +3 -3
- package/dist/networks.js +2 -2
- package/dist/numbers.cjs +6 -6
- package/dist/numbers.js +2 -2
- package/dist/passport.cjs +11 -0
- package/dist/passport.d.cts +27 -0
- package/dist/passport.d.ts +27 -0
- package/dist/passport.js +2 -0
- package/dist/phone.cjs +8 -8
- package/dist/phone.js +3 -3
- package/dist/postal.cjs +14 -6
- package/dist/postal.d.cts +54 -2
- package/dist/postal.d.ts +54 -2
- package/dist/postal.js +1 -1
- package/dist/raast.cjs +6 -6
- package/dist/raast.js +2 -2
- package/dist/superstruct.cjs +35 -0
- package/dist/superstruct.d.cts +24 -0
- package/dist/superstruct.d.ts +24 -0
- package/dist/superstruct.js +33 -0
- package/dist/valibot.cjs +12 -8
- package/dist/valibot.d.cts +2 -0
- package/dist/valibot.d.ts +2 -0
- package/dist/valibot.js +11 -7
- package/dist/vehicle.cjs +15 -0
- package/dist/vehicle.d.cts +43 -0
- package/dist/vehicle.d.ts +43 -0
- package/dist/vehicle.js +2 -0
- package/dist/whatsapp.cjs +3 -3
- package/dist/whatsapp.js +2 -2
- package/dist/yup.cjs +12 -8
- package/dist/yup.d.cts +2 -0
- package/dist/yup.d.ts +2 -0
- package/dist/yup.js +11 -7
- package/dist/zod.cjs +12 -8
- package/dist/zod.d.cts +2 -0
- package/dist/zod.d.ts +2 -0
- package/dist/zod.js +11 -7
- package/package.json +101 -3
- package/dist/chunk-34CJGJ67.cjs +0 -1697
- package/dist/chunk-4VVFS6FN.cjs +0 -715
- package/dist/chunk-E6DT2DWQ.js +0 -1689
- package/dist/chunk-GJENL6VK.cjs +0 -22
- package/dist/chunk-LIYNKIKS.js +0 -709
package/DATA.md
CHANGED
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
PakDataKit's datasets live in `data/` and are generated by
|
|
4
4
|
`scripts/generate-data.mjs` (except `networks.json`, `area-codes.json` and
|
|
5
|
-
`holidays.json`, which are edited directly).
|
|
5
|
+
`holidays.json`, which are edited directly). Two official lists are kept as
|
|
6
|
+
extracted CSV files in `data/sources/` and read by the generator: Pakistan
|
|
7
|
+
Post's post code directory and the 2023 census's administrative units. The exported `dataVersion` is the
|
|
6
8
|
date the data was last checked.
|
|
7
9
|
|
|
8
|
-
**Data version: 2026-11-
|
|
10
|
+
**Data version: 2026-11-17**
|
|
11
|
+
|
|
12
|
+
The datasets were audited against official sources on 16 November 2026;
|
|
13
|
+
[AUDIT.md](AUDIT.md) has the findings, the fixes made and what is still open.
|
|
9
14
|
|
|
10
15
|
Official bodies (PTA, NADRA, SBP, Pakistan Post) publish few machine-readable
|
|
11
16
|
lists, so some entries rest on secondary sources. Each section says how sure we
|
|
@@ -15,53 +20,139 @@ are. To correct an entry, open an issue or pull request with a source.
|
|
|
15
20
|
|
|
16
21
|
SBP does not publish a list of IBAN bank codes, and IBAN codes do not always
|
|
17
22
|
match SWIFT BIC prefixes (e.g. Silkbank is `SAUD`). Codes are therefore checked
|
|
18
|
-
against real IBANs.
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
`
|
|
23
|
+
against real IBANs. Names follow SBP's lists of regulated institutions
|
|
24
|
+
(https://www.sbp.org.pk/sbp-regulated-institutions/commercial-banks and
|
|
25
|
+
.../microfinance-banks, retrieved 2026-11-16), with a former name kept in
|
|
26
|
+
brackets where people still search for it.
|
|
27
|
+
|
|
28
|
+
- **Confirmed from IBANs printed by SBP:** 35 codes, from SBP's list of dam
|
|
29
|
+
fund accounts at every bank
|
|
30
|
+
(https://archive.sbp.org.pk/notifications/FD/DamFund/Detail-1.pdf, undated,
|
|
31
|
+
about 2018, retrieved 2026-11-16): `AIIN`, `ABPA`, `ASCM`, `ALFH`, `BAHL`,
|
|
32
|
+
`BKIP`, `KHYB`, `BPUN`, `BKCH`, `CITI`, `DEUT`, `DUIB`, `FAYS`, `FWOM`,
|
|
33
|
+
`HABB`, `MPBL`, `ICBK`, `JSBL`, `MUCB`, `MCIB`, `MEZN`, `NBPA`, `SAMB`,
|
|
34
|
+
`SAUD`, `SIND`, `SMES`, `SONE`, `SCBL`, `SUMB`, `UNIL`, `ZTBL` (Zarai
|
|
35
|
+
Taraqiati Bank), `TMFB`, `WMBL`, `FMFB` and `SMFB` (Sindh Microfinance
|
|
36
|
+
Bank). The same list shows an `SBPP` IBAN in use. `ZTBL` and `SMFB` were
|
|
37
|
+
added on 2026-11-16 from this list. (It prints ICBC's IBAN with a digit `1`
|
|
38
|
+
for the `I`; the checksum is only valid with `ICBK`.)
|
|
39
|
+
- **Also confirmed from IBANs printed by SBP:** `KHBL` (Khushhali), `JCMA`
|
|
40
|
+
(Mobilink Microfinance Bank), `FINC` (ABHI, as FINCA), `UMBL`, `NRSP` and
|
|
41
|
+
`APNA`, from SBP's account lists for the Prime Minister's Flood Relief Fund
|
|
42
|
+
2022 (https://archive.sbp.org.pk/IBANs-of-PM-Flood-Relief-Fund.pdf) and the
|
|
43
|
+
2023 relief fund for Türkiye and Syria
|
|
44
|
+
(https://archive.sbp.org.pk/ReliefFund-Turkiye.pdf), both retrieved
|
|
45
|
+
2026-11-16. That makes 41 codes confirmed by SBP documents.
|
|
27
46
|
- **Confirmed from published IBANs on smaller sites:** `SADA` (SadaPay), `NAYA`
|
|
28
47
|
(NayaPay).
|
|
29
48
|
- **Confirmed from real account IBANs shared by a maintainer:** `RQMI` (Raqami
|
|
30
49
|
Islamic Digital Bank) and `MSHQ` (Mashreq Bank Pakistan), both digital banks.
|
|
31
|
-
- **
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
50
|
+
- **Legacy codes with no official source:** `MCBL`, `NBPB`, `TAMW` and `NIBP`.
|
|
51
|
+
- **Not included, because no code could be confirmed:** Punjab Provincial
|
|
52
|
+
Cooperative Bank, LOLC Microfinance Bank (formerly Pak Oman), Halan
|
|
53
|
+
Microfinance Bank (formerly Advans), ASA Microfinance Bank, the EMIs Finja,
|
|
54
|
+
Akhtar Fuiou Technologies, E-Processing Systems, Wemsol and YAP Pakistan,
|
|
55
|
+
HugoBank, KT Bank and Bank of AJK. A second search on 2026-11-16 (SBP's
|
|
56
|
+
relief-fund lists and each institution's own website) found no printed IBAN
|
|
57
|
+
for any of them.
|
|
58
|
+
- **Types** follow SBP's groups on its list of regulated institutions:
|
|
59
|
+
"Public Sector Commercial Banks" are `public-sector` (National Bank of
|
|
60
|
+
Pakistan, Sindh Bank, The Bank of Khyber, The Bank of Punjab), "Local
|
|
61
|
+
Private Banks" are `commercial`, and "Islamic", "Foreign", "Specialized"
|
|
62
|
+
and "Digital" banks have the type of the same name.
|
|
63
|
+
- **Spelling.** Names use each bank's own styling ("Bank Alfalah Limited",
|
|
64
|
+
"Bank Al Habib Limited", "BankIslami Pakistan Limited", "Citibank N.A.
|
|
65
|
+
Pakistan"). SBP's list spells some differently, and not consistently
|
|
66
|
+
("Bank Al-Falah Limited", "Bank Al-Habib Limited", "Al-Baraka Bank
|
|
67
|
+
(Pakistan) Limited", "Bank Islami Pakistan Limited", "Citi Bank N.A",
|
|
68
|
+
"Industrial & Commercial Bank of China", "Allied Bank limited"), so it is
|
|
69
|
+
recorded here and not copied.
|
|
70
|
+
- **Closed:** `SMES` → "SME Bank Limited (in liquidation)", `active: false`.
|
|
71
|
+
SBP cancelled its licence and de-scheduled it on 17 March 2025
|
|
72
|
+
(https://archive.sbp.org.pk/notifications/bprd/2025/ntf6.htm). `NIBP` was
|
|
73
|
+
de-scheduled on 7 July 2017 on its merger into MCB Bank
|
|
74
|
+
(https://archive.sbp.org.pk/notifications/bprd/2017/ntf2.htm).
|
|
36
75
|
- **Merged or renamed** banks keep their code with the current name, e.g.
|
|
37
|
-
`SAUD` → "Silkbank Limited (merged into United Bank Limited)"
|
|
76
|
+
`SAUD` → "Silkbank Limited (merged into United Bank Limited)" (de-scheduled
|
|
77
|
+
by SBP on 10 March 2025,
|
|
78
|
+
https://archive.sbp.org.pk/notifications/bprd/2025/ntf4.htm) and `TMFB` →
|
|
79
|
+
"Easypaisa Bank Limited" (a scheduled bank from 23 January 2025,
|
|
80
|
+
https://archive.sbp.org.pk/notifications/bprd/2025/ntf1.htm).
|
|
38
81
|
|
|
39
82
|
## Mobile networks (`networks.json`)
|
|
40
83
|
|
|
41
|
-
`03XX` prefixes and the operator each was originally allocated to. PTA
|
|
42
|
-
|
|
84
|
+
`03XX` prefixes and the operator each was originally allocated to. PTA has no
|
|
85
|
+
current operator-by-prefix table. Its National Numbering Plan 2008 paper
|
|
86
|
+
(https://www.pta.gov.pk/assets/media/nnp_08_final.pdf, retrieved 2026-11-16)
|
|
87
|
+
gives the two-digit allocations: 30 Mobilink (Jazz), 31 Paktel (now Zong), 32
|
|
88
|
+
Warid (now Jazz), 33 Ufone, 34 Telenor, 35 SCO, 36 Instaphone, and 37 to 39
|
|
89
|
+
"for future use". Individual prefixes are cross-checked with Google
|
|
43
90
|
libphonenumber and operator announcements.
|
|
44
91
|
|
|
45
92
|
- `0329` (Jazz) and `0355` (SCO) included.
|
|
46
|
-
- `0370`–`0371` (Zong) included
|
|
47
|
-
|
|
93
|
+
- `0370`–`0371` (Zong) included, from libphonenumber only. **Unverified:**
|
|
94
|
+
two searches in November 2026 (PTA's annual reports for 2021 to 2024, its
|
|
95
|
+
numbering documents and licensee list, the ITU page for Pakistan and
|
|
96
|
+
zong.com.pk) found no official document that gives 037x to an operator. `0372`–`0379` are **not**
|
|
97
|
+
included, as no allocation or use was found.
|
|
48
98
|
- `0364` (Instaphone, licence cancelled in 2008) is not included.
|
|
49
|
-
- `034x` is labelled Telenor, the original allocation
|
|
50
|
-
into PTML (Ufone) in 2026
|
|
51
|
-
|
|
99
|
+
- `034x` is labelled Telenor, the original allocation. Telenor Pakistan was
|
|
100
|
+
merged into PTML (Ufone) in July 2026: PTCL announced the "successful
|
|
101
|
+
completion of the amalgamation" on 2 July 2026
|
|
102
|
+
(https://ptcl.com.pk/Home/PressReleaseDetail/?ItemId=934&linkId=130,
|
|
103
|
+
retrieved 2026-11-16). The label is kept because the dataset records the
|
|
104
|
+
operator a prefix was allocated to, no new brand has been announced
|
|
105
|
+
officially (PTCL still writes "Ufone 5G"), and PTA's own pages still list
|
|
106
|
+
Telenor Pakistan. With number portability, the current operator can differ
|
|
107
|
+
for any prefix.
|
|
52
108
|
|
|
53
109
|
## Landline area codes (`area-codes.json`)
|
|
54
110
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
111
|
+
114 codes, from the numbering plan PTA sent to the ITU on 9 November 2021
|
|
112
|
+
(https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000A10002PDFE.pdf,
|
|
113
|
+
retrieved 2026-11-16), which lists every code with its district. The 73 codes
|
|
114
|
+
held before November 2026 came from PTCL's national dialling-code list
|
|
115
|
+
(https://ptcl.com.pk/Info/National-Dialing-Codes) and all appear in the ITU
|
|
116
|
+
plan with the same districts.
|
|
117
|
+
|
|
118
|
+
- **Added 2026-11-16 from the ITU plan:** 18 codes in Balochistan (`822`
|
|
119
|
+
Zhob to `856` Awaran), 8 in Khyber Pakhtunkhwa (`924` Khyber and Mohmand,
|
|
120
|
+
`932` Malakand, `939` Buner, `942` Bajaur, `944` Upper Dir, `945` Lower
|
|
121
|
+
Dir, `965` South Waziristan, `996` Shangla), 7 in Gilgit-Baltistan (`5811`
|
|
122
|
+
Gilgit to `5817` Astore) and 8 in Azad Jammu and Kashmir (`5821` Neelum to
|
|
123
|
+
`5828` Bhimber).
|
|
124
|
+
- Names are the districts the plan gives, spelt as in `districts.json` so
|
|
125
|
+
that `getAreaCode` finds them: the plan writes "Neelum", "Sudonthi",
|
|
126
|
+
"Bhimer" and "K.Abdullah / Pishin" for Neelam, Sudhnuti, Bhimber and Killa
|
|
127
|
+
Abdullah and Pishin. `832` is listed there as Bolan, the former name of
|
|
128
|
+
Kachhi district; both names find it. For the two districts split since
|
|
129
|
+
2021, the successors are listed with the plan's name: `835` Dera Bugti,
|
|
130
|
+
North Dera Bugti and South Dera Bugti; `965` South Waziristan, Lower South
|
|
131
|
+
Waziristan and Upper South Waziristan.
|
|
132
|
+
- PTCL's own list differs for Azad Jammu and Kashmir (Muzaffarabad "58",
|
|
133
|
+
Kotli "574") and has no Mirpur or Gilgit entry. The ITU plan is the newer
|
|
134
|
+
list from PTA, so it is followed.
|
|
135
|
+
- **Number lengths** are not taken from the ITU plan (its length table could
|
|
136
|
+
not be read reliably). The patterns in `numbers.ts` come from
|
|
137
|
+
libphonenumber's PK metadata (v9.0.41), which already accepted numbers in
|
|
138
|
+
all 41 added codes: ten digits in all for the `58xx` codes, so a four-digit
|
|
139
|
+
code is followed by six digits.
|
|
59
140
|
|
|
60
141
|
## Districts (`districts.json`)
|
|
61
142
|
|
|
62
143
|
177 districts as of October 2026: Punjab 41, Sindh 30, Khyber Pakhtunkhwa 40,
|
|
63
144
|
Balochistan 41, Gilgit-Baltistan 14, Azad Jammu and Kashmir 10, Islamabad 1.
|
|
64
145
|
|
|
146
|
+
> **Unverified: Central Dir, Allai and Paharpur** (Khyber Pakhtunkhwa). They
|
|
147
|
+
> rest on a news report of January 2026, not on a notification. Official
|
|
148
|
+
> pages updated in November 2026 do not show them: Malakand Division lists
|
|
149
|
+
> 10 districts without Central Dir (cmd.kp.gov.pk), Hazara Division lists 8
|
|
150
|
+
> without Allai (chd.kp.gov.pk), and the KP Bureau of Statistics'
|
|
151
|
+
> Development Statistics 2026 has Allai as a tehsil of Batagram and Paharpur
|
|
152
|
+
> as a tehsil of Dera Ismail Khan (all retrieved 2026-11-16). They are kept
|
|
153
|
+
> until a notification settles it either way. Nine more districts are also
|
|
154
|
+
> not confirmed on an official page; see the end of this section.
|
|
155
|
+
|
|
65
156
|
- **Khyber Pakhtunkhwa** (APP, January 2026: "increased to 40"): Lower and Upper
|
|
66
157
|
South Waziristan (2022), Central Dir and Allai (January 2023), Paharpur
|
|
67
158
|
(November 2025), Bar Swat (January 2026; reported as "Upper Swat" before
|
|
@@ -78,22 +169,153 @@ Balochistan 41, Gilgit-Baltistan 14, Azad Jammu and Kashmir 10, Islamabad 1.
|
|
|
78
169
|
so current names are kept.
|
|
79
170
|
- Former names (Quetta, Dera Bugti, Upper Dera Bugti, South Waziristan, Upper
|
|
80
171
|
Swat) still resolve in `getDistrictProvince`.
|
|
172
|
+
- **Official confirmation, checked 2026-11-16** (details in AUDIT.md,
|
|
173
|
+
section 9). Confirmed on official pages: Murree, Talagang, Wazirabad, Kot
|
|
174
|
+
Addu and Taunsa (Punjab Board of Revenue list); Lower and Upper South
|
|
175
|
+
Waziristan and Hub (Election Commission delimitation report, 2023); Bar
|
|
176
|
+
Swat (Malakand Division's website); Usta Muhammad, Barshore and Tump
|
|
177
|
+
(Balochistan budget documents, June 2026). **Not confirmed on any official
|
|
178
|
+
page that could be read:** Central Dir, Allai and Paharpur (Khyber
|
|
179
|
+
Pakhtunkhwa's divisional websites and its Development Statistics 2026
|
|
180
|
+
still show Allai and Paharpur as tehsils and list no Central Dir); Quetta
|
|
181
|
+
East and West, North and South Dera Bugti and Wadh (Balochistan); and
|
|
182
|
+
Darel, Tangir, Gupis-Yasin and Roundu (Gilgit-Baltistan's 2024-25
|
|
183
|
+
development programme treats them as sub-divisions). These stay in the
|
|
184
|
+
dataset on the strength of the notifications and reports cited above, and
|
|
185
|
+
are the entries most likely to need correcting.
|
|
81
186
|
|
|
82
187
|
## Cities (`cities.json`)
|
|
83
188
|
|
|
84
189
|
District headquarters and major towns, plus every city that has a postal code
|
|
85
190
|
in `postal-codes.json`, each mapped to its province.
|
|
86
191
|
|
|
87
|
-
## Postal codes (`postal-codes.json`)
|
|
192
|
+
## Postal codes (`postal-codes.json`, `post-offices.json`)
|
|
193
|
+
|
|
194
|
+
Both files come from Pakistan Post's "Post Code Directory of Delivery Post
|
|
195
|
+
Offices" (Part I), a 45-page PDF dated February 2021
|
|
196
|
+
(https://www.pakpost.gov.pk/images/national%20post%20code%20directory.pdf,
|
|
197
|
+
retrieved 2026-11-16). Its office name, code, account office and province
|
|
198
|
+
columns are extracted to `data/sources/pakpost-delivery-post-offices.csv`
|
|
199
|
+
(2,564 rows), and `scripts/generate-data.mjs` builds both files from it.
|
|
200
|
+
|
|
201
|
+
- **`post-offices.json`** (2,560 entries, for `getPostOffice` and
|
|
202
|
+
`searchPostOffices`): every office, as `code`, `office` (the directory's
|
|
203
|
+
name in title case), `town`, `district` and `province`. The directory
|
|
204
|
+
lists four codes twice, for the same place under two spellings (`22190`,
|
|
205
|
+
`40520`, `56320`, `63050`); the first row is kept.
|
|
206
|
+
- **`postal-codes.json`** (457 entries, for `getCityByPostalCode`,
|
|
207
|
+
`getPostalCode`, `getPostalCodes`, `getPostalAreas` and
|
|
208
|
+
`searchPostalCodes`): only the offices that belong to a city in
|
|
209
|
+
`cities.json`, as `city`, `postalCode`, `area` (the office name),
|
|
210
|
+
`province`, and `district` and `primary` where they apply.
|
|
211
|
+
- **Which city an office belongs to.** The directory has no city column, so
|
|
212
|
+
this is worked out:
|
|
213
|
+
1. the 110 entries checked by hand before the import keep their city
|
|
214
|
+
(including the eight codes corrected in November 2026);
|
|
215
|
+
2. an office named after a city in `cities.json`, in the same province,
|
|
216
|
+
belongs to that city ("ABBOTTABAD GPO" → Abbottabad);
|
|
217
|
+
3. every office under the Karachi, Lahore and Islamabad account offices
|
|
218
|
+
belongs to that city;
|
|
219
|
+
4. an office whose name starts or ends with the city of its own account
|
|
220
|
+
office belongs to that city ("GULISTAN COLONY, FAISALABAD").
|
|
221
|
+
|
|
222
|
+
Any other office is in a town or village that is not on the city list. It
|
|
223
|
+
is only in `post-offices.json`, where `town` is the office's own name
|
|
224
|
+
("Dulmial"); `getCityByPostalCode` returns `null` for it.
|
|
225
|
+
|
|
226
|
+
- **District** is given only where the town is the headquarters a district
|
|
227
|
+
is named after (349 offices). An account office can serve several
|
|
228
|
+
districts, so it is not used to guess one.
|
|
229
|
+
- **Province** is the directory's, with its spelling normalised ("Azad
|
|
230
|
+
Kashmir" → Azad Jammu and Kashmir, "Federal Capital" → Islamabad Capital
|
|
231
|
+
Territory, and the misprints "Punjba" and "SIndh").
|
|
232
|
+
- **Primary.** `getPostalCode(city)` returns the hand-checked code for the 95
|
|
233
|
+
cities that had one. For 63 more cities it returns the code of the office
|
|
234
|
+
named "<city> GPO", or else the office named after the city.
|
|
235
|
+
- **Names** are converted from the directory's capitals to title case; its
|
|
236
|
+
spellings are kept, including misprints ("Islamabad Primr Minister
|
|
237
|
+
Sectt.").
|
|
238
|
+
- **Not included:** the 740 or so non-delivery post offices of Part II
|
|
239
|
+
(https://www.pakpost.gov.pk/images/LIST%20OF%20NON%20DELIVERY%20POs.pdf).
|
|
240
|
+
- The directory is dated 2021. Pakistan Post's web table
|
|
241
|
+
(https://www.pakpost.gov.pk/postcodes.php) is missing many offices, so it
|
|
242
|
+
is not the source; it was used for the spot-check below.
|
|
243
|
+
|
|
244
|
+
## Divisions and tehsils (`divisions.json`, `tehsils.json`)
|
|
245
|
+
|
|
246
|
+
From Table 1 of the 2023 census (Pakistan Bureau of Statistics), which lists
|
|
247
|
+
every administrative unit with its area and population. Retrieved 2026-11-16:
|
|
88
248
|
|
|
89
|
-
|
|
90
|
-
|
|
249
|
+
- tehsils by district:
|
|
250
|
+
https://www.pbs.gov.pk/wp-content/uploads/census_tables/tables/table_1_punjab_districts.pdf
|
|
251
|
+
and the same file name for `sindh`, `kp` and `balochistan`, plus
|
|
252
|
+
`table_1_islamabad.pdf`;
|
|
253
|
+
- districts by division: `table_1_punjab_province.pdf` and the same for the
|
|
254
|
+
other three provinces.
|
|
255
|
+
|
|
256
|
+
The rows are extracted to `data/sources/census-2023-admin-units.csv`. The
|
|
257
|
+
totals match the census report's Table 1.1: **30 divisions, 136 districts and
|
|
258
|
+
591 tehsil-level units** (Punjab 146, Sindh 138, Khyber Pakhtunkhwa 148,
|
|
259
|
+
Balochistan 158, Islamabad 1).
|
|
260
|
+
|
|
261
|
+
- **Tehsil-level units** are what the census counts: 306 tehsils, 107
|
|
262
|
+
talukas (Sindh), 134 sub-divisions (Karachi, the merged districts of Khyber
|
|
263
|
+
Pakhtunkhwa and much of Balochistan), 43 sub-tehsils (Balochistan) and one
|
|
264
|
+
de-excluded area (Rajanpur). Each entry has a `type`.
|
|
265
|
+
- **Census district.** Every tehsil has a `censusDistrict`: the district it
|
|
266
|
+
was in at the census. The census had 136 districts; `districts.json` has
|
|
267
|
+
the 177 of today. Three census districts have since been split and are no
|
|
268
|
+
longer district names: Quetta, Dera Bugti and South Waziristan.
|
|
269
|
+
- **Current district.** `currentDistrict` is the same as `censusDistrict`
|
|
270
|
+
for the 119 census districts that have not lost territory to a new
|
|
271
|
+
district. For tehsils of the 17 that have (Rawalpindi, Chakwal,
|
|
272
|
+
Gujranwala, Muzaffargarh, Dera Ghazi Khan, South Waziristan, Upper Dir,
|
|
273
|
+
Batagram, Dera Ismail Khan, Swat, Lasbela, Jaffarabad, Quetta, Dera Bugti,
|
|
274
|
+
Pishin, Kech and Khuzdar) it is set only where an official
|
|
275
|
+
source confirms where the tehsil is now, and is `null` otherwise.
|
|
276
|
+
- **Confirmed (Punjab, all 25 tehsils of the five parent districts):**
|
|
277
|
+
Murree and Kotli Sattian are in Murree district; Talagang and Lawa in
|
|
278
|
+
Talagang; Wazirabad in Wazirabad; Kot Addu and Chowk Sarwar Shaheed in
|
|
279
|
+
Kot Addu; Taunsa and Koh-e-Suleman in Taunsa; the others stay in
|
|
280
|
+
Rawalpindi, Chakwal, Gujranwala, Muzaffargarh and Dera Ghazi Khan.
|
|
281
|
+
Source: the Board of Revenue's list of tehsils by district as on 31
|
|
282
|
+
December 2023, in the Punjab Bureau of Statistics' Statistical Pocket
|
|
283
|
+
Book 2025
|
|
284
|
+
(https://bos.punjab.gov.pk/system/files/Statistical%20Pocket%20Book%202025%20Final.pdf,
|
|
285
|
+
retrieved 2026-11-16). That list also has tehsils created since the
|
|
286
|
+
census (Vehova, Alipur Chatha and others), which are not in this data.
|
|
287
|
+
- **Not confirmed, so `null` (78 tehsils):** the tehsils of Swat, Upper
|
|
288
|
+
Dir, Batagram, Dera Ismail Khan and South Waziristan (Khyber
|
|
289
|
+
Pakhtunkhwa) and of Quetta, Dera Bugti, Pishin, Kech, Khuzdar, Lasbela
|
|
290
|
+
and Jaffarabad (Balochistan). No official list of tehsils by district
|
|
291
|
+
for today's districts could be read for either province.
|
|
292
|
+
- **Divisions** are the census's 30. Divisions created since (Gujrat in
|
|
293
|
+
Punjab, listed on punjab.gov.pk) are not included, and districts created
|
|
294
|
+
since the census have no division here.
|
|
295
|
+
- **Not covered:** Azad Jammu and Kashmir (3 divisions, 10 districts, 32
|
|
296
|
+
tehsils per "AJK at a Glance 2023") and Gilgit-Baltistan. The census tables
|
|
297
|
+
have no rows for them, and no official list of their tehsils was found.
|
|
298
|
+
- **Spelling** is the census's, in title case, with district names changed
|
|
299
|
+
to ours ("UMER KOT" → Umerkot, "KAMBAR SHAHDAD KOT" → Qambar Shahdadkot,
|
|
300
|
+
"TORGHAR" → Tor Ghar).
|
|
301
|
+
- **Repaired by hand.** The letters "LLA" are missing from four names in the
|
|
302
|
+
district tables' text (the PDF prints them, but they do not come out of
|
|
303
|
+
it). They are restored in `data/sources/census-2023-admin-units.csv`:
|
|
304
|
+
|
|
305
|
+
| Census text | Restored to | Evidence |
|
|
306
|
+
| -------------- | --------------- | -------------------------------------------------------- |
|
|
307
|
+
| `AI` | Allai | Allai tehsil of Batagram; KP Development Statistics 2026 |
|
|
308
|
+
| `KAR KAHAR` | Kallar Kahar | Punjab Board of Revenue tehsil list ("Kalar Kahar") |
|
|
309
|
+
| `KAR SAYADDAN` | Kallar Sayaddan | Punjab Board of Revenue tehsil list ("Kallar Syedan") |
|
|
310
|
+
| `TANDO AHYAR` | Tando Allahyar | The census's own province table prints "TANDO ALLAHYAR" |
|
|
91
311
|
|
|
92
312
|
## Public holidays (`holidays.json`)
|
|
93
313
|
|
|
94
314
|
Eid ul Fitr, Eid ul Adha, Ashura and Eid Milad un Nabi dates actually observed
|
|
95
|
-
in 2020–2026
|
|
96
|
-
|
|
315
|
+
in 2020–2026; each entry has a `source` URL, and every source is a Cabinet
|
|
316
|
+
Division notification or an SBP circular letter (checked 2026-11-16; the last
|
|
317
|
+
seven news links, for 2020–2023, were replaced that day with the SBP circular
|
|
318
|
+
that states the same dates). Later years are estimated from the tabular Hijri calendar
|
|
97
319
|
and marked `estimated: true`. Fixed-date holidays follow the years they applied
|
|
98
320
|
in (e.g. Iqbal Day restored in 2022, Youm-e-Takbeer from 2024).
|
|
99
321
|
|
|
@@ -103,3 +325,50 @@ First digit = province of registration, per FBR's tax-ID description filed with
|
|
|
103
325
|
the OECD (1 Khyber Pakhtunkhwa, 2 former FATA, 3 Punjab, 4 Sindh, 5
|
|
104
326
|
Balochistan, 6 Islamabad, 7 Gilgit-Baltistan). `8` for Azad Jammu and Kashmir
|
|
105
327
|
comes from secondary sources only. Last digit odd = male, even = female.
|
|
328
|
+
|
|
329
|
+
## Passport numbers
|
|
330
|
+
|
|
331
|
+
`validatePassport` accepts two letters followed by seven digits (`AB1234567`).
|
|
332
|
+
DGIP does not publish the format, and its forms only ask for "Passport Number".
|
|
333
|
+
|
|
334
|
+
- **Source:** the EU Council's PRADO register gives this pattern for the 2013
|
|
335
|
+
ordinary passport
|
|
336
|
+
(https://www.consilium.europa.eu/prado/en/PAK-AO-02003/index.html). The page
|
|
337
|
+
sits behind a bot check, so it was confirmed through search-result text, not
|
|
338
|
+
the page itself.
|
|
339
|
+
- **Observed on real passports:** the maintainer checked real ordinary
|
|
340
|
+
(green) and official (blue) Pakistani passports in November 2026; their
|
|
341
|
+
numbers have this shape. No numbers are recorded here.
|
|
342
|
+
- **Fits ICAO Doc 9303:** the document-number field is 9 characters, with the
|
|
343
|
+
check digit stored separately in the machine-readable zone
|
|
344
|
+
(https://www.icao.int/publications/Documents/9303_p4_cons_en.pdf).
|
|
345
|
+
- **Still unconfirmed:** diplomatic (red) passports and the e-passport
|
|
346
|
+
variants (2022 onwards), and what the letters mean. A real number in another
|
|
347
|
+
shape will be rejected; treat `false` as unusual, not fake.
|
|
348
|
+
|
|
349
|
+
## Vehicle registration plates
|
|
350
|
+
|
|
351
|
+
`parseVehiclePlate` accepts 1–4 letters, then 1–4 digits, optionally followed
|
|
352
|
+
by a two-digit year after a separator (`LEA-1234-19`). There is no national
|
|
353
|
+
format: each province's excise department sets its own.
|
|
354
|
+
|
|
355
|
+
- **Reported formats** (Wikipedia, partly inconsistent,
|
|
356
|
+
https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Pakistan):
|
|
357
|
+
Sindh cars 3 letters + 3 digits; Islamabad and Balochistan 2 letters + 3
|
|
358
|
+
digits; Khyber Pakhtunkhwa 2 letters + 4 digits; Gilgit-Baltistan 3 letters +
|
|
359
|
+
2 digits; AJK motorcycles and public transport 4 letters + 3 digits; older
|
|
360
|
+
Punjab plates 4 digits plus a two-digit year.
|
|
361
|
+
- **Number length:** Punjab's excise department auctions registration marks of
|
|
362
|
+
1 to 4 digits (https://excise.punjab.gov.pk/auctions).
|
|
363
|
+
- **Recent changes:** numbers now stay with the owner in Islamabad
|
|
364
|
+
(https://profit.pakistantoday.com.pk/2025/07/20/ict-excise-deptt-introduces-personalized-number-plates-digital-cards-online-tax-payment/),
|
|
365
|
+
Khyber Pakhtunkhwa
|
|
366
|
+
(https://arynews.tv/kp-new-vehicle-registration-number-plate-system-sep-17-2025)
|
|
367
|
+
and Sindh, from 16 February 2026
|
|
368
|
+
(https://profit.pakistantoday.com.pk/2026/02/16/sindh-enforces-cnic-based-number-plates-owners-can-retain-registration-marks/).
|
|
369
|
+
Punjab announced new series from May 2026
|
|
370
|
+
(https://propakistani.pk/2026/04/29/punjab-to-launch-five-new-vehicle-number-series/)
|
|
371
|
+
without publishing their layout.
|
|
372
|
+
- **Not checked:** series letters against districts (no official list, e.g. for
|
|
373
|
+
`LEA`/`LEB` = Lahore), and labels printed on the plate such as "ICT" or
|
|
374
|
+
"PUNJAB", which are not part of the number.
|