All our products have been updated on with the releases associated to this Sprint 47.
The user can retrieve:
per day Vehicle Journeys count “Service counts” for a date range for Line(s)
total Vehicle Journeys count “Service count” for a date range for Line(s)
Example 1: Retrieve daily statistics
{ lines { nodes { objectid serviceCounts(from: "2021-01-01", to: "2021-01-31") { date count } } } |
{ "data": { "lines": { "nodes": [ { "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC", "serviceCounts": { "nodes": [ { date: "2021-01-01", count: 17, }, { date: "2021-01-02", count: 33, }, ... { date: "2021-01-31", count: 35, }, ] } { "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC", "serviceCounts": { "nodes": [ { date: "2021-01-01", count: 67, }, ... ] } } ] } } } |
Example 2: Retrieve total count
{ lines { nodes { objectid serviceCount(from: "2021-01-01", to: "2021-01-31") } } |
{ "data": { "lines": { "nodes": [ { "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC", "serviceCount": 456 }, { "objectid": "chouette:Line:d1b1f581-8b68-456c-8de8-714c142a8ec9:LOC", "serviceCount": 983 }, ... ] } } } |
The GTFS format allows to define a GTFS Trip where all passing times are delayed from one or more days.
To avoid misunderstanding, Chouette created the resulted Vehicle Journey without the initial day offset and a dedicated crafted timetable:
A GTFS trip with the following stop times:
trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_time,shape_dist_traveled AAMV4,35:00:00,35:00:00,AMV,1 AAMV4,36:00:00,36:00:00,BEATTY_AIRPORT,2 |
with a calendar on saturday/sunday:
service_id,monday,tuesday,wednesday,thursday,friday,saturday,sunday,start_date,end_date WE,0,0,0,0,0,1,1,20190101,20211231 |
is imported by Chouette with a dedicated timetable:
We’re monitoring and improving constantly the Chouette operation performances. This release provides improvements especially on referential creation and reduce drastically the database table usage.
Chouette dependencies are constantly analyzed to find and resolve possible security issues. These libraries have been updated in this new release :
The user can customize the GTFS connectors to format Stop Area, Line and Vehicle Journey identifiers via generators.reference_identifier
and generators.reference_stop_area_identifier
settings.
generators.reference_identifier = MyNetwork:%{type}::%{objectid}:LOC generators.reference_stop_area_identifier = MyNetwork:StopPoint:Q:%{objectid}:LOC |
Without rewriting:
{ "header": { "gtfs_realtime_version": "2.0", "incrementality": 0, "timestamp": 1600697389 }, "entity": [ { "id": "trip:268438583", "trip_update": { "trip": { "trip_id": "268438583", "route_id": "B", "start_time": "17:20:05" }, "stop_time_update": [ { "stop_sequence": 3, "stop_id": "TMLKIN2", "arrival": { "time": 1600701595 }, "departure": { "time": 1600701605 } }, |
With rewriting:
{ "header": { "gtfs_realtime_version": "2.0", "incrementality": 0, "timestamp": 1600697641 }, "entity": [ { "id": "trip:268435951", "trip_update": { "trip": { "trip_id": "MyNetwork:VehicleJourney::268435951:LOC", "route_id": "MyNetwork:Line::15:LOC", "start_time": "16:10:48" }, "stop_time_update": [ { "stop_sequence": 18, "stop_id": "MyNetwork:StopPoint:Q:00009201:LOC", "arrival": { "time": 1600697448 }, "departure": { "time": 1600697448 } }, { "stop_sequence": 19, "stop_id": "MyNetwork:StopPoint:Q:00033601:LOC", "arrival": { "time": 1600697513 }, "departure": { "time": 1600697513 } }, { "stop_sequence": 20, "stop_id": "MyNetwork:StopPoint:Q:00043001:LOC", "arrival": { "time": 1600697571 }, "departure": { "time": 1600697571 } }, |
The user can define a generator identifier where the objectid
value is modified by a given substitution.
The syntax to define a such substitution is: %{objectid//pattern/replacement}
.
Example
generator identifier: prefix:%{objectid//:/_}
objectid value: x:y:z
resulted identifier: prefix:x_y_z
When the Direction Name is defined in the Vehicle Journey associated to the Vehicle, the VehicleMonitoring SIRI Lite response contains the DirectionName
attribute:
{ "Siri": { "ServiceDelivery": { "ResponseTimestamp": "2017-01-01T12:00:00Z", "ProducerRef": "Ara", "ResponseMessageIdentifier": "MyNetwork:ResponseMessage::6ba7b814-9dad-11d1-5-00c04fd430c8:LOC", "RequestMessageRef": "Test:1234::LOC", "VehicleMonitoringDelivery": { "Version": "2.0:FR-IDF-2.4", "ResponseTimestamp": "2017-01-01T12:00:00Z", "RequestMessageRef": "Test:1234::LOC", "Status": true, "VehicleActivity": [{ "RecordedAtTime": "2017-01-01T13:00:00Z", "ValidUntilTime": "2017-01-01T13:00:00Z", "VehicleMonitoringRef": "Test:Vehicle:201123:LOC", "MonitoredVehicleJourney": { "LineRef": "Test:Line:3:LOC", "FramedVehicleJourneyRef": { "DataFrameRef": "MyNetwork:DataFrame::2017-01-01:LOC", "DatedVehicleJourneyRef": "Test:VehicleJourney:201:LOC" }, "PublishedLineName": "Ligne 3 Metro", "DirectionName": "Direction Name", "Monitored": true, "Bearing": 123, "VehicleLocation": { "Longitude": 1.234, "Latitude": 5.678 } } }] } } } } |