@bd-geo-data/bd-location-data 1.0.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.
Files changed (4) hide show
  1. package/README.md +156 -0
  2. package/data.json +3217 -0
  3. package/index.js +133 -0
  4. package/package.json +21 -0
package/README.md ADDED
@@ -0,0 +1,156 @@
1
+ # bd-location-data
2
+
3
+ বাংলাদেশের সকল **বিভাগ, জেলা, থানা ও পোস্টকোড** — ইংরেজি ও বাংলা উভয় ভাষায়।
4
+
5
+ Bangladesh all **divisions, districts, thanas & postcodes** — in both English and Bangla.
6
+
7
+ ---
8
+
9
+ ## Install
10
+
11
+ ```bash
12
+ npm install bd-location-data
13
+ ```
14
+
15
+ ---
16
+
17
+ ## ডেটা সংখ্যা / Data Coverage
18
+
19
+ | ধরন | সংখ্যা |
20
+ |---|---|
21
+ | বিভাগ (Divisions) | ৮ |
22
+ | জেলা (Districts) | ৬৪ |
23
+ | থানা/উপজেলা (Thanas) | ৫৫৫ |
24
+ | পোস্টকোড (Postcodes) | ৫৫৫ |
25
+ | ভাষা (Languages) | বাংলা + English |
26
+
27
+ ---
28
+
29
+ ## Usage
30
+
31
+ ```js
32
+ const bd = require('bd-location-data');
33
+ ```
34
+
35
+ ### বিভাগ / Divisions
36
+
37
+ ```js
38
+ bd.allDivisions() // ইংরেজিতে সব বিভাগ
39
+ // ['BARISAL', 'CHITTAGONG', 'COMILLA', 'DHAKA', ...]
40
+
41
+ bd.allDivisions('bn') // বাংলায় সব বিভাগ
42
+ // ['বরিশাল', 'চট্টগ্রাম', 'কুমিল্লা', 'ঢাকা', ...]
43
+ ```
44
+
45
+ ### জেলা / Districts
46
+
47
+ ```js
48
+ bd.allDistricts() // সব জেলা (ইংরেজি)
49
+ bd.allDistricts('bn') // সব জেলা (বাংলা)
50
+
51
+ bd.districtsOf('DHAKA') // ঢাকা বিভাগের জেলা (ইংরেজি)
52
+ bd.districtsOf('DHAKA', 'bn') // ঢাকা বিভাগের জেলা (বাংলা)
53
+ // ['ঢাকা', 'ফরিদপুর', 'গাজীপুর', ...]
54
+ ```
55
+
56
+ ### থানা / Thanas
57
+
58
+ ```js
59
+ bd.allThanas() // সব থানা (ইংরেজি)
60
+ bd.allThanas('bn') // সব থানা (বাংলা)
61
+
62
+ bd.thanasOf('GAZIPUR') // গাজীপুরের থানা (ইংরেজি)
63
+ bd.thanasOf('GAZIPUR', 'bn') // গাজীপুরের থানা (বাংলা)
64
+ // ['গাজীপুর সদর', 'কালিয়াকৈর', 'কালীগঞ্জ', ...]
65
+
66
+ // পোস্টকোড সহ থানা
67
+ bd.thanasWithPostcodeOf('GAZIPUR')
68
+ // [{ name: 'GAZIPUR SADAR', postcode: '1700' }, ...]
69
+
70
+ bd.thanasWithPostcodeOf('GAZIPUR', 'bn')
71
+ // [{ name: 'গাজীপুর সদর', postcode: '1700' }, ...]
72
+ ```
73
+
74
+ ### পোস্টকোড / Postcodes
75
+
76
+ ```js
77
+ // পোস্টকোড দিয়ে থানা খোঁজা
78
+ bd.findByPostcode('1212')
79
+ // [
80
+ // { division: 'DHAKA', divisionBn: 'ঢাকা', district: 'DHAKA', districtBn: 'ঢাকা',
81
+ // thana: 'BADDA', thanaBn: 'বাড্ডা', postcode: '1212' },
82
+ // { ..., thana: 'GULSHAN', thanaBn: 'গুলশান', postcode: '1212' }
83
+ // ]
84
+
85
+ // সব থানা পোস্টকোড সহ
86
+ bd.allThanasWithPostcode()
87
+ // [{ division, divisionBn, district, districtBn, thana, thanaBn, postcode }, ...]
88
+ ```
89
+
90
+ ### খোঁজা / Search
91
+
92
+ ```js
93
+ // ইংরেজিতে খোঁজা
94
+ bd.search('mirpur')
95
+ // [{ name: 'MIRPUR', bn: 'মিরপুর', type: 'thana', postcode: '1216',
96
+ // district: 'DHAKA', division: 'DHAKA' }, ...]
97
+
98
+ // বাংলায় খোঁজা
99
+ bd.search('মিরপুর')
100
+
101
+ // বিভাগ, জেলা, থানা সব লেভেলে খোঁজে
102
+ bd.search('sylhet')
103
+ ```
104
+
105
+ ### সম্পূর্ণ ডেটা / Full Data
106
+
107
+ ```js
108
+ bd.getAllData()
109
+ // সম্পূর্ণ JSON ডেটা রিটার্ন করে
110
+ ```
111
+
112
+ ---
113
+
114
+ ## ডেটা স্ট্রাকচার / Data Structure
115
+
116
+ ```json
117
+ {
118
+ "divisions": [
119
+ {
120
+ "name": "DHAKA",
121
+ "bn": "ঢাকা",
122
+ "districts": [
123
+ {
124
+ "name": "GAZIPUR",
125
+ "bn": "গাজীপুর",
126
+ "thana": [
127
+ { "name": "GAZIPUR SADAR", "bn": "গাজীপুর সদর", "postcode": "1700" },
128
+ { "name": "TONGI", "bn": "টঙ্গী", "postcode": "1710" }
129
+ ]
130
+ }
131
+ ]
132
+ }
133
+ ]
134
+ }
135
+ ```
136
+
137
+ ---
138
+
139
+ ## পোস্টকোড রেঞ্জ / Postcode Ranges
140
+
141
+ | জেলা | রেঞ্জ |
142
+ |---|---|
143
+ | Dhaka | 1000–1399 |
144
+ | Chittagong | 4000–4399 |
145
+ | Rajshahi | 6000–6299 |
146
+ | Khulna | 9000–9299 |
147
+ | Sylhet | 3100–3199 |
148
+ | Barisal | 8200–8299 |
149
+ | Rangpur | 5400–5499 |
150
+ | Mymensingh | 2200–2299 |
151
+
152
+ ---
153
+
154
+ ## License
155
+
156
+ MIT