Entity id matching in Sydney Trains


#1

Hi,
Looking at the Sydney Trains GTFS realtime alerts feed and we’re trying to understand if there is a way to track an alert. For other feeds we see that the “id” of an entity is say a 7 digit number, but on the alert it we took two feeds an hour apart and it looks like the id is being re-used but for a different set of informed entities,

For example:

header {
gtfs_realtime_version: “1.0”
incrementality: FULL_DATASET
timestamp: 1549012332
}
entity {
id: “217”
alert {
informed_entity {
agency_id: “SydneyTrains”
trip {
trip_id: “124P.483.102.64.A.8.55277860”
}
}
informed_entity {
agency_id: “SydneyTrains”
trip {
trip_id: “W579.483.102.64.V.8.55623146”
}
}
informed_entity {
agency_id: “SydneyTrains”
trip {
trip_id: “W575.483.102.120.V.8.55278137”
}
}
url {
translation {
text: “https://transportnsw.info/alerts#/train
language: “en”
}
}
header_text {
translation {
text: “Delayed”
language: “en”
}
}
description_text {
translation {
text: " due to wet weather conditions causing slower boarding times"
language: “en”
}
}
}
}

— Vs —
header {
gtfs_realtime_version: “1.0”
incrementality: FULL_DATASET
timestamp: 1549015977
}
entity {
id: “217”
alert {
informed_entity {
agency_id: “SydneyTrains”
stop_id: “214520”
}
cause: OTHER_CAUSE
effect: UNKNOWN_EFFECT
url {
translation {
text: “https://transportnsw.info/alerts#/train
language: “en”
}
}
header_text {
translation {
text: “Lift Availability - Wentworthville”
language: “en”
}
}
description_text {
translation {
text: “The lift between the concourse and Wentworth Avenue is temporarily out of service. If you require assistance, please ask staff or phone 9848 9151.”
language: “en”
}
}
}
}

How do we identify that a particular entity has changed or should we actually just be drilling into the underlying entities and tracking them instead ?

cheers, Andy