**English** | [Français](README.fr.md) | [العربية](README.ar.md)

# GeoAlgeria

> The Algerian geodata package — 69 wilayas, 555 dairas, 1,528 communes. One `npm install` away.

Still copy-pasting wilaya lists from PDFs? Still using datasets stuck at 48 wilayas? GeoAlgeria is the first CI-validated, npm-installable Algerian geodata — updated for the 2026 reform. JSON, CSV, GeoJSON, SQL, TypeScript.

[![CI](https://github.com/yasserstudio/geoalgeria/actions/workflows/ci.yml/badge.svg)](https://github.com/yasserstudio/geoalgeria/actions/workflows/ci.yml)
[![npm](https://img.shields.io/npm/v/geoalgeria)](https://www.npmjs.com/package/geoalgeria)
[![npm downloads](https://img.shields.io/npm/dm/geoalgeria)](https://www.npmjs.com/package/geoalgeria)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

---

## Quick Facts

Algeria has **69 wilayas** (provinces), **564 dairas** (districts), and **1,541 communes** (municipalities), official since **April 2026**. This reflects two territorial reforms: Law 19-12 (2019, added wilayas 49–58) and Law n° 26-06 of 4 April 2026 (adding wilayas 59–69), published in the [*Journal Officiel* n° 25 of 5 April 2026](https://www.joradp.dz/FTP/jo-francais/2026/F2026040.pdf). GeoAlgeria models all 69 post-reform wilayas with postal codes, GPS coordinates, and bilingual names. This release ships **1,528 commune records** and **555 dairas**: a set of records carrying source data issues was removed, and reconciliation toward the official 1,541 is in progress (see the [changelog](CHANGELOG.md)). Last validated: June 2026.

---

## Why GeoAlgeria?

Tired of datasets that still think Algeria has 48 wilayas? Same.

| Feature | geoalgeria | leblad | algeria-cities |
|---------|:-:|:-:|:-:|
| All 69 wilayas (2026 reform) | ✅ | ❌ (58) | ✅ |
| Dairas as first-class entities | ✅ | ❌ | ❌ |
| Postal codes per commune | ✅ | ✅ | ❌ |
| Coordinates per commune | ✅ | ❌ | ✅ |
| E-commerce ready (flat, denormalized) | ✅ | ❌ | ❌ |
| Delivery zone templates | ✅ | ❌ | ❌ |
| npm package + TypeScript | ✅ | ✅ | ❌ |
| SQL dump (MySQL/PG/SQLite) | ✅ | ❌ | ✅ |
| CI-validated on every commit | ✅ | ❌ | ❌ |
| GeoJSON export | ✅ | ❌ | ✅ |
| Arabic + French bilingual | ✅ | ✅ | ✅ |
| Last updated | 2026 | 2021 | 2023 |

Ready to try it? Jump to [Install](#install) or grab the [raw JSON](data/ecommerce/communes.json) directly.

Also referred to as: Algerian provinces (wilayas), districts (dairas), municipalities (communes), cities of Algeria, code postal Algérie, liste des communes d'Algérie JSON, Algeria GeoJSON, wilayas 2026, base de données wilayas Algérie, Algeria administrative divisions dataset.

---

## Who's This For?

- **E-commerce devs** — address forms, shipping zone config, postal code validation
- **Backend engineers** — seed your DB with one SQL file
- **Frontend devs** — cascading dropdowns (wilaya → daira → commune)
- **GIS / data analysts** — GeoJSON with 1,528 point features
- **Civic tech builders** — government apps, citizen portals
- **Students & researchers** — clean, structured, well-documented data

---

## Install

```bash
npm install geoalgeria
```

```javascript
const dz = require('geoalgeria');

dz.wilayas;                    // all 69 wilayas
dz.communes;                   // all 1,528 communes
dz.dairas;                     // all 555 dairas
dz.ecommerce;                  // flat dataset for address forms
dz.postOffices;                // 3,908 Algérie Poste offices
dz.atms;                       // 2,026 ATMs

dz.getWilaya(16);              // { name_fr: "Alger", name_ar: "الجزائر", ... }
dz.getCommunesByWilaya(16);    // 57 communes in Algiers
dz.getDairasByWilaya(16);      // dairas in Algiers
dz.findCommune('Oran');        // search by name (FR or AR)
dz.findByPostalCode('16000');  // lookup by postal code
dz.getPostOfficesByCommune(1731); // post offices in a commune (by code_commune)
```

TypeScript types included out of the box.

**Using this in production?** [Tell us about it](https://github.com/yasserstudio/geoalgeria/discussions) — we feature community projects in the README.

---

## Use Without npm

### CDN (no install needed)

```html
<script>
  fetch('https://cdn.jsdelivr.net/npm/geoalgeria/data/ecommerce/communes.json')
    .then(r => r.json())
    .then(communes => { /* build your dropdown */ });
</script>
```

### E-commerce / address forms

Grab `data/ecommerce/communes.json` — flat, denormalized, no joins:

```json
{
  "id": 586,
  "commune_name_fr": "Aïn El Ibel",
  "commune_name_ar": "عين الإبل",
  "daira_name_fr": "Aïn El Ibel",
  "wilaya_code": 17,
  "wilaya_name_fr": "Djelfa",
  "wilaya_name_ar": "الجلفة",
  "postal_code": "17001"
}
```

### Database seeding

Download `data/sql/full.sql` from this repo, then:

```bash
# PostgreSQL
psql -d mydb -f full.sql

# MySQL
mysql mydb < full.sql

# SQLite
sqlite3 mydb.sqlite < full.sql
```

### GIS / Mapping

Download `data/geojson/communes.geojson` from this repo — standard GeoJSON, works with Leaflet, Mapbox, QGIS, etc.

> **Note:** the npm package ships JSON only (to stay lightweight). The **CSV, GeoJSON, and SQL** exports live in the repo under `data/` and are bundled as a zip on every [GitHub Release](https://github.com/yasserstudio/geoalgeria/releases).

---

## All Files

| File | Format | Records | Best for |
|------|--------|---------|----------|
| `data/algeria.json` | JSON | 69 wilayas + communes | Single-file usage |
| `data/wilayas.json` | JSON | 69 | Wilaya list only |
| `data/dairas.json` | JSON | 555 | Daira list with commune counts |
| `data/communes_w*.json` | JSON | 1,528 | Detailed commune data |
| `data/csv/wilayas.csv` | CSV | 69 | Spreadsheets, imports |
| `data/csv/communes.csv` | CSV | 1,528 | Spreadsheets, imports |
| `data/geojson/wilayas.geojson` | GeoJSON | 69 | Maps, GIS |
| `data/geojson/communes.geojson` | GeoJSON | 1,528 | Maps, GIS |
| `data/sql/full.sql` | SQL | 69 + 1,528 | Normalized database |
| `data/ecommerce/communes.json` | JSON | 1,528 | Address forms, dropdowns |
| `data/ecommerce/communes.csv` | CSV | 1,528 | Flat import |
| `data/ecommerce/communes.sql` | SQL | 1,528 | Single-table database |
| `data/delivery/*.json` | JSON | 69 per provider | Shipping zone calculation |
| `data/poste/postoffices.json` | JSON | 3,908 | Post offices (real codes, coords) |
| `data/poste/atms.json` | JSON | 2,026 | ATM locations |
| `data/poste/csv/*`, `data/poste/geojson/*` | CSV/GeoJSON | — | Postal data for spreadsheets / maps |

> `data/poste/` is sourced from [Algérie Poste](https://baridimap.poste.dz). `commune_code` joins to each commune's `code_commune`.

## Schema

See [`data/README.md`](data/README.md) for full field documentation.

---

## Contributing

See [CONTRIBUTING.md](https://github.com/yasserstudio/geoalgeria/blob/main/CONTRIBUTING.md). We welcome:

- Data corrections (with official sources)
- Missing commune coordinates (20 remaining)
- Delivery zone data from real carrier accounts (Yalidine, ZR Express, Maystro)
- New export formats (XML, YAML, PHP arrays, etc.)
- Translations and transliteration fixes

**First time contributing?** Look for issues labeled `good first issue` — many just need adding coordinates for a single commune.

---

## Versioning

This dataset uses [Semantic Versioning](https://semver.org/). See [CHANGELOG.md](CHANGELOG.md).

---

## The GeoAlgeria ecosystem

`geoalgeria` is the administrative base layer. Domain datasets install alongside it and join on `wilaya_code`:

| Package | What |
| --- | --- |
| [`@geoalgeria/poste`](https://www.npmjs.com/package/@geoalgeria/poste) | Post offices & ATMs (Algérie Poste) |
| [`@geoalgeria/emploi`](https://www.npmjs.com/package/@geoalgeria/emploi) | Employment agencies (ANEM: AWEM + ALEM) |
| [`@geoalgeria/mobilis`](https://www.npmjs.com/package/@geoalgeria/mobilis) | Mobilis agencies & approved points of sale |
| [`@geoalgeria/telecom`](https://www.npmjs.com/package/@geoalgeria/telecom) | Cross-operator 5G coverage (Djezzy, Mobilis, Ooredoo) |
| [`@geoalgeria/aviation`](https://www.npmjs.com/package/@geoalgeria/aviation) | Civil airports with ICAO codes (ANAC) |
| [`@geoalgeria/banques`](https://www.npmjs.com/package/@geoalgeria/banques) | Licensed banks, institutions & branches (RIB/SWIFT) |
| [`@geoalgeria/livraison`](https://www.npmjs.com/package/@geoalgeria/livraison) | Delivery carriers & geocoded stop-desks |
| [`@geoalgeria/jeunesse`](https://www.npmjs.com/package/@geoalgeria/jeunesse) | Youth & sports institutions (Ministry of Youth and Sports) |
| [`@geoalgeria/enseignement-superieur`](https://www.npmjs.com/package/@geoalgeria/enseignement-superieur) | Higher-education network — universities, grandes écoles, ENS, centres (MESRS) |
| [`@geoalgeria/tourisme`](https://www.npmjs.com/package/@geoalgeria/tourisme) | Tourism infrastructure — hotels, attractions, historic sites, thermal springs, parks (ASAL, OSM, Wikidata) |
| [`@geoalgeria/formation-professionnelle`](https://www.npmjs.com/package/@geoalgeria/formation-professionnelle) | Vocational training — CFPA, INSFP, IFEP, private centers (MFEP / takwin.dz) |
| [`@geoalgeria/sports`](https://www.npmjs.com/package/@geoalgeria/sports) | Sports facilities — stadiums, pools, courts, tracks (Ministry of Youth and Sports) |
| [`@geoalgeria/djezzy`](https://www.npmjs.com/package/@geoalgeria/djezzy) | Djezzy boutiques — geocoded retail stores with category & hours (djezzy.dz) |
| [`@geoalgeria/mosquees`](https://www.npmjs.com/package/@geoalgeria/mosquees) | Mosques — Wikidata + OpenStreetMap composite, bilingual, all 69 wilayas |
| [`@geoalgeria/sante`](https://www.npmjs.com/package/@geoalgeria/sante) | Public health establishments — EPH, EPSP, EHS, CHU (Ministry of Health), bilingual, geocoded via OSM + Wikidata |
| [`@geoalgeria/culture`](https://www.npmjs.com/package/@geoalgeria/culture) | Cultural atlas — protected sites, museums, theatres, libraries + cultural establishments (Ministry of Culture), bilingual, fully geocoded |
| [`@geoalgeria/agriculture`](https://www.npmjs.com/package/@geoalgeria/agriculture) | Agriculture-sector institutions — services directorates (DSA), forest conservations, research/training institutes, chambers of agriculture, public offices & groups (Ministry of Agriculture), bilingual, geocoded |
| [`@geoalgeria/ecoles`](https://www.npmjs.com/package/@geoalgeria/ecoles) | Schools — 11,830 primaires, CEM, lycées & préscolaires classified by cycle, bilingual, all 69 wilayas (OpenStreetMap) |
| [`@geoalgeria/gares-routieres`](https://www.npmjs.com/package/@geoalgeria/gares-routieres) | Intercity bus stations — 74 SOGRAL gares routières across 51 wilayas, geocoded with surfaces & commune/wilaya linkage |
| [`@geoalgeria/ferroviaire`](https://www.npmjs.com/package/@geoalgeria/ferroviaire) | Rail & urban transit — 692 train/tram/metro/aerial-tramway/gondola nodes (SNTF/SETRAM/SEMA), Wikidata + OpenStreetMap composite, bilingual |
| [`@geoalgeria/buses`](https://www.npmjs.com/package/@geoalgeria/buses) | Urban bus networks — 50 ETUSA (Alger) lines with termini, stop counts, communes & stations served (line-level v1) |
| [`@geoalgeria/transport`](https://www.npmjs.com/package/@geoalgeria/transport) | Transport umbrella — installs aviation + ferroviaire + gares-routieres + buses in one step |

Full list and the monorepo: [github.com/yasserstudio/geoalgeria](https://github.com/yasserstudio/geoalgeria).

---

## Built With This Data

Using geoalgeria in your project? [Open a discussion](https://github.com/yasserstudio/geoalgeria/discussions) and we'll feature it here.

---

## Support

Every star helps the next Algerian developer find clean data instead of broken PDFs. **[Star this repo](https://github.com/yasserstudio/geoalgeria)** if it saved you time.

Found wrong data? [Open an issue](https://github.com/yasserstudio/geoalgeria/issues/new/choose) — we fix it within 48h, guaranteed.

---

## Sponsor

GeoAlgeria is free and MIT. If it saves you time, [**sponsor its maintenance**](https://github.com/sponsors/yasserstudio) — sponsorships fund keeping the data current through every reform and expanding GeoAlgeria toward *all* kinds of open Algeria data.

---

## Preview

View all 69 wilayas on a map: [`algeria.geojson`](algeria.geojson) (GitHub renders this automatically)

---

## FAQ

**How many wilayas does Algeria have in 2026?**
69. The original 48, plus 10 added in 2019 (Law 19-12), plus 11 made official in April 2026 ([Law n° 26-06, *Journal Officiel* n° 25 of 5 April 2026](https://www.joradp.dz/FTP/jo-francais/2026/F2026040.pdf)). Transition period ends December 31, 2026; full autonomy from January 1, 2027.

**Where can I find a list of all Algerian communes in JSON?**
Right here — `data/ecommerce/communes.json` has all 1,528 communes in a flat, ready-to-use format.

**What are the new wilayas added in 2026?**
Wilayas 59-69 (numbered by mother wilaya code order): 59 Aflou (from Laghouat), 60 Barika (from Batna), 61 El Kantara (from Biskra), 62 Bir El Ater (from Tébessa), 63 El Aricha (from Tlemcen), 64 Ksar Chellala (from Tiaret), 65 Aïn Oussara (from Djelfa), 66 Messaad (from Djelfa), 67 Ksar El Boukhari (from Médéa), 68 Bou Saâda (from M'sila), 69 El Abiodh Sidi Cheikh (from El Bayadh).

**How can I get Algeria postal codes in JSON format?**
Install `geoalgeria` via npm or download `data/ecommerce/communes.json` directly — it includes all 1,528 postal codes mapped to commune names in French and Arabic.

**What is the best Algeria geodata package for developers?**
GeoAlgeria is the most complete option as of 2026 — it is the only npm package with all 69 wilayas, postal codes, coordinates, dairas, and delivery zone templates in one install. CI-validated on every commit.

**Liste des wilayas d'Algérie 2026 — où trouver?**
GeoAlgeria contient les 69 wilayas avec noms en français et arabe, codes postaux, et coordonnées GPS. Disponible en JSON, CSV, GeoJSON, et SQL. `npm install geoalgeria`

---

## License

MIT — free for personal and commercial use.

Made with care by [Yasser's Studio](https://yasser.studio) | [geoalgeria.com](https://geoalgeria.com)

[API docs & field reference →](https://geoalgeria.com/data/docs/geoalgeria) · [Browse all packages →](https://geoalgeria.com/data)

---

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)
