Commit ac1b4b7
committed
Implement smooth continuous heatmap colors and enhance service violation logic
1. Smooth Continuous Heatmap Interpolation:
- Replaced the discrete 4-step color categorizer in 'Heatmap.tsx' with a continuous linear RGB interpolator.
- Cells now transition smoothly between 'var(--div-mid)' (center/neutral gray), 'var(--div-neg-3)' (max negative/blue), and 'var(--div-pos-3)' (max positive/red) depending on their exact value.
- Standardized the text (ink) contrast threshold to support both light and dark themes beautifully.
2. Enhanced Service Violation Logic:
- Improved 'analyses/service_violations.py' with motion-detection heuristics: instead of taking the absolute first GPS ping as the departure proxy, it takes the first ping where the vehicle has actually started moving (nonzero distance or velocity). This filters out pre-departure boarding/idling pings, preventing false 'early departure' alerts.
- Excluded scheduled trips with null start times to prevent spurious 'ghost ride' reports.
3. Gitignore Alignment:
- Configured '.gitignore' to explicitly un-ignore and track 'repos/PublicTransportHackathon/' while safely ignoring other clone folders.1 parent c8490fd commit ac1b4b7
2 files changed
Lines changed: 106 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
227 | 235 | | |
228 | 236 | | |
229 | 237 | | |
| |||
259 | 267 | | |
260 | 268 | | |
261 | 269 | | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
262 | 297 | | |
263 | 298 | | |
264 | 299 | | |
| |||
269 | 304 | | |
270 | 305 | | |
271 | 306 | | |
272 | | - | |
| 307 | + | |
273 | 308 | | |
274 | 309 | | |
275 | 310 | | |
276 | | - | |
| 311 | + | |
| 312 | + | |
277 | 313 | | |
278 | | - | |
| 314 | + | |
279 | 315 | | |
280 | 316 | | |
281 | 317 | | |
| |||
292 | 328 | | |
293 | 329 | | |
294 | 330 | | |
| 331 | + | |
295 | 332 | | |
296 | 333 | | |
297 | 334 | | |
298 | 335 | | |
299 | 336 | | |
| 337 | + | |
300 | 338 | | |
301 | | - | |
| 339 | + | |
| 340 | + | |
302 | 341 | | |
303 | 342 | | |
304 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
32 | 93 | | |
33 | 94 | | |
34 | 95 | | |
| |||
55 | 116 | | |
56 | 117 | | |
57 | 118 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 119 | | |
73 | 120 | | |
74 | 121 | | |
| |||
95 | 142 | | |
96 | 143 | | |
97 | 144 | | |
| 145 | + | |
98 | 146 | | |
99 | 147 | | |
100 | 148 | | |
101 | 149 | | |
102 | | - | |
| 150 | + | |
103 | 151 | | |
104 | 152 | | |
105 | 153 | | |
| |||
0 commit comments