UDST / urbanaccess

A tool for GTFS transit and OSM pedestrian network accessibility analysis by UrbanSim
https://udst.github.io/urbanaccess/index.html
GNU Affero General Public License v3.0
239 stars 57 forks source link

Interpolator vectorization and tests #2

Closed pksohn closed 7 years ago

pksohn commented 7 years ago

Another speed improvement to the interpolator function. This change fully vectorizes the interpolation: a DataFrame is created in which each column represents a unique_trip_id and the index is stop_sequence. Running DataFrame.interpolate() interpolates values on all trips at once, and the values are merged back.

I added a few unit tests for this function as well. @sablanchard it would be helpful to look over the return values to make sure they're behaving as intended.