Adds new event handler PassengerStopToStopCounts aka "stop-to-stop". This aggregates transit vehicle counts to origin, destination, attribute class and hour. ie Waterloo to Embankment, high income, 3rd hour -> N persons.
Useful for when you want to get volume of transit flow between two stations rather than for all individual links.
Critique:
The joining of spatial data in the finalise() method is messy and duplicated.
The counter is set up for all combinations of stops to stops (including self to self). This is simple but super memory hungry - it essentially creates a big matrix of zeros for impossible connections (ie Waterloo to London Bridge and so on). This could be corrected either by first traversing the schedule to calculate possible connections, using a sparse matrix repressentation or building on the fly.
Note that we might want to build an O-D scraper for trip origins and destinations which would use the same structure.
Adds new event handler
PassengerStopToStopCounts
aka "stop-to-stop". This aggregates transit vehicle counts to origin, destination, attribute class and hour. ie Waterloo to Embankment, high income, 3rd hour -> N persons.eg:
Useful for when you want to get volume of transit flow between two stations rather than for all individual links.
Critique:
finalise()
method is messy and duplicated.Note that we might want to build an O-D scraper for trip origins and destinations which would use the same structure.