Hello!
request to the NSW Sydney Trains (TrainLink) API endpoint /sydneytrains
in a sample of Explore API - Public Transport - Realtime Alerts API | TfNSW Open Data Hub and Developer Portal shows me bunch of entities with alerts such as this.
id: "134"
alert {
informed_entity {
agency_id: "SydneyTrains"
stop_id: "277010"
}
cause: OTHER_CAUSE
effect: SIGNIFICANT_DELAYS
url {
translation {
text: "https://transportnsw.info/alerts#/train"
language: "en"
}
}
header_text {
translation {
text: "Lift Availability - Mt Druitt"
language: "en"
}
}
description_text {
translation {
text: "The lift between the concourse and the bus interchange is temporarily out of service. If you require assistance, please ask staff or phone 9625 8156."
language: "en"
}
}
}
there is also route_id
and trip_id
the attributes that I find undocumented are :
cause: OTHER_CAUSE
effect: SIGNIFICANT_DELAYS
There is nothing about them in here https://opendata.transport.nsw.gov.au/sites/default/files/TfNSW_Realtime_Train_Technical_Doc.pdf
I found this enumeration on this forum here: Illegal value Error when decoding SydneyTrains GTFS data - #5 by yvonne.lee
but it’s couple of years old:
// Cause of this alert.
enum Cause {
UNKNOWN_CAUSE = 1;
OTHER_CAUSE = 2; // Not machine-representable.
TECHNICAL_PROBLEM = 3;
STRIKE = 4; // Public transit agency employees stopped working.
DEMONSTRATION = 5; // People are blocking the streets.
ACCIDENT = 6;
HOLIDAY = 7;
WEATHER = 8;
MAINTENANCE = 9;
CONSTRUCTION = 10;
POLICE_ACTIVITY = 11;
MEDICAL_EMERGENCY = 12;
}
optional Cause cause = 6 [default = UNKNOWN_CAUSE];
// What is the effect of this problem on the affected entity.
enum Effect {
NO_SERVICE = 1;
REDUCED_SERVICE = 2;
// We don't care about INsignificant delays: they are hard to detect, have
// little impact on the user, and would clutter the results as they are too
// frequent.
SIGNIFICANT_DELAYS = 3;
DETOUR = 4;
ADDITIONAL_SERVICE = 5;
MODIFIED_SERVICE = 6;
OTHER_EFFECT = 7;
UNKNOWN_EFFECT = 8;
STOP_MOVED = 9;
}
optional Effect effect = 7 [default = UNKNOWN_EFFECT];
Questions:
- Where can I find some more information about how these are generated (under what sort of circumstances?
- Who determines these, how often, based on what info? Is this contact reachable in some way?
- More specifically; What is the difference between NO_SERVICE , SIGNIFICANT_DELAYS and UNKNOWN_EFFECT ?
We’re trying to figure out under what circumstances it is warranted to display a full-screen alert message on TrainLink station platform screens.
Many thanks