AnsweredAssumed Answered

Bus level of service and Field Calculator Code Help

Question asked by AlexandreH_275G on Nov 8, 2018
Latest reply on Nov 8, 2018 by AlexandreH_275G

Hello everyone!


I am a student and I have a problem I'm not sure how to solve. I have a data set with 389,411 different entries -- it's traffic data by the way -- and I need to find out the level of service each bus stop in this data set has. For instance, maybe a particular bus stop is served every 30 minutes.


This data set is a GTFS pulled from somewhere--one of my group members got it! It has the following:


Stop ID's

Arrival times

Departure times

Unique trip ID's


What I was thinking is that I could create a new field or table and store the level of service times there but I'm having some trouble wrapping my head around how to calculate it. I'd like to get it to where I can say with some certainty that stop-ID has x-service time based on this data.


What I need is, somehow, a way to tell the calculator to look at all stop ID's of the same number, look at the trip ID such that it starts at the lowest trip ID number and subtracts the next number in the ID-line but then stops, goes to the third number, and then subtracts the fourth from the third.

It sounds like coding! I know very little about it and our class hasn't got that far yet.

Any resources or help on this subject would be darn awesome!


Thanks to everyone