@geoalgeria/buses 1.0.0 → 2.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.
@@ -1,16 +1,38 @@
1
1
  {
2
- "source": "ETUSA (Établissement de transport urbain et suburbain d'Alger) — line list via fr.wikipedia",
3
- "origin": "https://fr.wikipedia.org/wiki/Lignes_de_bus_ETUSA_de_1_à_99",
4
- "license": "Line data from Wikipedia (CC BY-SA 4.0) — attribution + share-alike. Operator: ETUSA. See README.",
5
- "lines": 50,
2
+ "package": "@geoalgeria/buses",
3
+ "schema_version": "2.0.0",
4
+ "title_fr": "Lignes de bus ETUSA (Alger)",
5
+ "title_ar": "خطوط حافلات إيتوزا (الجزائر العاصمة)",
6
+ "title_en": "ETUSA urban bus lines (Algiers)",
7
+ "record_count": 50,
8
+ "geocoded_count": 0,
9
+ "geocoded_pct": 0,
10
+ "precision": {
11
+ "exact": 0,
12
+ "approximate": 0
13
+ },
14
+ "estimated_universe": 122,
15
+ "coverage_pct": 41,
16
+ "coverage_note": "50 of ETUSA's ~122 passenger lines (fr.wikipedia 'Lignes de bus ETUSA de 1 à 99'). Line-level attributes only; per-stop and per-line geometry deferred (OSM route=bus coverage tagged ETUSA is currently thin). No coordinates exist for this dataset — lat/lng are null and geo_precision reflects that honestly.",
17
+ "wilayas_covered": 1,
18
+ "bbox": null,
19
+ "sources": [
20
+ {
21
+ "key": "wikipedia",
22
+ "name": "French Wikipedia — Lignes de bus ETUSA de 1 à 99",
23
+ "url": "https://fr.wikipedia.org/wiki/Lignes_de_bus_ETUSA_de_1_à_99",
24
+ "license": "CC BY-SA 4.0",
25
+ "retrieved": "2026-07-01",
26
+ "evidence_type": "crowdsourced"
27
+ }
28
+ ],
29
+ "license": "CC-BY-SA-4.0",
30
+ "updated": "2026-07-01",
6
31
  "operators": [
7
32
  "ETUSA"
8
33
  ],
9
34
  "by_operator": {
10
35
  "ETUSA": 50
11
36
  },
12
- "with_stop_count": 44,
13
- "wilayas_covered": 1,
14
- "coverage_note": "v1 covers 50 ETUSA lines (fr.wikipedia 'Lignes de bus ETUSA de 1 à 99'), of ~122 ETUSA passenger lines. Line-level attributes only — per-stop and per-line GEOMETRY (OSM route=bus) is deferred to v1.1; ETUSA-tagged OSM route coverage is currently thin. More operators/cities to be added.",
15
- "generated_at": "2026-07-01"
37
+ "with_stop_count": 44
16
38
  }
@@ -0,0 +1,40 @@
1
+ {
2
+ "@context": "https://schema.org",
3
+ "@type": "Dataset",
4
+ "name": "ETUSA urban bus lines (Algiers)",
5
+ "alternateName": "Lignes de bus ETUSA (Alger)",
6
+ "identifier": "@geoalgeria/buses",
7
+ "description": "50 of ETUSA's ~122 passenger lines (fr.wikipedia 'Lignes de bus ETUSA de 1 à 99'). Line-level attributes only; per-stop and per-line geometry deferred (OSM route=bus coverage tagged ETUSA is currently thin). No coordinates exist for this dataset — lat/lng are null and geo_precision reflects that honestly.",
8
+ "license": "https://creativecommons.org/licenses/by-sa/4.0/",
9
+ "isAccessibleForFree": true,
10
+ "creator": {
11
+ "@type": "Organization",
12
+ "name": "Yasser's Studio",
13
+ "url": "https://yasser.studio"
14
+ },
15
+ "spatialCoverage": {
16
+ "@type": "Place",
17
+ "name": "Algeria"
18
+ },
19
+ "variableMeasured": "50 records, 1 wilayas",
20
+ "distribution": [
21
+ {
22
+ "@type": "DataDownload",
23
+ "name": "lines (JSON)",
24
+ "encodingFormat": "application/json",
25
+ "contentUrl": "https://cdn.jsdelivr.net/npm/@geoalgeria/buses/data/lines.json"
26
+ },
27
+ {
28
+ "@type": "DataDownload",
29
+ "name": "lines (CSV)",
30
+ "encodingFormat": "text/csv",
31
+ "contentUrl": "https://cdn.jsdelivr.net/npm/@geoalgeria/buses/data/csv/lines.csv"
32
+ }
33
+ ],
34
+ "dateModified": "2026-07-01",
35
+ "url": "https://geoalgeria.com",
36
+ "sameAs": "https://github.com/yasserstudio/geoalgeria",
37
+ "citation": [
38
+ "French Wikipedia — Lignes de bus ETUSA de 1 à 99 — CC BY-SA 4.0"
39
+ ]
40
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geoalgeria/buses",
3
- "version": "1.0.0",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "description": "Algeria's urban bus networks — line-level data (termini, stop counts, communes & transit stations served). First operator: ETUSA (Alger), 50 lines. Multi-operator umbrella. Sourced from fr.wikipedia. JSON, CSV, TypeScript.",
6
6
  "main": "index.js",
@@ -13,6 +13,7 @@
13
13
  "./data/*": "./data/*"
14
14
  },
15
15
  "files": [
16
+ "dataset-metadata.json",
16
17
  "data/**/*.json",
17
18
  "data/**/*.csv",
18
19
  "types/",
package/types/index.d.ts CHANGED
@@ -1,44 +1,95 @@
1
- // Type definitions for @geoalgeria/buses
2
- // Algeria's urban bus networks (line-level). Multi-operator; v1: ETUSA (Alger).
1
+ // Type definitions for @geoalgeria/buses (schema v2).
2
+ // Algeria's urban bus networks (line-level). Multi-operator by design;
3
+ // today's snapshot covers ETUSA (Alger) only, sourced from French Wikipedia.
4
+
5
+ /** Coordinate provenance, coarse-grained. Detail lives in `geo_method`.
6
+ * `null` when the record carries no coordinate at all. */
7
+ export type GeoPrecision = "exact" | "approximate" | null;
8
+
9
+ /** How the coordinate was obtained. Always null today: this dataset is
10
+ * line-level, with no per-line geometry. */
11
+ export type GeoMethod = null;
3
12
 
4
13
  /** An urban bus line. */
5
14
  export interface BusLine {
6
15
  /** Stable id, `{operator}-{line}` (e.g. "etusa-1"). */
7
16
  id: string;
8
- /** Operating company (e.g. "ETUSA"). */
17
+ /** Display name: `Ligne {line} — {terminus1} ↔ {terminus2}`. */
18
+ name: string;
19
+ /** Wilaya code, zero-padded to 2 digits ("16" for Alger). */
20
+ wilaya_code: string;
21
+ /** Always null — a line spans several communes, see `communes_served`. */
22
+ commune_code: null;
23
+ /** Always null — see `commune_code`. */
24
+ commune: null;
25
+ /** Always null — this dataset is line-level, with no per-line geometry. */
26
+ lat: null;
27
+ /** Always null — see `lat`. */
28
+ lng: null;
29
+ /** Always null: the record carries no point at all, so it asserts no precision. */
30
+ geo_precision: null;
31
+ /** Always null — see `geo_precision`. */
32
+ geo_method: GeoMethod;
33
+ /** Provenance key into `metadata.sources[]` — always "wikipedia". Not a
34
+ * URL; see `source_url` for that. */
35
+ source: "wikipedia";
36
+ /** Operating company (e.g. "ETUSA"). Not narrowed to a literal union —
37
+ * this dataset is designed to cover multiple operators over time. */
9
38
  operator: string;
10
39
  /** Network / city (e.g. "Alger"). */
11
40
  network: string;
12
41
  /** Line number/label as published (e.g. "1", "16B"). */
13
42
  line: string;
14
- /** First terminus, or null. */
15
- terminus1: string | null;
16
- /** Second terminus, or null. */
17
- terminus2: string | null;
43
+ /** First terminus. */
44
+ terminus1: string;
45
+ /** Second terminus. */
46
+ terminus2: string;
18
47
  /** Number of stops where published, or null. */
19
48
  stops: number | null;
20
49
  /** Communes served (French display names). */
21
50
  communes_served: string[];
22
51
  /** Metro/tram/gare stations served en route (French display names). */
23
52
  stations_served: string[];
24
- /** Wilaya code, zero-padded to 2 digits ("16" for Alger). Joins `geoalgeria`. */
25
- wilaya_code: string;
26
- /** Source URL. */
27
- source: string;
53
+ /** URL of the source page the line was read from. */
54
+ source_url: string;
55
+ }
56
+
57
+ /** One provenance entry in `metadata.sources[]`. */
58
+ export interface SourceRef {
59
+ key: string;
60
+ name: string;
61
+ url?: string;
62
+ license: string;
63
+ retrieved?: string;
64
+ evidence_type?: "official" | "crowdsourced" | "derived";
28
65
  }
29
66
 
30
67
  /** Dataset metadata (data/metadata.json). */
31
68
  export interface Metadata {
32
- source: string;
33
- origin: string;
69
+ package: "@geoalgeria/buses";
70
+ schema_version: string;
71
+ title_fr: string;
72
+ title_ar: string;
73
+ title_en: string;
74
+ record_count: number;
75
+ /** Always 0 — no coordinates exist for this dataset. */
76
+ geocoded_count: number;
77
+ geocoded_pct: number;
78
+ precision: { exact: number; approximate: number };
79
+ /** Estimated size of ETUSA's full passenger network (~122 lines). */
80
+ estimated_universe: number | null;
81
+ coverage_pct: number | null;
82
+ coverage_note: string;
83
+ wilayas_covered: number;
84
+ /** Always null — no coordinates exist for this dataset. */
85
+ bbox: [number, number, number, number] | null;
86
+ sources: SourceRef[];
34
87
  license: string;
35
- lines: number;
88
+ /** ISO date (YYYY-MM-DD) the dataset was regenerated. */
89
+ updated: string;
36
90
  operators: string[];
37
91
  by_operator: Record<string, number>;
38
92
  with_stop_count: number;
39
- wilayas_covered: number;
40
- coverage_note: string;
41
- generated_at: string;
42
93
  }
43
94
 
44
95
  /** All bus lines. */