transitland / transitland-processing-animation

Animating scheduled transit trips using the Transitland API and Processing
MIT License
279 stars 55 forks source link

Min/max time is treated as if it spans midnight-midnight #2

Closed dracos closed 7 years ago

dracos commented 7 years ago

You can see the problem with e.g. python transitflow.py --name="CrossCountry" --operator o-gc-crosscountry The first train is at 04:44, last train ends at 00:07.

The start/end frames of the trips are calculated by treating minDate-maxDate as mapping to all the frames. But the counts are treated as one count per frame, starting at midnight. This means that the displayed lines/counts do not match the display of the trips.

image

I have worked around this by editing the csv files to match up the counts to the right times.

willgeary commented 7 years ago

Thanks! I'm glad you worked around it by editing the csv files manually. Will look into it.

willgeary commented 7 years ago

Fixed. count_vehicles_on_screen() no longer assumes a 24 hour window, but finds the true min and max dates from the dataset. @dracos

dracos commented 7 years ago

Thanks :)