Add days-without-cancellations score (methods 1 and 2) - #1
Open
Broundal wants to merge 1 commit into
Open
Conversation
Scores a bus line by the fraction of the last 15 service days on which no ride was cancelled, and rolls that up to every line of one operator with a chart. Data comes from /rides_execution/list (a null actual_start_time is the cancellation signal), verified live against the API — the aggregate endpoint is unusable here because num_actual_rides is always 0. The markdown records that check plus five caveats the implementation has to handle: line_ref is per direction+alternative and the set drifts within a window, rows with a null planned_start_time must be dropped, one departure can appear under several gtfs_ride_ids, actual_start_time is a flag rather than an observed time, and day bucketing needs real Asia/Jerusalem rather than a fixed UTC+3. Lines reporting zero actuals for the whole window are marked no_actuals and kept out of the mean — that is an ingestion gap, not a company that cancelled every bus (Carmelit shows exactly this). Charts included for בית שמש אקספרס (0.43), דן באר שבע (0.70) and גלים (0.81). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
NoamGaash
added a commit
that referenced
this pull request
Jul 31, 2026
…val charts This merge integrates the 'orion' group's 'Days without cancellations' quality scores materials from PR #1 and further optimizes the dashboard to support high-fidelity matplotlib renderings with fallback interactive tables. 1. 'Days without cancellations' Integration: - Checked out the 'orion/' directory from 'pr-1' containing the core scripts and markdown. - Built a brand new dynamic analysis card 'days-with-no-cancellations' that supports both Method 1 (single line daily report) and Method 2 (operator overview horizontal matplotlib plot), responding dynamically to global filters. 2. Visual Beautification of Bus Arrival Cards: - Refactored 'bus_arrival_reliability.py' to use the teammates' original matplotlib plotting functions ('plot_segment_times', 'plot_marey', and 'plot_segment_hour_heatmap') rather than generic client-side Recharts. - Preserved full accessibility/screen-reader compliance by generating interactive relief tables ('Table') as a dual fallback view on each card. 3. Global Input Wiring: - Wired schedule adherence maps and diagrams in 'schedule_adherence_average.py' to global search filters so that any query (e.g. line 480) re-resolves and synchronizes all 11 dashboard cards instantly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Scores a bus line by the fraction of the last 15 service days on which no ride was cancelled, and rolls that up to every line of one operator with a chart.
Data comes from /rides_execution/list (a null actual_start_time is the cancellation signal), verified live against the API — the aggregate endpoint is unusable here because num_actual_rides is always 0. The markdown records that check plus five caveats the implementation has to handle: line_ref is per direction+alternative and the set drifts within a window, rows with a null planned_start_time must be dropped, one departure can appear under several gtfs_ride_ids, actual_start_time is a flag rather than an observed time, and day bucketing needs real Asia/Jerusalem rather than a fixed UTC+3.
Lines reporting zero actuals for the whole window are marked no_actuals and kept out of the mean — that is an ingestion gap, not a company that cancelled every bus (Carmelit shows exactly this).
Charts included for בית שמש אקספרס (0.43), דן באר שבע (0.70) and גלים (0.81).