@geoalgeria/poste 1.1.0 → 2.1.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/LICENSE +1 -1
- package/README.ar.md +148 -0
- package/README.fr.md +149 -0
- package/README.md +43 -25
- package/data/atms.json +26602 -22550
- package/data/csv/atms.csv +2027 -0
- package/data/csv/postoffices.csv +3909 -0
- package/data/geojson/atms.geojson +54572 -0
- package/data/geojson/postoffices.geojson +109302 -0
- package/data/metadata.json +45 -7
- package/data/postoffices.json +57655 -53426
- package/dataset-metadata.json +68 -0
- package/package.json +4 -1
- package/types/index.d.ts +110 -47
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2025 Yasser's Studio (https://yasser.studio)
|
|
3
|
+
Copyright (c) 2025-2026 Yasser's Studio (https://yasser.studio)
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.ar.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
[English](README.md) | [Français](README.fr.md) | **العربية**
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
# @geoalgeria/poste
|
|
6
|
+
|
|
7
|
+
**كل مكاتب بريد وأجهزة الصراف الآلي لبريد الجزائر، كبيانات قابلة للتثبيت.**
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
10
|
+
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
3,908 مكتب بريد و2,026 جهاز صراف آلي عبر الجزائر – مع **أكواد بريدية حقيقية**، وأسماء ثنائية اللغة (فرنسية / عربية)، وإحداثيات GPS، وربط بالبلدية/الولاية. مصدرها بريد الجزائر، متوفرة بصيغ JSON وCSV وGeoJSON. جزء من [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @geoalgeria/poste
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import poste from "@geoalgeria/poste";
|
|
23
|
+
|
|
24
|
+
const offices = poste.postOffices(); // 3,908
|
|
25
|
+
const atms = poste.atms(); // 2,026
|
|
26
|
+
|
|
27
|
+
// مكاتب البريد في بلدية (ربط عبر code_commune الخاص بـ GeoAlgeria)
|
|
28
|
+
const inAdrar = offices.filter((o) => o.commune_code === "0101");
|
|
29
|
+
|
|
30
|
+
// أقرب صراف آلي؟ كل سجل يحتوي على lat/lng للحسابات.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## ما يمكنك بناؤه
|
|
34
|
+
|
|
35
|
+
- **التحقق من الأكواد البريدية والبحث عنها** – كل مكتب يحمل `postal_code` الحقيقي الخاص به.
|
|
36
|
+
- **محددات مواقع المكاتب / أجهزة الصراف الآلي** – إحداثيات على (تقريبًا) كل سجل، جاهزة للترتيب حسب المسافة أو العرض على الخريطة.
|
|
37
|
+
- **التكنولوجيا المالية والخدمات اللوجستية** – مطابقة العناوين مع أقرب مكتب بريد أو صراف آلي.
|
|
38
|
+
- **خرائط** – طبقات نقاط GeoJSON جاهزة للاستخدام لشبكة البريد بالكامل.
|
|
39
|
+
|
|
40
|
+
## المحتوى
|
|
41
|
+
|
|
42
|
+
| مجموعة البيانات | العدد | ملاحظات |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| مكاتب البريد | **3,908** | كل مكتب بكوده البريدي الخاص (`postal_code`) |
|
|
45
|
+
| أجهزة الصراف الآلي | **2,026** | شبكة GAB لبريد الجزائر |
|
|
46
|
+
|
|
47
|
+
## الصيغ
|
|
48
|
+
|
|
49
|
+
حزمة npm تحتوي على **JSON** (قابلة للاستيراد مباشرة):
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
import offices from "@geoalgeria/poste/data/postoffices.json" with { type: "json" };
|
|
53
|
+
// أو عبر CDN، بدون تثبيت:
|
|
54
|
+
// https://cdn.jsdelivr.net/npm/@geoalgeria/poste/data/postoffices.json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
المحمّلات وأشكال السجلات **مُنمّطة** بالكامل – تعريفات TypeScript مضمنة في الحزمة:
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import poste, { type PostOffice, type Atm } from "@geoalgeria/poste";
|
|
61
|
+
const offices: PostOffice[] = poste.postOffices();
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
ملفات **CSV وGeoJSON** موجودة في المستودع تحت [`data/`](data) ومضمنة في كل
|
|
65
|
+
[إصدار على GitHub](https://github.com/yasserstudio/geoalgeria/releases):
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
data/
|
|
69
|
+
postoffices.json # 3,908 مكتب (مصفوفة)
|
|
70
|
+
atms.json # 2,026 صراف آلي (مصفوفة)
|
|
71
|
+
metadata.json # الأعداد، المصادر، الترخيص، updated
|
|
72
|
+
csv/postoffices.csv # المستودع + حزمة الإصدار (غير مضمن في حزمة npm)
|
|
73
|
+
csv/atms.csv
|
|
74
|
+
geojson/postoffices.geojson # كيانات نقطية (سجلات ذات إحداثيات)
|
|
75
|
+
geojson/atms.geojson
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
> GeoJSON يتضمن فقط السجلات التي تحتوي على إحداثيات – 16 مكتبًا و5 أجهزة صراف
|
|
79
|
+
> آلي لا تُبلّغ عن `lat`/`lng` وتُحذف منه (لكنها تبقى في JSON/CSV، مع
|
|
80
|
+
> `geo_precision`/`geo_method` بقيمة `null`). سجلات أجهزة الصراف الآلي تحمل
|
|
81
|
+
> `commune_code` بقيمة `null` (واجهة API المصدر لا تحلّ كود بلدية لأجهزة
|
|
82
|
+
> الصراف الآلي).
|
|
83
|
+
|
|
84
|
+
## أشكال السجلات
|
|
85
|
+
|
|
86
|
+
**مكتب بريد**
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"id": "1",
|
|
91
|
+
"name": "ADRAR RP",
|
|
92
|
+
"name_ar": "أدرار م ر",
|
|
93
|
+
"wilaya_code": "01",
|
|
94
|
+
"commune_code": "0101",
|
|
95
|
+
"commune": "ADRAR",
|
|
96
|
+
"commune_ar": "أدرار",
|
|
97
|
+
"lat": 27.8708439,
|
|
98
|
+
"lng": -0.2871417,
|
|
99
|
+
"geo_precision": "exact",
|
|
100
|
+
"geo_method": "baridimap",
|
|
101
|
+
"source": "baridimap",
|
|
102
|
+
"class": "CE",
|
|
103
|
+
"postal_code": "01000",
|
|
104
|
+
"postal_code_old": null,
|
|
105
|
+
"address": "ADRAR CENTRE RUE DES MARYTIM"
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`class` هو تصنيف المكتب (`CE`، `R1`–`R4`، `HC`، `GA`). `commune_code` هو
|
|
110
|
+
كود ONS الموحّد المكوّن من 4 أرقام، والذي يرتبط بـ `code_commune` الخاص بـ
|
|
111
|
+
GeoAlgeria. عندما ينشر بريد الجزائر قيمة أصلية مختلفة، يحتفظ بها الحقل الاختياري
|
|
112
|
+
`source_commune_code` دون تغيير. `geo_precision` تكون `"exact"` (أو `null` إلى جانب
|
|
113
|
+
`lat`/`lng` عندما لا يكون المكتب مُرمّزًا جغرافيًا)؛ `geo_method` يحدد كيفية
|
|
114
|
+
الحصول على الإحداثية.
|
|
115
|
+
|
|
116
|
+
**جهاز صراف آلي** – نفس الشكل، مُعرّف بـ `id`/`name`/`wilaya_code`/`postal_code`
|
|
117
|
+
مع `lat`/`lng`، بالإضافة إلى حقل `status` (`"OPEN"`، `"CLOSED (OFFLINE)"`، أو
|
|
118
|
+
قيمة المصدر غير الموثقة `"1"`)؛ `commune_code` و`address` تكون دائمًا `null`
|
|
119
|
+
(المصدر لا يحلّهما لأجهزة الصراف الآلي).
|
|
120
|
+
|
|
121
|
+
## هل تحتاج التقسيمات الإدارية أيضًا؟
|
|
122
|
+
|
|
123
|
+
إذا كنت تحتاج أيضًا الولايات والدوائر والبلديات، استخدم الحزمة الرئيسية
|
|
124
|
+
**[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** – فهي تدمج
|
|
125
|
+
بيانات البريد هذه وتوفر `postOffices` / `atms` إلى جانب مجموعة بيانات
|
|
126
|
+
التقسيمات الكاملة. استخدم `@geoalgeria/poste` عندما تحتاج *فقط* البيانات
|
|
127
|
+
البريدية/المصرفية.
|
|
128
|
+
|
|
129
|
+
## المصدر
|
|
130
|
+
|
|
131
|
+
البيانات مصدرها **بريد الجزائر** عبر واجهة API العامة لـ BaridiMap
|
|
132
|
+
(<https://baridimap.poste.dz>). نفّذ `npm run fetch` لإعادة توليد جميع
|
|
133
|
+
المخرجات من واجهة API المباشرة؛ نفس العملية تعكس البيانات في حزمة `geoalgeria`
|
|
134
|
+
حتى لا يحدث اختلاف بينهما أبدًا (هذه الحزمة هي المصدر المرجعي). أعد التشغيل
|
|
135
|
+
دوريًا – BaridiMap لا يزال يصنف المكاتب وفق نظام 58 ولاية، لذا الولايات
|
|
136
|
+
الجديدة 59–69 تظهر حاليًا تحت ولاياتها الأم.
|
|
137
|
+
|
|
138
|
+
## الترخيص والإسناد
|
|
139
|
+
|
|
140
|
+
الشفرة البرمجية مرخصة بموجب [MIT](LICENSE). البيانات الأساسية © **بريد الجزائر**،
|
|
141
|
+
أُعيد توزيعها كمرجع ولتشغيل [GeoAlgeria](https://geoalgeria.com). تحقق من
|
|
142
|
+
بريد الجزائر للحصول على معلومات رسمية ومحدّثة.
|
|
143
|
+
|
|
144
|
+
[توثيق API ومرجع الحقول →](https://geoalgeria.com/data/docs/poste) · [تصفح جميع الحزم →](https://geoalgeria.com/data)
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
من تطوير [Yasser's Studio](https://yasser.studio) · [LinkedIn](https://www.linkedin.com/in/yasserberrehail/) · [X](https://x.com/yassersstudio) · [hello@yasser.studio](mailto:hello@yasser.studio)
|
package/README.fr.md
ADDED
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
[English](README.md) | **Français** | [العربية](README.ar.md)
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+
# @geoalgeria/poste
|
|
6
|
+
|
|
7
|
+
**Chaque bureau et distributeur d'Algérie Poste, sous forme de données installables.**
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
10
|
+
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
11
|
+
[](LICENSE)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
3 908 bureaux de poste et 2 026 distributeurs automatiques (DAB) à travers l'Algérie – avec de **vrais codes postaux**, des noms bilingues (français / arabe), des coordonnées GPS et un rattachement commune/wilaya. Données issues d'Algérie Poste, distribuées en JSON, CSV et GeoJSON. Fait partie de [GeoAlgeria](https://github.com/yasserstudio/geoalgeria).
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npm install @geoalgeria/poste
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
import poste from "@geoalgeria/poste";
|
|
23
|
+
|
|
24
|
+
const offices = poste.postOffices(); // 3 908
|
|
25
|
+
const atms = poste.atms(); // 2 026
|
|
26
|
+
|
|
27
|
+
// Bureaux de poste dans une commune (jointure sur code_commune de GeoAlgeria)
|
|
28
|
+
const inAdrar = offices.filter((o) => o.commune_code === "0101");
|
|
29
|
+
|
|
30
|
+
// Le DAB le plus proche ? Chaque enregistrement a lat/lng pour vos calculs.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Ce que vous pouvez construire
|
|
34
|
+
|
|
35
|
+
- **Validation et recherche de codes postaux** – chaque bureau porte son vrai `postal_code`.
|
|
36
|
+
- **Localisateurs de bureaux / DAB** – coordonnées sur (presque) chaque enregistrement, prêtes pour le tri par distance ou l'affichage sur carte.
|
|
37
|
+
- **Fintech et logistique** – faites correspondre les adresses au bureau de poste ou au GAB le plus proche.
|
|
38
|
+
- **Cartes** – couches de points GeoJSON prêtes à l'emploi pour l'ensemble du réseau postal.
|
|
39
|
+
|
|
40
|
+
## Contenu
|
|
41
|
+
|
|
42
|
+
| Jeu de données | Nombre | Notes |
|
|
43
|
+
| --- | --- | --- |
|
|
44
|
+
| Bureaux de poste | **3 908** | chacun avec son propre code postal (`postal_code`) |
|
|
45
|
+
| DAB | **2 026** | Réseau GAB d'Algérie Poste |
|
|
46
|
+
|
|
47
|
+
## Formats
|
|
48
|
+
|
|
49
|
+
Le paquet npm contient le **JSON** (importable directement) :
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
import offices from "@geoalgeria/poste/data/postoffices.json" with { type: "json" };
|
|
53
|
+
// ou via CDN, sans installation :
|
|
54
|
+
// https://cdn.jsdelivr.net/npm/@geoalgeria/poste/data/postoffices.json
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Les chargeurs et les structures d'enregistrements sont entièrement **typés** – les définitions TypeScript sont incluses dans le paquet :
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import poste, { type PostOffice, type Atm } from "@geoalgeria/poste";
|
|
61
|
+
const offices: PostOffice[] = poste.postOffices();
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Les fichiers **CSV et GeoJSON** sont dans le dépôt sous [`data/`](data) et inclus dans chaque
|
|
65
|
+
[Release GitHub](https://github.com/yasserstudio/geoalgeria/releases) :
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
data/
|
|
69
|
+
postoffices.json # 3 908 bureaux (tableau)
|
|
70
|
+
atms.json # 2 026 DAB (tableau)
|
|
71
|
+
metadata.json # comptages, sources, licence, updated
|
|
72
|
+
csv/postoffices.csv # dépôt + bundle Release (pas dans le tarball npm)
|
|
73
|
+
csv/atms.csv
|
|
74
|
+
geojson/postoffices.geojson # Entités Point (enregistrements avec coordonnées)
|
|
75
|
+
geojson/atms.geojson
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
> Le GeoJSON n'inclut que les enregistrements ayant des coordonnées – 16
|
|
79
|
+
> bureaux et 5 DAB ne rapportent pas de `lat`/`lng` et en sont absents (mais
|
|
80
|
+
> restent dans JSON/CSV, avec `geo_precision`/`geo_method` à `null`). Les
|
|
81
|
+
> enregistrements de DAB portent `commune_code` à `null` (l'API source ne
|
|
82
|
+
> résout pas de code commune pour les DAB).
|
|
83
|
+
|
|
84
|
+
## Structure des enregistrements
|
|
85
|
+
|
|
86
|
+
**Bureau de poste**
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"id": "1",
|
|
91
|
+
"name": "ADRAR RP",
|
|
92
|
+
"name_ar": "أدرار م ر",
|
|
93
|
+
"wilaya_code": "01",
|
|
94
|
+
"commune_code": "0101",
|
|
95
|
+
"commune": "ADRAR",
|
|
96
|
+
"commune_ar": "أدرار",
|
|
97
|
+
"lat": 27.8708439,
|
|
98
|
+
"lng": -0.2871417,
|
|
99
|
+
"geo_precision": "exact",
|
|
100
|
+
"geo_method": "baridimap",
|
|
101
|
+
"source": "baridimap",
|
|
102
|
+
"class": "CE",
|
|
103
|
+
"postal_code": "01000",
|
|
104
|
+
"postal_code_old": null,
|
|
105
|
+
"address": "ADRAR CENTRE RUE DES MARYTIM"
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`class` est la catégorie du bureau (`CE`, `R1`–`R4`, `HC`, `GA`). `commune_code`
|
|
110
|
+
est le code ONS normalisé à 4 chiffres qui se joint au `code_commune` de
|
|
111
|
+
GeoAlgeria. Quand Algérie Poste publie une valeur native différente, le champ
|
|
112
|
+
facultatif `source_commune_code` la conserve sans modification. `geo_precision` vaut `"exact"` (ou `null` avec `lat`/`lng` quand
|
|
113
|
+
le bureau n'est pas géocodé) ; `geo_method` indique comment le point a été obtenu.
|
|
114
|
+
|
|
115
|
+
**DAB** – même structure, identifié par `id`/`name`/`wilaya_code`/`postal_code`
|
|
116
|
+
avec `lat`/`lng`, plus un champ `status` (`"OPEN"`, `"CLOSED (OFFLINE)"`, ou la
|
|
117
|
+
valeur source non documentée `"1"`) ; `commune_code` et `address` sont toujours
|
|
118
|
+
`null` (la source ne les résout pas pour les DAB).
|
|
119
|
+
|
|
120
|
+
## Besoin des divisions administratives ?
|
|
121
|
+
|
|
122
|
+
Si vous avez aussi besoin des wilayas, dairas et communes, utilisez le paquet
|
|
123
|
+
principal **[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** – il
|
|
124
|
+
intègre ces données postales et expose `postOffices` / `atms` aux côtés du jeu
|
|
125
|
+
de données complet des divisions. Utilisez `@geoalgeria/poste` quand vous
|
|
126
|
+
n'avez besoin *que* des données postales/bancaires.
|
|
127
|
+
|
|
128
|
+
## Source
|
|
129
|
+
|
|
130
|
+
Les données proviennent d'**Algérie Poste** via l'API publique BaridiMap
|
|
131
|
+
(<https://baridimap.poste.dz>). Exécutez `npm run fetch` pour régénérer toutes
|
|
132
|
+
les sorties à partir de l'API en direct ; la même exécution reflète les données
|
|
133
|
+
dans le paquet `geoalgeria` pour que les deux ne divergent jamais (ce paquet est
|
|
134
|
+
la source canonique). Relancez périodiquement – BaridiMap classe toujours les
|
|
135
|
+
bureaux selon le schéma à 58 wilayas, donc les nouvelles wilayas 59–69
|
|
136
|
+
apparaissent actuellement sous leur wilaya mère.
|
|
137
|
+
|
|
138
|
+
## Licence et attribution
|
|
139
|
+
|
|
140
|
+
Le code est sous [MIT](LICENSE). Les données sous-jacentes sont © **Algérie Poste**,
|
|
141
|
+
redistribuées à titre de référence et pour alimenter
|
|
142
|
+
[GeoAlgeria](https://geoalgeria.com). Vérifiez auprès d'Algérie Poste pour des
|
|
143
|
+
informations officielles et en temps réel.
|
|
144
|
+
|
|
145
|
+
[Documentation API et référence des champs →](https://geoalgeria.com/data/docs/poste) · [Parcourir tous les paquets →](https://geoalgeria.com/data)
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
Réalisé par [Yasser's Studio](https://yasser.studio) · [LinkedIn](https://www.linkedin.com/in/yasserberrehail/) · [X](https://x.com/yassersstudio) · [hello@yasser.studio](mailto:hello@yasser.studio)
|
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
**English** | [Français](README.fr.md) | [العربية](README.ar.md)
|
|
2
|
+
|
|
1
3
|
<div align="center">
|
|
2
4
|
|
|
3
5
|
# @geoalgeria/poste
|
|
4
6
|
|
|
5
|
-
**Every Algérie Poste office and ATM
|
|
7
|
+
**Every Algérie Poste office and ATM, as data you can install.**
|
|
6
8
|
|
|
7
9
|
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
8
10
|
[](https://www.npmjs.com/package/@geoalgeria/poste)
|
|
@@ -10,7 +12,7 @@
|
|
|
10
12
|
|
|
11
13
|
</div>
|
|
12
14
|
|
|
13
|
-
3,908 post offices and 2,026 ATMs across Algeria
|
|
15
|
+
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
16
|
|
|
15
17
|
```bash
|
|
16
18
|
npm install @geoalgeria/poste
|
|
@@ -30,10 +32,10 @@ const inAdrar = offices.filter((o) => o.commune_code === "0101");
|
|
|
30
32
|
|
|
31
33
|
## What you can build
|
|
32
34
|
|
|
33
|
-
- **Postal-code validation & lookup**
|
|
34
|
-
- **Branch / ATM locators**
|
|
35
|
-
- **Fintech & logistics**
|
|
36
|
-
- **Maps**
|
|
35
|
+
- **Postal-code validation & lookup** – every office carries its real `postal_code`.
|
|
36
|
+
- **Branch / ATM locators** – coordinates on (almost) every record, ready for distance sorting or a map.
|
|
37
|
+
- **Fintech & logistics** – match addresses to the nearest post office or GAB.
|
|
38
|
+
- **Maps** – drop-in GeoJSON point layers for the whole postal network.
|
|
37
39
|
|
|
38
40
|
## What's inside
|
|
39
41
|
|
|
@@ -52,7 +54,7 @@ import offices from "@geoalgeria/poste/data/postoffices.json" with { type: "json
|
|
|
52
54
|
// https://cdn.jsdelivr.net/npm/@geoalgeria/poste/data/postoffices.json
|
|
53
55
|
```
|
|
54
56
|
|
|
55
|
-
The loaders and record shapes are fully **typed
|
|
57
|
+
The loaders and record shapes are fully **typed**, TypeScript definitions ship in the package:
|
|
56
58
|
|
|
57
59
|
```ts
|
|
58
60
|
import poste, { type PostOffice, type Atm } from "@geoalgeria/poste";
|
|
@@ -66,16 +68,17 @@ const offices: PostOffice[] = poste.postOffices();
|
|
|
66
68
|
data/
|
|
67
69
|
postoffices.json # 3,908 offices (array)
|
|
68
70
|
atms.json # 2,026 ATMs (array)
|
|
69
|
-
metadata.json #
|
|
71
|
+
metadata.json # counts, sources, license, updated
|
|
70
72
|
csv/postoffices.csv # repo + Release bundle (not in npm tarball)
|
|
71
73
|
csv/atms.csv
|
|
72
74
|
geojson/postoffices.geojson # Point features (records with coordinates)
|
|
73
75
|
geojson/atms.geojson
|
|
74
76
|
```
|
|
75
77
|
|
|
76
|
-
> GeoJSON includes only records that have coordinates
|
|
77
|
-
>
|
|
78
|
-
>
|
|
78
|
+
> GeoJSON includes only records that have coordinates, 16 offices and 5 ATMs
|
|
79
|
+
> report no `lat`/`lng` and are omitted there (but remain in JSON/CSV, with
|
|
80
|
+
> `geo_precision`/`geo_method` both `null`). ATM records carry `commune_code`
|
|
81
|
+
> as `null` (the source API doesn't resolve ATMs to a commune code).
|
|
79
82
|
|
|
80
83
|
## Record shapes
|
|
81
84
|
|
|
@@ -83,32 +86,41 @@ data/
|
|
|
83
86
|
|
|
84
87
|
```json
|
|
85
88
|
{
|
|
86
|
-
"id": 1,
|
|
89
|
+
"id": "1",
|
|
87
90
|
"name": "ADRAR RP",
|
|
88
91
|
"name_ar": "أدرار م ر",
|
|
89
|
-
"
|
|
90
|
-
"postal_code": "01000",
|
|
91
|
-
"address": "ADRAR CENTRE RUE DES MARYTIM",
|
|
92
|
+
"wilaya_code": "01",
|
|
92
93
|
"commune_code": "0101",
|
|
93
|
-
"
|
|
94
|
+
"commune": "ADRAR",
|
|
94
95
|
"commune_ar": "أدرار",
|
|
95
|
-
"wilaya_code": "01",
|
|
96
|
-
"wilaya_fr": "ADRAR",
|
|
97
|
-
"wilaya_ar": "أدرار",
|
|
98
96
|
"lat": 27.8708439,
|
|
99
|
-
"lng": -0.2871417
|
|
97
|
+
"lng": -0.2871417,
|
|
98
|
+
"geo_precision": "exact",
|
|
99
|
+
"geo_method": "baridimap",
|
|
100
|
+
"source": "baridimap",
|
|
101
|
+
"class": "CE",
|
|
102
|
+
"postal_code": "01000",
|
|
103
|
+
"postal_code_old": null,
|
|
104
|
+
"address": "ADRAR CENTRE RUE DES MARYTIM"
|
|
100
105
|
}
|
|
101
106
|
```
|
|
102
107
|
|
|
103
108
|
`class` is the office category (`CE`, `R1`–`R4`, `HC`, `GA`). `commune_code` is
|
|
104
|
-
|
|
109
|
+
the normalized 4-digit ONS code that joins to GeoAlgeria's `code_commune`.
|
|
110
|
+
When Algérie Poste publishes a different native value, the optional
|
|
111
|
+
`source_commune_code` preserves it unchanged.
|
|
112
|
+
`geo_precision` is `"exact"` (or `null` alongside `lat`/`lng` when the office
|
|
113
|
+
isn't geocoded); `geo_method` names how the point was obtained.
|
|
105
114
|
|
|
106
|
-
**ATM**
|
|
115
|
+
**ATM** – same shape, keyed by `id`/`name`/`wilaya_code`/`postal_code` with
|
|
116
|
+
`lat`/`lng`, plus a `status` field (`"OPEN"`, `"CLOSED (OFFLINE)"`, or the
|
|
117
|
+
undocumented source value `"1"`); `commune_code` and `address` are always
|
|
118
|
+
`null` (the source doesn't resolve them for ATMs).
|
|
107
119
|
|
|
108
120
|
## Need the administrative divisions too?
|
|
109
121
|
|
|
110
122
|
If you also need wilayas, dairas, and communes, use the main
|
|
111
|
-
**[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** package
|
|
123
|
+
**[`geoalgeria`](https://www.npmjs.com/package/geoalgeria)** package, it mirrors
|
|
112
124
|
this postal data in and exposes `postOffices` / `atms` alongside the full
|
|
113
125
|
division dataset. Use `@geoalgeria/poste` when you *only* need postal/banking data.
|
|
114
126
|
|
|
@@ -117,8 +129,8 @@ division dataset. Use `@geoalgeria/poste` when you *only* need postal/banking da
|
|
|
117
129
|
Data comes from **Algérie Poste** via the public BaridiMap API
|
|
118
130
|
(<https://baridimap.poste.dz>). Run `npm run fetch` to regenerate every output
|
|
119
131
|
from the live API; the same run mirrors the data into the `geoalgeria` package so
|
|
120
|
-
the two never drift (this package is the canonical source). Re-fetch periodically
|
|
121
|
-
|
|
132
|
+
the two never drift (this package is the canonical source). Re-fetch periodically.
|
|
133
|
+
BaridiMap still files offices under the 58-wilaya scheme, so new wilayas 59–69
|
|
122
134
|
currently appear under their mother wilaya.
|
|
123
135
|
|
|
124
136
|
## License & attribution
|
|
@@ -126,3 +138,9 @@ currently appear under their mother wilaya.
|
|
|
126
138
|
Code is [MIT](LICENSE). The underlying data is © **Algérie Poste**, redistributed
|
|
127
139
|
for reference and to power [GeoAlgeria](https://geoalgeria.com). Verify against
|
|
128
140
|
Algérie Poste for authoritative, real-time information.
|
|
141
|
+
|
|
142
|
+
[API docs & field reference →](https://geoalgeria.com/data/docs/poste) · [Browse all packages →](https://geoalgeria.com/data)
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
Made by [Yasser's Studio](https://yasser.studio) · [LinkedIn](https://www.linkedin.com/in/yasserberrehail/) · [X](https://x.com/yassersstudio) · [hello@yasser.studio](mailto:hello@yasser.studio)
|