trip_headsign format changed for Green Line West

55 views
Skip to first unread message

StefanW

unread,
Jun 10, 2016, 9:33:11 AM6/10/16
to MBTA Developers
Earlier this week it seems that the trip_headsign format for the westbound Green Line trips changed. They used to be:

"trip_headsign":"B - Boston College"
"trip_headsign":"C - Cleveland Circle"
"trip_headsign":"D - Riverside"
"trip_headsign":"E - Heath Street"

Now they are 
"trip_headsign":"Boston College"
"trip_headsign":"Cleveland Circle"
"trip_headsign":"Riverside"
"trip_headsign":"Heath Street"

I had some code break because I was expecting the /^[BCDE] - / but I've since fixed it. 

Can we get notified in advance of format changes like this?

Thanks!


-- Stefan


Developer at MBTA

unread,
Jun 10, 2016, 10:48:43 AM6/10/16
to MBTA Developers
Hi Stefan,

Thanks for pointing this out. This was not a planned change, and may be related to a bug fix that was applied earlier this week. We are investigating this now and will let you know when we have figured it out. We apologize that this came up unexpectedly; in general we will always try to inform developers in advance of any changes of this nature.

In general, we would prefer that you not use string parsing to figure out which branch a train is on, but instead use the route_id field, which is unique to each Green Line branch (they are "Green-B", "Green-C", "Green-D", and "Green-E").

Sincerely,

Developer@MBTA

Developer at MBTA

unread,
Jun 14, 2016, 4:27:12 PM6/14/16
to MBTA Developers
Hi Stefan,

Could you provide some more detail as to which API calls you were using that showed this change? The reason we are a bit confused is that the change you reference, from "B - Boston College" to just "Boston College", was made in our GTFS output on March 12, 2015 as part of the larger GTFS change described here: https://groups.google.com/forum/#!msg/massdotdevelopers/kXJuTRqtdfQ/eaoZDdnGGKAJ

If there was a particular query or part of our system that was showing the old-style Green Line headsigns, it must have been a bug, so any details you can give regarding the specific API calls you were making would be appreciated.

Thanks,

Developer@MBTA

StefanW

unread,
Jun 27, 2016, 1:02:31 PM6/27/16
to MBTA Developers
It seems I was mis-reading the bug in my code! Sorry to take you in the wrong direction. 

It wasn't an issue with the leading /^[BCDE] - / but rather that recently some trips have been appearing without trip_headsign at all. Also in those cases the trip_name appears with an empty value. 

Here's a blob from just now (2016-06-27 12:41:35) that shows the issue:

{
trip_id
: "98A869B5",
trip_name
: "",
vehicle
: {
vehicle_id
: "5446C3E4",
vehicle_lat
: "42.39066",
vehicle_lon
: "-70.99699",
vehicle_bearing
: "35",
vehicle_timestamp
: "1467045695"
},
stop
: [
{
stop_sequence
: "90",
stop_id
: "70056",
stop_name
: "Beachmont - Outbound",
pre_dt
: "1467045791",
pre_away
: "63"
},
{
stop_sequence
: "100",
stop_id
: "70058",
stop_name
: "Revere Beach - Outbound",
pre_dt
: "1467045904",
pre_away
: "176"
},
{
stop_sequence
: "110",
stop_id
: "70060",
stop_name
: "Wonderland",
pre_dt
: "1467046007",
pre_away
: "279"
}
]
},


Can you tell us if trip_headsign is supposed to always be present? (Also if trip_name should always have a value.)

Thanks!



StefanW

unread,
Jun 27, 2016, 1:06:00 PM6/27/16
to MBTA Developers
By the way I'm using predictionsByRoutes.

StefanW

unread,
Jul 7, 2016, 1:02:41 PM7/7/16
to MBTA Developers
Any insight on this? It seems to be a regular occurrence.

Also it seems like it appears mostly on the Blue Line.

Again, the issue is the trip_headsign is missing completely, and the trip_name value is null.

Here's another sample from just now showing the problem:

{
 
"trip_id":"98A878D3",
 
"trip_name":"",
 
"vehicle":{
   
"vehicle_id":"5446FE12",
   
"vehicle_lat":"42.39514",
   
"vehicle_lon":"-70.99405",
   
"vehicle_bearing":"210",
   
"vehicle_timestamp":"1467909906"
 
}
}



This is an example of a complete trip object:

{
 
"trip_id":"31080572",
 
"trip_name":"12:54 pm from Wonderland to Bowdoin",
 
"trip_headsign":"Bowdoin",
 
"vehicle":{
   
"vehicle_id":"5446FE21",
   
"vehicle_lat":"42.41352",
   
"vehicle_lon":"-70.99167",
   
"vehicle_bearing":"200",
   
"vehicle_timestamp":"1467910401"
 
}
}



Developer at MBTA

unread,
Jul 7, 2016, 5:25:35 PM7/7/16
to MBTA Developers
Hi Stefan,

Sorry for the late response. We are aware of the issue and currently working on a resolution.

Sincerely,

Developer@MBTA

Stefan Wuensch

unread,
Jul 13, 2016, 9:30:16 AM7/13/16
to massdotd...@googlegroups.com
In case it helps, just now Orange Line trip 98666EC1 showed this issue. It's the first time I've seen it happen on the Orange Line. 




Sent from my iPad Micro

--
You received this message because you are subscribed to the Google Groups "MBTA Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to massdotdevelop...@googlegroups.com.
To post to this group, send email to massdotd...@googlegroups.com.
Visit this group at https://groups.google.com/group/massdotdevelopers.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages