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/protection-civile

v1.0.4

Published

Algeria's Protection Civile (civil protection / fire & rescue) units, official-primary from the DGPC's own dataset (dgpc.dz): 880 units nationwide, Arabic names, address/phone/fax, status tier, geocoded, with post-2026-reform wilaya linkage. JSON, CSV, Ge

Readme

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

@geoalgeria/protection-civile

Algeria's Protection Civile (civil protection / fire & rescue) units, as data you can install.

npm npm downloads Code: MIT

Overview

880 Protection Civile units across every wilaya, straight from the DGPC's own dataset (dgpc.dz), each unit with an Arabic name, an address, phone and fax, a status tier (statut), and a real DGPC coordinate. This is an official-primary dataset: the DGPC is the authoritative "this unit exists here" source.

Installation

npm install @geoalgeria/protection-civile

Quick start

import {
  units,
  unitById,
  unitsByWilaya,
  unitsByStatut,
  metadata,
} from "@geoalgeria/protection-civile";

units().length; // 880

// Everything in Alger (code 16)
unitsByWilaya(16).length;

// One tier, and a single record
unitsByStatut("UNITE PRINCIPALE").length;
unitById("16-001")?.commune;

metadata().wilayas_covered; // 69

What you can build

  • A civil-protection / fire & rescue locator or map layer for Algeria
  • An emergency-response coverage analysis by wilaya
  • A base layer to join against live DGPC bulletins

What's inside

| Dataset | Count | Coordinates | Notes | | --- | --- | --- | --- | | protection-civile | 880 | all 880 | DGPC (dgpc.dz), geocoded, post-2026-reform wilaya linkage |

By status tier (statut): UNITE SECONDAIRE 444 · POSTE AVANCE 146 · UNITE DE SECTEUR 132 · UNITE PRINCIPALE 62 · SIEGE DE DIRECTION WILAYA 58 · POSTE DE SECOURS ROUTIER 20 · UNITE MARINE 15 · U.N D'INSTRUCTION ET D'INTERVENTION 1 · DIRECTION GENERALE 1 · CELLULE DE SECURITE 1

Every unit carries tel, fax and address; 780 communes were matched by name, the rest by nearest centroid.

Formats

  • data/protection-civile.json, full array (typed by types/index.d.ts)
  • data/csv/protection-civile.csv, flat CSV
  • data/geojson/protection-civile.geojson, FeatureCollection (all records)
  • data/metadata.json, counts, sources, generated date
import data from "@geoalgeria/protection-civile/data/protection-civile.json" with { type: "json" };
import type { ProtectionCivileUnit } from "@geoalgeria/protection-civile";

How the data is built

Downloaded from the DGPC's own GeoJSON (dgpc.dz/dgpc2/unite.geojson). Coordinates begin with each feature's decimal x/y; a guarded review ledger replaces six coarse points with unit-level OpenStreetMap evidence and records the public evidence URLs on the corrected rows. wilaya_code is derived by point-in-polygon against the repo's 69 post-2026-reform wilaya boundaries, then reconciled against the DGPC's own cod_wilaya (which is pre-reform, codes "01".."58"): units now inside the 11 new 2026 wilayas carry their correct new code (geometry 59..69), but where geometry and the DGPC code disagree among pre-reform codes, a border unit misfiled by a ~150 m-simplified outline, the DGPC's official code wins and the commune is re-matched there. The DGPC code is preserved verbatim in refs.dgpc_wilaya as a receipt. Commune is best-effort, the Arabic commune_1 name is matched against the geoalgeria commune set within the resolved wilaya (nearest-centroid fallback). Rebuild with npm run fetch (or --cache to rebuild from sources/protection-civile/dgpc-units.json), then run npm run review.

Known risk, carry keys. Stable public ids are carried across rebuilds by the DGPC objectid (refs.dgpc), an ArcGIS-style surrogate the DGPC could renumber on their side. The rebuild logs a carry-hit count; a sudden drop from ~880 means the surrogate was renumbered, diff the ids before committing rather than letting them re-mint.

On accuracy & coverage

This is the DGPC's complete published unit network, 880 units. Six coarse DGPC points have evidence-backed unit coordinates; 23 unresolved coincident, polygon-centroid, or coarse points remain honestly marked approximate, and 857 are exact. There is no French name in the source, so name_fr is not derived, nothing is machine-translated. Commune is name-matched best-effort; wilaya is boundary-derived, then cross-checked against the DGPC's own code: conflicts among pre-reform codes (a border unit misfiled by a simplified outline) resolve to the DGPC's official code.

The DGPC's original cod_wilaya is pre-2026-reform and is kept only as refs.dgpc_wilaya. Use wilaya_code (the geometry-derived, post-reform code) for any wilaya join.

Source & license

DGPC records © General Directorate of Civil Protection (DGPC): official government content, redistributed here for reference. There is no stated open licence; treat it as a factual public listing and attribute the DGPC. Reviewed coordinate evidence © OpenStreetMap contributors, ODbL 1.0. Wilaya/commune linkage uses the geoalgeria base dataset. Package code under MIT (see LICENSE).

Questions?

Open an issue: https://github.com/yasserstudio/geoalgeria/issues