@geoalgeria/ecoles 1.0.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.
@@ -0,0 +1,37 @@
1
+ {
2
+ "source": "OpenStreetMap (ODbL) — schools (amenity=school) and kindergartens (amenity=kindergarten) in Algeria",
3
+ "origin": "https://www.openstreetmap.org",
4
+ "license": "OpenStreetMap data is © OpenStreetMap contributors, ODbL 1.0. See README for attribution.",
5
+ "ecoles": 11830,
6
+ "named": 8640,
7
+ "by_cycle": {
8
+ "primaire": 4020,
9
+ "moyen": 2377,
10
+ "secondaire": 1574,
11
+ "prescolaire": 268,
12
+ "autre": 3591
13
+ },
14
+ "by_kind": {
15
+ "regular": 11640,
16
+ "langues": 24,
17
+ "coranique": 40,
18
+ "conduite": 5,
19
+ "formation": 91,
20
+ "special": 30
21
+ },
22
+ "by_sector": {
23
+ "public": 313,
24
+ "private": 48,
25
+ "unknown": 11469
26
+ },
27
+ "with_address": 2625,
28
+ "with_isced": 2037,
29
+ "wilayas_covered": 69,
30
+ "ecoles_geocoded": 11830,
31
+ "official_total": 28000,
32
+ "coverage_note": "11830 schools compiled from OpenStreetMap, against the ~28000 establishments in Algeria's national school network (primaire + moyen + secondaire, Ministry of National Education, approximate). A community-maintained extract, not an official registry — coverage is partial and uneven by wilaya.",
33
+ "cycle_note": "Cycle is inferred from isced:level and the French/Arabic name (CEM→moyen, lycée→secondaire, maternelle/روضة→préscolaire); a bare \"école\"/\"مدرسة\" with no cycle word is classified primaire per Algerian convention, and anything unresolved is \"autre\".",
34
+ "kind_note": "Kind is the establishment type, orthogonal to cycle: most are \"regular\"; \"langues\"/\"coranique\"/\"conduite\"/\"formation\" are special-purpose places OSM files under amenity=school but that sit outside the K-12 ladder (they carry cycle \"autre\"); \"special\" are adapted/special-needs schools (which keep a cycle).",
35
+ "linkage_note": "Commune/wilaya linkage is derived by nearest-centroid join against the geoalgeria commune set; wilaya is effectively exact, commune is best-effort.",
36
+ "generated_at": "2026-07-03"
37
+ }
package/index.js ADDED
@@ -0,0 +1,12 @@
1
+ // @geoalgeria/ecoles — lightweight loaders for Algeria's schools (OpenStreetMap).
2
+ import { readFileSync } from "node:fs";
3
+ import { fileURLToPath } from "node:url";
4
+ import { dirname, join } from "node:path";
5
+
6
+ const DATA = join(dirname(fileURLToPath(import.meta.url)), "data");
7
+ const load = (p) => JSON.parse(readFileSync(join(DATA, p), "utf-8"));
8
+
9
+ export const ecoles = () => load("ecoles.json"); // 11k+ geocoded schools & kindergartens (OSM), classified by cycle
10
+ export const metadata = () => load("metadata.json");
11
+
12
+ export default { ecoles, metadata };
package/package.json ADDED
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "@geoalgeria/ecoles",
3
+ "version": "1.0.0",
4
+ "type": "module",
5
+ "description": "Schools of Algeria — 11,000+ geocoded schools and kindergartens from OpenStreetMap, classified by cycle (primaire/moyen/secondaire/préscolaire), with Arabic & French names, commune/wilaya linkage and GPS coordinates. JSON, CSV, GeoJSON, TypeScript.",
6
+ "main": "index.js",
7
+ "types": "types/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./types/index.d.ts",
11
+ "default": "./index.js"
12
+ },
13
+ "./data/*": "./data/*"
14
+ },
15
+ "files": [
16
+ "data/**/*.json",
17
+ "data/**/*.csv",
18
+ "data/**/*.geojson",
19
+ "types/",
20
+ "index.js"
21
+ ],
22
+ "scripts": {
23
+ "fetch": "node scripts/fetch.mjs",
24
+ "test": "node ../../scripts/validate-packages.mjs ecoles"
25
+ },
26
+ "keywords": [
27
+ "algeria",
28
+ "schools",
29
+ "ecoles",
30
+ "education",
31
+ "primaire",
32
+ "cem",
33
+ "lycee",
34
+ "openstreetmap",
35
+ "geojson",
36
+ "geoalgeria",
37
+ "dz"
38
+ ],
39
+ "author": "Yasser's Studio (https://yasser.studio)",
40
+ "license": "MIT",
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "bugs": {
45
+ "url": "https://github.com/yasserstudio/geoalgeria/issues"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/yasserstudio/geoalgeria.git",
50
+ "directory": "packages/ecoles"
51
+ },
52
+ "homepage": "https://geoalgeria.com",
53
+ "engines": {
54
+ "node": ">=18"
55
+ }
56
+ }
@@ -0,0 +1,115 @@
1
+ // Type definitions for @geoalgeria/ecoles
2
+ // Schools of Algeria, extracted from OpenStreetMap (ODbL) and classified by cycle.
3
+
4
+ /** Where a record came from. OSM is the sole source (Wikidata is school-poor). */
5
+ export type EcoleSource = "osm";
6
+
7
+ /** Education cycle in the Algerian system. */
8
+ export type EcoleCycle =
9
+ | "primaire" // école primaire (ISCED 1)
10
+ | "moyen" // collège d'enseignement moyen / CEM (ISCED 2)
11
+ | "secondaire" // lycée (ISCED 3)
12
+ | "prescolaire" // préscolaire / maternelle / روضة (ISCED 0)
13
+ | "autre"; // school of undetermined cycle
14
+
15
+ /** Establishment kind — what the "école" is, orthogonal to its cycle. */
16
+ export type EcoleKind =
17
+ | "regular" // a standard école / CEM / lycée / maternelle
18
+ | "langues" // language school / institute (cycle "autre")
19
+ | "coranique" // Quranic school (cycle "autre")
20
+ | "conduite" // driving school / auto-école (cycle "autre")
21
+ | "formation" // vocational / training centre (cycle "autre")
22
+ | "special"; // adapted / special-needs school (keeps a cycle)
23
+
24
+ /** Ownership sector, only when an explicit signal is present. */
25
+ export type EcoleSector = "public" | "private";
26
+
27
+ /** How the coordinates were obtained. */
28
+ export type GeoPrecision = "osm_node" | "osm_centroid";
29
+
30
+ /** A geocoded school or kindergarten. */
31
+ export interface Ecole {
32
+ /** Stable id, `{wilaya_code}-{seq}` (e.g. "16-00042"). */
33
+ id: string;
34
+ /** Provenance — always "osm". */
35
+ source: EcoleSource;
36
+ /** OSM element id (e.g. "way/292876445"). */
37
+ osm_id: string;
38
+ /** Best available display name (raw name preferred, else FR/AR), or null if unnamed. */
39
+ name: string | null;
40
+ /** Arabic name, or null. */
41
+ name_ar: string | null;
42
+ /** French / Latin-script name, or null. */
43
+ name_fr: string | null;
44
+ /** Education cycle, inferred from isced:level + the FR/AR name. */
45
+ cycle: EcoleCycle;
46
+ /** Canonical French label for the cycle. */
47
+ cycle_label_fr: string;
48
+ /** Canonical Arabic label for the cycle. */
49
+ cycle_label_ar: string;
50
+ /** Establishment kind (mostly "regular"; special-purpose kinds carry cycle "autre"). */
51
+ kind: EcoleKind;
52
+ /** Canonical French label for the kind. */
53
+ kind_label_fr: string;
54
+ /** Canonical Arabic label for the kind. */
55
+ kind_label_ar: string;
56
+ /** ISCED levels served, sorted ";"-joined ("0;1", "2", "1;2;3"), from OSM isced:level; null if absent. */
57
+ isced_levels: string | null;
58
+ /** Ownership sector when asserted (operator:type or a privé/خاص name), else null. */
59
+ sector: EcoleSector | null;
60
+ /** Wilaya name (French), nearest-centroid join. */
61
+ wilaya: string;
62
+ /** Wilaya name (Arabic). */
63
+ wilaya_ar: string;
64
+ /** Wilaya code as a zero-padded string ("01".."69"). */
65
+ wilaya_code: string;
66
+ /** Commune name (French), nearest-centroid best-effort. */
67
+ commune: string;
68
+ /** Commune code (geoalgeria code_commune), nearest-centroid best-effort. */
69
+ commune_code: number | null;
70
+ /** Single-line address from OSM addr:* tags, or null when none are present. */
71
+ address: string | null;
72
+ /** Latitude. */
73
+ lat: number;
74
+ /** Longitude. */
75
+ lng: number;
76
+ /** How `lat`/`lng` were obtained (surveyed node vs building centroid). */
77
+ geo_precision: GeoPrecision;
78
+ }
79
+
80
+ /** Dataset metadata (data/metadata.json). */
81
+ export interface Metadata {
82
+ source: string;
83
+ origin: string;
84
+ license: string;
85
+ ecoles: number;
86
+ named: number;
87
+ by_cycle: Record<EcoleCycle, number>;
88
+ by_kind: Record<EcoleKind, number>;
89
+ by_sector: { public: number; private: number; unknown: number };
90
+ /** Records carrying an `address`. */
91
+ with_address: number;
92
+ /** Records carrying `isced_levels`. */
93
+ with_isced: number;
94
+ wilayas_covered: number;
95
+ ecoles_geocoded: number;
96
+ /** Approximate national school-network size, for honest coverage framing. */
97
+ official_total: number;
98
+ coverage_note: string;
99
+ cycle_note: string;
100
+ kind_note: string;
101
+ linkage_note: string;
102
+ /** ISO date (YYYY-MM-DD) the snapshot was generated. */
103
+ generated_at: string;
104
+ }
105
+
106
+ /** All schools and kindergartens. */
107
+ export function ecoles(): Ecole[];
108
+ /** Dataset metadata. */
109
+ export function metadata(): Metadata;
110
+
111
+ declare const _default: {
112
+ ecoles: typeof ecoles;
113
+ metadata: typeof metadata;
114
+ };
115
+ export default _default;