Algeria's Urban Bus Networks

@geoalgeria/buses

153 urban and suburban bus Lines across 14 Operator networks: Line identities, termini, the communes and transit Stations each Line serves, 1,603 indexed Stations, and published departure timetables where the Operator publishes them. Reusable geometry for 76 Lines comes from OpenStreetMap (ODbL).

153 bus linesView on mapnpm

Source: Published Operator materials, French Wikipedia and OpenStreetMap for Line identities and timetables; OpenStreetMap for reusable geometry and Stations

Install

npm install @geoalgeria/buses

Quick example

import buses from "@geoalgeria/buses";

const all = buses.lines();                     // 153 Lines, 14 Operators
const setif = buses.linesByOperator("ETUS Setif");
const shape = buses.shapeForLine("etusa-1");   // MultiLineString, or null
const stops = buses.stationsByLine("etusa-1"); // stations in source order

API reference

NameSignatureDescription
lineslines(): BusLine[]All 153 bus Lines across the 14 Operators.
lineByIdlineById(id): BusLine | nullOne line by id (e.g. "etusa-1").
linesByWilayalinesByWilaya(code): BusLine[]Lines in one wilaya.
linesByOperatorlinesByOperator(operator): BusLine[]Lines for an operator (case-insensitive).
operatorRecordsoperatorRecords(): BusOperator[]The 14 Operators with their wilayas and Line counts.
shapesshapes(): BusShape[]The 76 reusable OSM geometries, one per mapped Line.
shapeForLineshapeForLine(lineId): BusShape | nullThe geometry for one line, when it has one.
directionsdirections(): BusDirection[]The 128 Directions behind those shapes.
stationsstations(): BusStation[]All 1,603 indexed Stations.
stationsByLinestationsByLine(lineId): BusStation[]Stations a line serves, in source order.
stationMembershipsstationMemberships(): StationMembership[]Station-to-direction joins that keep the source ordering.
metadatametadata(): MetadataPackage metadata (counts, coverage note, licence).

Record shape

FieldTypeNullableDescription
idstringnoStable id, `{operator}-{line}` (e.g. "etusa-1").
namestringyesLine display name, where the operator publishes one.
wilaya_codestringnoZero-padded ("16" for Alger).
commune_codenullnoAlways null (line-level record, no single commune).
communenullnoAlways null (line-level record).
latnullnoAlways null: a line's geometry lives in its shape, not a point.
lngnullnoAlways null (line-level record).
geo_precisionnullnoAlways null (line-level record).
geo_methodnullnoAlways null (line-level record).
sourceSourceKeynoWhich source established the line (operator, OSM, or both).
operator_idstringnoStable operator key (e.g. "etus-setif").
operatorstringnoOperating company (e.g. "ETUSA").
networkstringnoNetwork / city (e.g. "Alger").
linestringnoLine number/label.
terminus1stringyesFirst terminus, with `terminus1_fr` / `terminus1_ar` where published.
terminus2stringyesSecond terminus, with `terminus2_fr` / `terminus2_ar` where published.
stopsnumberyesNumber of stops where published.
major_stopsnumberyesNumber of major stops where the operator types them separately.
service_hoursBusServiceHours[]noFirst and last departure per service period, where published.
departure_schedulesBusDepartureSchedule[]yesFull directional departure lists, for the 8 Lines whose Operator publishes them.
route_diagram_urlstringyesOfficial route diagram, where the operator publishes one.
communes_servedstring[]noCommunes along the line.
stations_servedstring[]noMetro/tram/gare stations served en route.
shape_idstringyesJoins to the line's route geometry; null for a directory-only line.
osm_relation_idsnumber[]noThe OSM relations the geometry was assembled from.
source_refsSourceKey[]noEvery source behind the record, in package order.
source_urlstringyesSource page URL.

Formats

JSONCSVGEOJSONTS

The npm package ships JSON. Other formats are available in each GitHub Release.

Related packages