Better Bus Buffers - Count High Frequency Routes at Stops

2037
9
10-17-2018 11:43 PM
ClaudiaN
New Contributor II

When running the headway threshold, i am getting the same results e.g. for NumTrips etc when i use a 5min vs. a 20min threshold.

My input is, so i would assume that the data is somewhat clean, has anyone had this issue? PTV Timetable and Geographic Information - GTFS - Datasets | Victorian Government Data Directory  

0 Kudos
9 Replies
DavidWasserman
Occasional Contributor III

Hi Claudia N‌, 

I wrote the tool in question. I downloaded GTFS dataset in question and noticed it was mulitple zip files nested inside another zip file. Are you running the tool on just one of the directories of the 11 or all of them at once? Do the other tools work on the data as expected? 

David

David Wasserman, AICP
0 Kudos
ClaudiaN
New Contributor II

Hey David

Thanks for getting back to me, yes the nested folders represent the different public transport modes so I read them all in at once.

e.g.

1 - Regional Train

2 - Metropolitan Train

3 - Metropolitan Tram  etc etc 

page 4: http://data.ptv.vic.gov.au/downloads/PTVGTFSReleaseNotes.pdf 

I've tried running the other tools but I don't get an output (despite the results panel showing that there was no error).

0 Kudos
MelindaMorang
Esri Regular Contributor

Hello Claudia.  It's a little hard to tell from your description exactly what the problem is.  I was going to try to download your data and take a look, but it's downloading so slowly that it will be the weekend before it finishes.

If you haven't already please make sure to read the User's Guide for the tools you're trying to use.

One thought I have is that maybe there's a problem with the day or date you're using.  Some GTFS feeds use the calendar.txt file to define a regular schedule that repeats on specific weekdays.  However, some other GTFS feeds do not model regular service and instead choose to model all (or most) of their service as "exceptions" using the calendar_dates.txt file.  Possibly some/all of your data does this, so if you use a generic weekday in the tool input, it won't pick up most of the service.  Try instead using a specific date in the tool input.  Make sure to use a date that falls within the valid date range of the feed, which you can determine by looking in the calendar_dates.txt and calendar.txt files.

When you say you run the other tools but don't get an output, what do you mean?  It didn't appear in the map?  Did you check the output location you specified in the tool parameters?  Perhaps it didn't automatically add to the map for some reason, but you can manually add it from the saved output on disk.

If you're still having problems, the best thing you can do is to describe your steps and the outcome with as much detail as possible, maybe even include some screenshots.  For example, what inputs have you specified for the tool parameters?  When you ran the tool, did it produce an error?  If so, what is the exact error message text?  If you're unhappy with the results, what exactly does the output look like, and why does this seem wrong?  With all that information, we'll have a much better chance of being able to help you. 

0 Kudos
ClaudiaN
New Contributor II

Hey Miranda 

I've started afresh and have re-run the tools, I've selected a single date e.g. 20181024 and am able to get meaningful results from the Count Trips at points / stops tool. The input is still the nested GTFS files.

The Count High Frequency Routes at Stops tool seems to produce the same results no matter what the headway threshold is over a given period e.g. I would expect a lower different trip count for 5minutes vs. 30minutes but the results are they same.

0 Kudos
DavidWasserman
Occasional Contributor III

Hi Claudia, 

I think I understand the issue here. 

The Count High Frequency Routes at Stops tool uses the headway threshold not to change the trip counts in the time period observed, but to change the number of routes that go through the stop that are counted under the Met Headway Limit field. This is the number of routes that meet that headway limit chosen by the tool. The number of trips/trips per hour are exactly the same as the other tools. Do you want the behavior to be that it only counts the trips of those stops that meet the headway threshold? 

David

David Wasserman, AICP
0 Kudos
ClaudiaN
New Contributor II

Thanks David, yes I'm after a process to calculate the trips count within a headway threshold.

ClaudiaN
New Contributor II

^ clarifying that by headway threshold i mean frequency threshold. 

E.g. how many trips occur between 7am-10am where the route has a frequency of say a 10 minute threshold or better.

ClaudiaN
New Contributor II

Hey David Wasserman‌ with my example above, I would still expect a lower different NumTrips and route count for 5minutes vs. 30minutes thresholds but the results are the same.

0 Kudos
DavidWasserman
Occasional Contributor III

Hi Claudia, 

Understood. Currently the tool only adjusts the MetHdWyLim field. 

However, this is a python based tool that is easy to modify to this purpose I think. 

At Line 290 in the tool, you should be able to modify the code to do this. 

Currently it reads:

            frequency_dataframe["MetHdWyLim"].where(frequency_dataframe["AvgHeadway"] <= FrequencyThreshold, np.nan,                                                     inplace=True)

You might want:

frequency_dataframe["MetHdWyLim"].where(frequency_dataframe["AvgHeadway"] <= FrequencyThreshold, np.nan,                                                     inplace=True)
            frequency_dataframe["NumTrips"].where(frequency_dataframe["AvgHeadway"] <= FrequencyThreshold, np.nan,                                                     inplace=True)
            
            frequency_dataframe["NumTripsPerHr"].where(frequency_dataframe["AvgHeadway"] <= FrequencyThreshold, np.nan,                                                     inplace=True)

Disclaimer, I have not tested this code, but should work. 

David Wasserman, AICP
0 Kudos