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
236 stars 56 forks source link

Custom headway assessment #36

Open kuanb opened 6 years ago

kuanb commented 6 years ago

Idea:

Thread through a way to perform custom summary stat calculations other than those generated by Pandas' describe() method in the headways computation step of UA.

This is currently in headways.py in the gtfs dir.

Proposal: After the results[unique_stop_route] = pd.Series(adjusted_time_diff).describe() is applied on a grouped set, go ahead and run a custom method (which could just be selecting, say, the mean result value).

This will return all the describe columns as well as a new column which is selected_result or whatever. So, downstream _add_headway_impedance would not need a parameter for which headway to use, it could simply opt to rely on selected_result column.