Select to view content in your preferred language

Calculate Transit Service Frequency - Allow route types to be excluded

1536
9
06-04-2023 06:30 PM
Status: Implemented
KD_
by
Emerging Contributor

The "Calculate Transit Service Frequency (Public Transit)" tool does not allow for any filtering of route types or ids like you would find in the PT/GTFS network dataset. A simple drop down menu or just a text field to input exclusions is needed.

Use case example:

My large metropolitan GTFS feed includes school bus routes (route type 712). Including school routes in frequency analysis is not relevant to the vast majority of the population as they can't use those services. The ability to filter out this mode would make the outputs of this tool reflective of reality for the general public.

Thanks!

Tags (1)
9 Comments
MelindaMorang
Status changed to: Under Consideration

Thanks for this idea.

Off the top of my head, I can't think why this would not be technically possible in a straightforward fashion.

The main challenge is in making the tool UI performant. Your specific use case relies on a non-standard route_type value, 712, that is not part of the GTFS specification or Esri's data model.  If you want this to work, the UI would have to open the Lines table and read it to create the choicelist of modes to include/exclude (slow) rather than hard-coding a list of supported mode types (fast).  Not impossible, just not preferred.

Another, related enhancement would be to exclude trips and stops that are not accessible to bikes or wheelchairs.

KD_
by

Thanks for the response. This change to the tool would probably only be useful to those of us with restricted/special services mixed into the feed whether they be school buses, tourist sightseeing buses, etc. 

Regarding the type, our GTFS feed has over 8,000 route ids and of those only 40 are using the standard route types. The rest rely on the "extended" route types. They made the switch a few years ago and I'm not sure why they chose to go in this direction or how common it is. 

In the meantime I'm going grab the old Better Bus Buffers and mash together the bits I need. I'll insert a couple lines to make a list of route_ids to exclude based on type and then filter those out of the trips list. I have some experience customising Better Bus Buffers so while I do have to go through the hoops of creating the sql file, it's just the easiest method for me to get what I need in the short term.

MelindaMorang

Okay.  If you can make that work, then feel free to go for it!

However, some data model manipulation might be easier/quicker.  You can fairly easily join the GRouteType field from the Lines table to LineVariants to LineVariantElements. Then just delete all records from those three tables where GRouteType is the types you don't want.  I think then you should be able to run Calculate Transit Service Frequency out of the box and not worry about it picking up the data you want to exclude.

KD_
by

That's a much cleaner solution than mine. I dumped most of BBB into a notebook, changed the trip SQL query to join the route table and exclude where type=x. Works fine but is a pile of code that I wouldn't expect anyone else to be able to parse. I'm going to circle back and rewrite with your suggested method which should be much more intuitive. Thanks!

MelindaMorang

Hi KD.  I just wanted to check in with you to see if my proposed method to delete records in the data model tables with the GRouteType values you wanted to exclude worked for your needs.  

MelindaMorang
Status changed to: In Product Plan

Working on this for the Pro 3.2 release.

KD_
by

Just following up on this from a few weeks ago. I attempted to get the suggested fix to work, but quickly had to give up due to project time contraints. In theory it was working, but I was finding the particular GTFS feed I was using wasn't playing well with Calculate Transit Service Frequency pro tool and giving odd results. Basically I opened another can of worms I didn't have time to debug and reverted to the BBB solution.

MelindaMorang

Okay, thanks for following up.  If at some point you have more time and are able to share the problematic GTFS feed, I'd be happy to take a look and figure out why it's not working in the Pro tools.

MelindaMorang
Status changed to: Implemented

This Idea has been implemented in ArcGIS Pro 3.2. Please see the What's New documentation for more new features in Pro 3.2 and the Your Ideas in Pro 3.2 blog to learn about other new Ideas that were implemented.