1

I want to make a nuanced heat map of transit access, but my computer cannot handle the processing.

I'm using a GTFS table with a each trip in a city's bus system. Each trip has a unique trip_id. I've used the lat/long to place a point for every stop on every bus trip.

This looks like a map of bus stops in the city, but in fact there are dozens or hundreds of points on top of each other -- one for each time a bus arrives at that stop.

I want to create the 0.5-mile service area using Network Analyst around each of these points. My computer crashes here. If I could complete this step, I would then merge the resulting polygons by trip_id. This would generate each trip's walkshed as a single polygon. I would then spatial join those polygons and rasterize the count of overlapping polygons to show how many distinct transit trips you can walk to from a given point.

This is superior to an easier method: using the number of times a bus arrives at a stop. If you live between Stop A and Stop B, your location would get "credit" for when Bus X arrives at Stop A and again when it arrives at Stop B, even though in reality that isn't materially increasing your transit access.

How can I change this analysis so that my computer doesn't crash? Or how else can I capture this nuance in a simpler method?

1

I just did a similar analysis.

Here's the steps I took (assuming you're using ESRI Network Analyst). I used this extension to work with the GTFS data in ArcMap.

  1. Get the census blocks for your desired service area. Get the centroids of those blocks with Feature to Point.

  2. Generate the appropriate size walksheds for each of those centroids, using a pedestrian road network. This is done in Network Analyst with the Service Area analysis. At the end, you should have a bunch of overlapping walksheds, each associated with one block FIPS code.

  3. Next, spatial join between each walkshed polygon and the layer of bus stops. You want to associate each walkshed/census block with the stop IDs of the bus stops within the stops.

Here I had to switch out of ArcMap. I did the rest of this analysis using the pandas data analysis library:

  1. Compute a frequency table for trips.txt. You want the total number of trips made by each route_id. Ideally you should do this for the service_id for weekday & weekend service separately.

  2. Next, associate each stop_id with the set of route_id that stop there. You can do this by looping through stop_times.txt and counting each unique route_id that happens for each stop_id.

  3. For each walkshed, look at each stop in the walkshed and get a list of the routes available. Lookup the frequency of each route and sum it up, and then you have the total bus boardings available, associated with a particular census block. (By getting only the routes available here, you avoid the pitfall of the easier method you mentioned).

Hopefully that won't crash your system!

  • Thank you. I'm not familiar with pandas data analysis library, but I understand the process you're describing. Right after asking my question, I also found Melinda's BetterBusBuffers tool and am giving that a try. If it doesn't quite do what I need, I'll try your method. – Nick Welch Jan 21 '15 at 17:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.