Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up trip_headsigns #9

Open
samvermette opened this issue Jul 23, 2014 · 4 comments
Open

Clean up trip_headsigns #9

samvermette opened this issue Jul 23, 2014 · 4 comments

Comments

@samvermette
Copy link

On the CARTA website it does seem like they label headsigns as Inbound and Outbound.

Your GTFS feed generally follows that convention but has inconsistent headsigns. Some headsigns contain the route name + direction, and others not. I would just label them as inbound/outbound (fullname instead of abbreviation).

As @jden pointed out on Twitter this seems to be deeper problem since these strings are used on real-life vehicle headsigns, but figured I'd open an issue anyway.

@junosuarez
Copy link
Contributor

Thanks for opening this issue. Is this a blocker for your use of the data? As you note, we're continuing to improve the data in the upstream systems which are used to generate the GTFS dataset.

@samvermette
Copy link
Author

Not a blocker at all, we have a bunch of tools that take care of cleaning headsigns and other strings, but ideally we don't need to get those involved :)

@samvermette
Copy link
Author

Quick follow-up: we just ended up renaming everything to Inbound or Outbound using the following method (Objective-C):

- (NSDictionary *)cleanedUpTripDictionary:(NSMutableDictionary *)dict {
    if([dict.tripHeadsign containsOneOfWords:@[@"OB", @"B"]]) {
        dict.tripHeadsign = @"Outbound";
        dict.rtTripHeadsign = @"OUT"; // to match Clever Devices API
    }
    else if([dict.tripHeadsign containsOneOfWords:@[@"IB", @"IBMKT", @"IB12TH+MKT"]]) {
        dict.tripHeadsign = @"Inbound";
        dict.rtTripHeadsign = @"IN"; // to match Clever Devices API
    }
    else {
        NSLog(@"Unexpected trip_headsign that neither IB or OB: %@", dict.tripHeadsign);
    }

    dict.rtRouteID = dict.routeID;
    return dict;
}

So beyond the inconsistencies there are 3 other "totally off" headsigns: B, IBMKT and IB12TH+MKT. Hope this helps.

@junosuarez junosuarez assigned junosuarez and unassigned junosuarez Aug 26, 2014
seabre pushed a commit to seabre/gtfs that referenced this issue Nov 5, 2014
@samvermette
Copy link
Author

This is very related to #19, but any reason why you guys ended up removing the inbound/outbound connotation from the trip headsigns? We need those to be able to match the API predictions to the GTFS schedules...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants