Connecting Origin and Destination of Bikeshare Trips

858
2
06-23-2020 04:50 AM
DanielLapczuk
New Contributor II

Hi!

I'd like to know which tool works best for connecting each origin and destination of a bikeshare trip. I have splitted the large csv file into months but they still include at least 200.000 rows each. The csv file has information about Object ID, geographical position of the origin station and destination station, and the belonging times. Using an OD cost matrix firstly runs for hours and secondly will connect all the points, right?

Probably I am thinking way to complicated. My aim is to produce a flow map along the streets which shows which areas are most used by the bikeshare system.

Thanks in advance!

0 Kudos
2 Replies
MelindaMorang
Esri Regular Contributor

If you need to know which streets were traversed, you can't use OD Cost Matrix.  OD Cost Matrix calculates only the travel time or distance but does not preserve the actual paths taken along the network.  This allows OD Cost Matrix to operate efficiently, but it sounds like this isn't the right tool for the job for you.

Instead, you need to use the Network Analyst Route solver to calculate the route taken between each pair of points.  Once you have done that, you can combine the results to find the most frequently traversed road segments.

When setting up the Route analysis, you should use the RouteName input field in the Route Stops table to make it so the origin and destination get directly connected to one another.  If you just load in all the points without using RouteName, they will all connect sequentially, which isn't what you want.  Each OD pair should have a unique RouteName value.  Configured that way, the results will contain one individual route from the origin to the destination for each unique RouteName.

It's unlikely you will be able to solve all 200 thousand routes in one go.  You will probably have to break up the problem into multiple chunks and combine the outputs afterwards.  You might be able to do something in Model Builder, but an easier and more reliable way is with python.  This DevSummit presentation talks about how to solve large Network Analyst problems in python.  It focuses on the OD Cost Matrix solver, but many of the lessons apply equally to Route.

Once you have calculated the Routes, you will need to combine the results to identify the most frequently traversed road segments.  If you're doing an analysis with Route layers (as opposed to the python solver objects discussed in the video), the correct way to do this is with the Copy Traversed Source Features tool.  If you're using the python solver objects, you'll probably have to do a spatial join or something, or even make a raster and count the number of times each cell is touched by a route.

DanielLapczuk
New Contributor II

Thank you for the fast request.

Indeed, it is not possible to process all 200k routes in one step. I received an error. Thus, I have to figure the way via python out.

Thanks so far.

0 Kudos