npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

geoalgeria

v2.4.1

Published

69 wilayas, 551 dairas, 1541 communes of Algeria: bilingual names, postal codes, coordinates, plus 3908 post offices & 2026 ATMs. JSON, CSV, GeoJSON, SQL, TypeScript.

Readme

English | Français | العربية

GeoAlgeria

The Algerian geodata package, 69 wilayas, 551 dairas, 1,541 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 npm npm downloads License: see LICENSE


Quick Facts

Algeria has 69 wilayas (provinces) and 1,541 communes (municipalities), official since April 2026, each wilaya divided into dairas (districts). 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. GeoAlgeria models all 69 post-reform wilayas with postal codes, GPS coordinates, and bilingual names. This release ships all 1,541 commune records and 551 dairas in the dataset. That is this dataset's own count, not an official total: no post-2026 national daira total has been published (decree 26-206 of 25 May 2026 names the chefs-lieux only), and the 564 this README used to call official included 9 phantom dairas produced by 13 duplicate commune records, as the changelog records for v1.1.2. Last validated: September 2026.

142 of the 551 are settled by decree. Executive decree n° 26-253 of 15 July 2026, published in the Journal Officiel n° 52 of 21 July 2026, fixes the communes each daira chief administers in wilayas 3, 5, 7, 12, 13, 14, 17, 26, 28, 32 and 59–69, and names 142 dairas there. It leaves the other 48 wilayas under decree n° 91-306 of 24 August 1991, whose lists this dataset holds and which come to 409. The reading of the annex is in research/_dairas/.


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 or grab the raw 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,541 point features
  • Civic tech builders – government apps, citizen portals
  • Students & researchers – clean, structured, well-documented data

Install

npm install geoalgeria
const dz = require('geoalgeria');
// or, in an ESM app or with a bundler: import dz from 'geoalgeria';

dz.wilayas;                    // all 69 wilayas
dz.communes;                   // all 1,541 communes
dz.dairas;                     // all 551 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, Former names too)
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. The default import needs esModuleInterop, because the package is CommonJS; import dz = require('geoalgeria') works without it.

A bundler (Next.js, Vite, webpack) includes all ten JSON files, the post office and ATM mirrors among them. If you need one part only, import its file on its own: import communes from 'geoalgeria/data/ecommerce/communes.json' in a bundler, or with with { type: 'json' } in plain Node.

Using this in production? Tell us about it, we feature community projects in the README.


Use Without npm

CDN (no install needed)

<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:

{
  "id": 541,
  "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": "17011"
}

A postal code is the code of the commune's principal Algérie Poste office, and its first two digits are that office's wilaya at the time the code was issued. Like code_commune, the prefix does not necessarily equal wilaya_code: Algérie Poste kept the old numbering through the 2026 reform, so Aflou is 03001 in wilaya 59. 108 of the 1,540 coded communes are in that case, all of them in wilayas 59–69.

Database seeding

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

# 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, CSV, GeoJSON and SQL since the v2 correctness pass, so data/geojson/communes.geojson is in the tarball too. The GitHub Release zip bundles the same data/ tree for people who do not use npm.


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 | 551 | Daira list with commune counts | | data/name-history.json | JSON | 210 | Former spellings of wilaya and commune names, with the text that replaced each | | data/phone-code-provenance.json | JSON | 11 | Why wilayas 59–69 carry the phone_code they carry: the official texts searched and the reason for each null | | data/wilaya-capitals.metadata.json | JSON | 69 | The chef-lieu of each wilaya, with the decree, article, item and page that fixes it | | data/osm-links.metadata.json | JSON | 1 | Coverage, tiers, join rule and Overpass snapshots behind osm_relation_id / wikidata | | data/communes_w*.json | JSON | 1,541 | Detailed commune data | | data/csv/wilayas.csv | CSV | 69 | Spreadsheets, imports | | data/csv/communes.csv | CSV | 1,541 | Spreadsheets, imports | | data/geojson/wilayas.geojson | GeoJSON | 69 | Maps, GIS | | data/geojson/communes.geojson | GeoJSON | 1,541 | Maps, GIS | | data/sql/full.sql | SQL | 69 + 1,541 | Normalized database | | data/ecommerce/communes.json | JSON | 1,541 | Address forms, dropdowns | | data/ecommerce/communes.csv | CSV | 1,541 | Flat import | | data/ecommerce/communes.sql | SQL | 1,541 | 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. commune_code is normalized to join each commune's code_commune; source_commune_code preserves a differing provider-native value.

code_commune is the unique WWCC identifier from the ONS 2021 Code Géographique National. Communes promoted into wilayas 59–69 retain their 2021 mother-wilaya prefix.

Each wilaya carries capital_commune_code, the code_commune of its capital (chef-lieu), so the capital's names are read from the commune record, and its postal code and coordinates are mirrored on the wilaya: a wilaya's postal_code is its chef-lieu's own code, which is why wilaya 59 reads 03001 and not a code of its own. It comes from the decrees that fix the chefs-lieux (n° 84-79 of 1984, n° 21-117 of 2021, n° 26-206 of 2026), never from the wilaya's name, which gets 4 of 69 wrong. Per-wilaya sources: data/wilaya-capitals.metadata.json. Every commune and wilaya also carries osm_relation_id and wikidata: the OpenStreetMap administrative relation this record is linked to (admin_level=8 for a commune, admin_level=4 for a wilaya) and that relation's own Wikidata item, so a consumer joins to OpenStreetMap or Wikidata without matching on a name. 1,540 of the 1,541 communes and all 69 wilayas carry a relation; 1,538 communes and all 69 wilayas carry a Wikidata item. Nothing is guessed: the linkage is the one the commune-centre audit decided on the relation's ref:ONS / ref tag, Overpass timestamp_osm_base 2026-09-29T12:54:47Z, plus a second tier of three communes whose relation carries the right ref:ONS code under non-standard tags and was therefore invisible to that audit's query; a relation with no wikidata tag leaves that field null, and the one commune with no commune relation at all (4703) keeps both fields null. The item is the relation's own tag in every case bar one: commune 3424's relation is tagged with a village inside the commune, so that field is null and the exclusion is recorded in the sidecar rather than the wrong item published. The two ids are on the JSON records (data/algeria.json, data/communes_w*.json, data/wilayas.json); the CSV, GeoJSON and SQL mirrors do not carry them. Coverage, the join rule and the records with no link: data/osm-links.metadata.json. Both values are OpenStreetMap-derived, so ODbL 1.0, © OpenStreetMap contributors (see NOTICE).

Schema

See data/README.md for full field documentation.


Contributing

See CONTRIBUTING.md. We welcome:

  • Data corrections (with official sources)
  • Commune-code corrections backed by an official source
  • 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. See 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 | Post offices & ATMs (Algérie Poste) | | @geoalgeria/emploi | Employment agencies (ANEM: AWEM + ALEM) | | @geoalgeria/mobilis | Mobilis agencies & approved points of sale | | @geoalgeria/telecom | Cross-operator 5G coverage (Djezzy, Mobilis, Ooredoo) | | @geoalgeria/aviation | Civil airports with ICAO codes (ANAC) | | @geoalgeria/banques | Licensed banks, institutions & branches (RIB/SWIFT) | | @geoalgeria/livraison | Delivery carriers & geocoded stop-desks | | @geoalgeria/jeunesse | Youth & sports institutions (Ministry of Youth and Sports) | | @geoalgeria/enseignement-superieur | Higher-education network – universities, grandes écoles, ENS, centres (MESRS) | | @geoalgeria/tourisme | Tourism infrastructure – hotels, attractions, historic sites, thermal springs, parks (ASAL, OSM, Wikidata) | | @geoalgeria/formation-professionnelle | Vocational training – CFPA, INSFP, IFEP, private centers (MFEP / takwin.dz) | | @geoalgeria/sports | Sports facilities – stadiums, pools, courts, tracks (Ministry of Youth and Sports) | | @geoalgeria/djezzy | Djezzy boutiques – geocoded retail stores with category & hours (djezzy.dz) | | @geoalgeria/mosquees | Mosques – Wikidata + OpenStreetMap composite, bilingual, all 69 wilayas | | @geoalgeria/sante | Public health establishments – EPH, EPSP, EHS, CHU (Ministry of Health), bilingual, geocoded via OSM + Wikidata | | @geoalgeria/cliniques | Clinics & proximity-care facilities, 1,915 polycliniques, salles de soins, centres de santé, maternités & private clinics from OpenStreetMap, classified by type, bilingual, 66 wilayas | | @geoalgeria/culture | Cultural atlas – protected sites, museums, theatres, libraries + cultural establishments (Ministry of Culture), bilingual, fully geocoded | | @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 | Schools – 11,858 primaires, CEM, lycées & préscolaires classified by cycle, bilingual, all 69 wilayas (OpenStreetMap) | | @geoalgeria/gares-routieres | Intercity bus stations – 74 SOGRAL gares routières across 52 wilayas, geocoded with surfaces & commune/wilaya linkage | | @geoalgeria/ferroviaire | Rail & urban transit – 692 train/tram/metro/aerial-tramway/gondola nodes (SNTF/SETRAM/SEMA), Wikidata + OpenStreetMap composite, bilingual | | @geoalgeria/buses | Urban bus networks – 50 ETUSA (Alger) lines with termini, stop counts, communes & stations served (line-level v1) | | @geoalgeria/industrie-pharmaceutique | Pharmaceutical manufacturers – 171 approved medicine & medical-device makers from the Ministry of Pharmaceutical Industry register, bilingual, geocoded | | @geoalgeria/pharmacies | Pharmacies (officines), 3,811 geocoded across 67 wilayas from OpenStreetMap, bilingual where named | | @geoalgeria/ooredoo | Ooredoo stores – 572 EO / City Shop / Espace Services with real coordinates; completes the telecom retail trio | | @geoalgeria/transport | Transport umbrella – installs aviation + ferroviaire + gares-routieres + buses in one step | | @geoalgeria/pharma | Pharma umbrella – installs industrie-pharmaceutique + pharmacies in one step | | @geoalgeria/protection-civile | Civil protection / fire & rescue units – 880 DGPC units across all wilayas with Arabic names, address/phone/fax & a status tier, geocoded, post-2026-reform wilaya linkage |

Full list and the monorepo: github.com/yasserstudio/geoalgeria.


Built With This Data

Using geoalgeria in your project? Open a discussion and we'll feature it here.


Support

Every star helps the next Algerian developer find clean data instead of broken PDFs. Star this repo if it saved you time.

Found wrong data? Open an issue, we fix it within 48h, guaranteed.


Sponsor

GeoAlgeria is free: MIT code and an MIT compilation, with three ODbL parts and the mirrored Algérie Poste data named below. If it saves you time, sponsor its maintenance, 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 (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). 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,541 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 Ouessara (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 maps commune names in French and Arabic to their postal codes across all 1,541 communes (1 has no citable code yet).

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.

Where can I find the 2026 list of Algeria's wilayas? GeoAlgeria carries all 69 wilayas with French and Arabic names, postal codes, and GPS coordinates. Available as JSON, CSV, GeoJSON, and SQL. npm install geoalgeria


Licence & attribution

Package code is MIT, and so is the compilation: wilayas, dairas, communes, their bilingual names, postal codes and administrative codes. Free for personal and commercial use.

Three parts of the data come from OpenStreetMap, are © OpenStreetMap contributors and are licensed under the ODbL 1.0 instead:

  • the 69 wilaya boundary polygons in data/geojson/wilaya-boundaries.geojson;
  • 323 of the 1,541 commune centre coordinates, each taken from that commune's own admin_level=8 relation (318 from its admin_centre node, 56 on 2026-09-27, 189 on 2026-09-29, 5 on 2026-10-01 and 68 on 2026-10-01 by the coordinate review, which writes a value only where independent sources vote for it, and 5 from the relation centroid in 2.1.0), wherever those values appear;
  • 6 of the 69 wilaya capital points, which are the same values again: a wilaya's coordinates are the centre of its capital commune, so wilayas 7, 16, 25, 32, 52 and 61 carry one of the coordinates above. The other 63 wilaya capital points are not OpenStreetMap-derived.

If you use or redistribute any of those parts you must attribute OpenStreetMap contributors and keep derived databases under a compatible licence.

The mirrored postal data under data/poste/ carries Algérie Poste's own terms, not the MIT License: Data © Algérie Poste; redistributed for reference, the same terms @geoalgeria/poste states. Verify against Algérie Poste for authoritative, real-time information.

Because the data is under three sets of terms, the manifest declares SEE LICENSE IN LICENSE rather than an SPDX expression. Per-part attribution and the affected rows are in NOTICE.

Made with care by Yasser's studio | geoalgeria.com

API docs & field reference → · Browse all packages →


Made by Yasser's studio · LinkedIn · X · [email protected]

GeoAlgeria is free, and it stays free. The same studio also makes maps, websites, mobile apps and open data for clients.