Measurement¶
What is derived from operations once the service has run: distances, regularity, ridership, and the trace kept of all of it.
trip-km¶
Trip kilometres — the distance operated, broken down by trip, by vehicle or by period. Used for per-kilometre billing, contractual monitoring and fleet sizing.
No identifier of its own: the data is obtained per period and per perimeter.
| Endpoint | Purpose |
|---|---|
GET /api/v4/groups/<group_id>/stats/trip-km |
Aggregates kilometres over a period |
GET /api/v4/groups/<group_id>/export/trip-km |
Exports the detail as CSV |
Dead mileage, covered outside commercial service, is carried by the duty — see duties.
punctuality¶
Punctuality — the measure of the gap between the scheduled time and the actual passing time, aggregated over a period. It is the quality-of-service indicator most closely followed by transport authorities.
No identifier of its own: the data is obtained per period and per perimeter.
| Endpoint | Purpose |
|---|---|
GET /api/v4/groups/<group_id>/stats/punctuality |
Aggregates punctuality over a period |
GET /api/v4/groups/<group_id>/export/punctuality |
Exports the detail as CSV |
The measure relies on the scheduled times — see stop_times — and on the observed passings.
passenger-counts¶
Passenger counts — the number of boardings and alightings recorded at stops, per trip. It comes from the on-board counting systems, and feeds service sizing.
No identifier of its own: the data is obtained per period and per perimeter.
| Endpoint | Purpose |
|---|---|
GET /api/v4/groups/<group_id>/stats/passenger-counts |
Aggregates ridership over a period |
GET /api/v4/groups/<group_id>/export/passenger-counts |
Exports the detail as CSV |
stats¶
Statistics — the cross-cutting family of aggregation and export endpoints. It is not an entity in the sense of the other entries: the tag gathers the outputs computed over the preceding entities, in two constant shapes — an aggregate under /stats/, a CSV export under /export/.
| Endpoint | Purpose |
|---|---|
GET /api/v4/groups/<group_id>/stats/vehicles-used |
Counts the vehicles committed over a period |
GET /api/v4/groups/<group_id>/stats/daily_devices |
Counts the active devices per day |
GET /api/v4/groups/<group_id>/vehicle-amount |
Gives the group's vehicle count |
The eight CSV exports of the datahub spec — trips, drivers, vehicles, alerts, punctuality, kilometres, trip tracking, passenger counts — are the recommended way to feed a data warehouse. They are described in the collection examples.
history¶
History — the retention of what happened, beyond the real-time window: events reported by the devices, times observed at stops, the GTFS in force on the dates concerned, kilometres recorded. It is the source to query to reconstruct a past day.
No identifier of its own: history is queried per perimeter and per period.
| Endpoint | Purpose |
|---|---|
GET /api/v4/groups/<group_id>/history/events |
Lists the events reported by the devices |
GET /api/v4/groups/<group_id>/history/stop_times |
Gives the passings observed at stops |
GET /api/v4/groups/<group_id>/history/gtfs-active |
Gives the GTFS in force on a date |
GET /api/v4/groups/<group_id>/devices/<device_id>/history |
Traces a device's activity |
The observed times kept here are distinct from the scheduled times, which belong to the schedule reference — see stop_times.