@geoalgeria/poste 1.0.0 → 1.0.2
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 +72 -63
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,47 +1,74 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# @geoalgeria/poste
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
**Every Algérie Poste office and ATM — as data you can install.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
8
|
+
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
3,908 post offices and 2,026 ATMs across Algeria — with **real postal codes**, bilingual (French / Arabic) names, GPS coordinates, and commune/wilaya linkage. Sourced from Algérie Poste, shipped as JSON, CSV, and GeoJSON. Part of [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install @geoalgeria/poste
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import poste from "@geoalgeria/poste";
|
|
21
|
+
|
|
22
|
+
const offices = poste.postOffices(); // 3,908
|
|
23
|
+
const atms = poste.atms(); // 2,026
|
|
24
|
+
|
|
25
|
+
// Post offices in a commune (joins GeoAlgeria's code_commune)
|
|
26
|
+
const inAdrar = offices.filter((o) => o.commune_code === "0101");
|
|
27
|
+
|
|
28
|
+
// Nearest ATM? Everything has lat/lng to compute against.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## What you can build
|
|
32
|
+
|
|
33
|
+
- **Postal-code validation & lookup** — every office carries its real `postal_code`.
|
|
34
|
+
- **Branch / ATM locators** — coordinates on (almost) every record, ready for distance sorting or a map.
|
|
35
|
+
- **Fintech & logistics** — match addresses to the nearest post office or GAB.
|
|
36
|
+
- **Maps** — drop-in GeoJSON point layers for the whole postal network.
|
|
37
|
+
|
|
38
|
+
## What's inside
|
|
5
39
|
|
|
6
40
|
| Dataset | Count | Notes |
|
|
7
41
|
| --- | --- | --- |
|
|
8
|
-
| Post offices | **3,908** | each with its own postal code (`
|
|
42
|
+
| Post offices | **3,908** | each with its own postal code (`postal_code`) |
|
|
9
43
|
| ATMs | **2,026** | Algérie Poste GAB network |
|
|
10
|
-
| Distinct postal codes | **3,908** | one per office |
|
|
11
44
|
|
|
12
|
-
##
|
|
45
|
+
## Formats
|
|
13
46
|
|
|
14
|
-
|
|
15
|
-
(<https://baridimap.poste.dz>):
|
|
47
|
+
The npm package ships the **JSON** (importable directly):
|
|
16
48
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
`geoalgeria` package at `packages/dataset/data/poste/`, so the two never drift —
|
|
23
|
-
this package is the canonical source. Re-fetch periodically — Algérie Poste
|
|
24
|
-
updates offices and, eventually, the post-2025 wilaya reorganization (BaridiMap
|
|
25
|
-
currently still files offices under the 58-wilaya scheme, so new wilayas 59–69
|
|
26
|
-
appear under their mother wilaya).
|
|
49
|
+
```js
|
|
50
|
+
import offices from "@geoalgeria/poste/data/postoffices.json" with { type: "json" };
|
|
51
|
+
// or via CDN, no install:
|
|
52
|
+
// https://cdn.jsdelivr.net/npm/@geoalgeria/poste/data/postoffices.json
|
|
53
|
+
```
|
|
27
54
|
|
|
28
|
-
|
|
55
|
+
**CSV and GeoJSON** are in the repo under [`data/`](data) and bundled in every
|
|
56
|
+
[GitHub Release](https://github.com/yasserstudio/geoalgeria/releases):
|
|
29
57
|
|
|
30
58
|
```
|
|
31
59
|
data/
|
|
32
|
-
postoffices.json
|
|
33
|
-
atms.json
|
|
34
|
-
metadata.json
|
|
35
|
-
csv/postoffices.csv
|
|
60
|
+
postoffices.json # 3,908 offices (array)
|
|
61
|
+
atms.json # 2,026 ATMs (array)
|
|
62
|
+
metadata.json # source, counts, generated_at
|
|
63
|
+
csv/postoffices.csv # repo + Release bundle (not in npm tarball)
|
|
36
64
|
csv/atms.csv
|
|
37
|
-
geojson/postoffices.geojson
|
|
65
|
+
geojson/postoffices.geojson # Point features (records with coordinates)
|
|
38
66
|
geojson/atms.geojson
|
|
39
67
|
```
|
|
40
68
|
|
|
41
|
-
> GeoJSON
|
|
42
|
-
>
|
|
43
|
-
>
|
|
44
|
-
> (the source API does not provide one).
|
|
69
|
+
> GeoJSON includes only records that have coordinates — a handful of offices and
|
|
70
|
+
> ATMs report no `lat`/`lng` and are omitted there (but remain in JSON/CSV). ATM
|
|
71
|
+
> records have no `commune_code` (the source API doesn't provide one).
|
|
45
72
|
|
|
46
73
|
## Record shapes
|
|
47
74
|
|
|
@@ -54,7 +81,6 @@ data/
|
|
|
54
81
|
"name_ar": "أدرار م ر",
|
|
55
82
|
"class": "CE",
|
|
56
83
|
"postal_code": "01000",
|
|
57
|
-
"postal_code_old": null,
|
|
58
84
|
"address": "ADRAR CENTRE RUE DES MARYTIM",
|
|
59
85
|
"commune_code": "0101",
|
|
60
86
|
"commune_fr": "ADRAR",
|
|
@@ -67,46 +93,29 @@ data/
|
|
|
67
93
|
}
|
|
68
94
|
```
|
|
69
95
|
|
|
70
|
-
`class` is the office category (`CE`, `R1`–`R4`, `HC`, `GA`). `commune_code`
|
|
71
|
-
|
|
72
|
-
`code_commune` field.
|
|
73
|
-
|
|
74
|
-
**ATM**
|
|
75
|
-
|
|
76
|
-
```json
|
|
77
|
-
{
|
|
78
|
-
"id": "1165",
|
|
79
|
-
"name": "AOULEF",
|
|
80
|
-
"status": "1",
|
|
81
|
-
"postal_code": "01003",
|
|
82
|
-
"postal_code_old": null,
|
|
83
|
-
"address": null,
|
|
84
|
-
"commune_fr": "AOULEF",
|
|
85
|
-
"commune_ar": "أولف",
|
|
86
|
-
"wilaya_code": "01",
|
|
87
|
-
"wilaya_fr": "ADRAR",
|
|
88
|
-
"wilaya_ar": "أدرار",
|
|
89
|
-
"lat": 26.9728317,
|
|
90
|
-
"lng": 1.07709
|
|
91
|
-
}
|
|
92
|
-
```
|
|
96
|
+
`class` is the office category (`CE`, `R1`–`R4`, `HC`, `GA`). `commune_code` is
|
|
97
|
+
Algérie Poste's 4-digit commune code, which joins to GeoAlgeria's `code_commune`.
|
|
93
98
|
|
|
94
|
-
|
|
99
|
+
**ATM** — same shape, keyed by `id`/`name`/`postal_code`/`wilaya_*` with `lat`/`lng`; no `commune_code`.
|
|
95
100
|
|
|
96
|
-
|
|
97
|
-
import poste from "@geoalgeria/poste";
|
|
101
|
+
## Need the administrative divisions too?
|
|
98
102
|
|
|
99
|
-
|
|
100
|
-
|
|
103
|
+
If you also need wilayas, dairas, and communes, use the main
|
|
104
|
+
**[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** package — it mirrors
|
|
105
|
+
this postal data in and exposes `postOffices` / `atms` alongside the full
|
|
106
|
+
division dataset. Use `@geoalgeria/poste` when you *only* need postal/banking data.
|
|
101
107
|
|
|
102
|
-
|
|
103
|
-
const inCommune = offices.filter((o) => o.commune_code === "1731");
|
|
104
|
-
```
|
|
108
|
+
## Source
|
|
105
109
|
|
|
106
|
-
|
|
110
|
+
Data comes from **Algérie Poste** via the public BaridiMap API
|
|
111
|
+
(<https://baridimap.poste.dz>). Run `npm run fetch` to regenerate every output
|
|
112
|
+
from the live API; the same run mirrors the data into the `geoalgeria` package so
|
|
113
|
+
the two never drift (this package is the canonical source). Re-fetch periodically
|
|
114
|
+
— BaridiMap still files offices under the 58-wilaya scheme, so new wilayas 59–69
|
|
115
|
+
currently appear under their mother wilaya.
|
|
107
116
|
|
|
108
117
|
## License & attribution
|
|
109
118
|
|
|
110
|
-
Code is MIT. The underlying data is © **Algérie Poste
|
|
111
|
-
|
|
112
|
-
|
|
119
|
+
Code is [MIT](LICENSE). The underlying data is © **Algérie Poste**, redistributed
|
|
120
|
+
for reference and to power [GeoAlgeria](https://geoalgeria.com). Verify against
|
|
121
|
+
Algérie Poste for authoritative, real-time information.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@geoalgeria/poste",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Algeria post offices (3908) and ATMs (2026) — real postal codes, bilingual names, coordinates, commune/wilaya linkage. Sourced from Algérie Poste (baridimap.poste.dz). JSON, CSV, GeoJSON.",
|
|
6
6
|
"main": "index.js",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
37
|
"bugs": {
|
|
38
|
-
"url": "https://github.com/yasserstudio/geoalgeria
|
|
38
|
+
"url": "https://github.com/yasserstudio/geoalgeria/issues"
|
|
39
39
|
},
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
|
42
|
-
"url": "git+https://github.com/yasserstudio/geoalgeria.
|
|
42
|
+
"url": "git+https://github.com/yasserstudio/geoalgeria.git",
|
|
43
43
|
"directory": "packages/poste"
|
|
44
44
|
},
|
|
45
45
|
"homepage": "https://geoalgeria.com",
|