Fix: Align scheduled/delivered trip counts #993
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
I've noticed that the scheduled/delivered trip counts graph is getting out of sync. It turns out that we are missing a few data points for each line in the
DeliveredTripMetricsWeekly
table, which is causing thedelivered
array for a given date range to be a little shorter than thescheduled
one. We should backfill these values, but in the meantime, I've added some code to make sure that the data points on those graphs are always aligned by day. This results in some "holes" in the graph. Maybe there was shuttling that should appear here?Long term I there should be a single API that returns both scheduled and delivered trip counts in one shot, like
/api/service_hours
does.Changes
Before:
After:
Testing Instructions
With "Past Year" time range selected, click through the Overview pages for each rapid transit line and verify that they load correctly and appear synchronized.