feat: add frequency-based route color visualization#571
Merged
johanohly merged 4 commits intoMay 23, 2026
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 3 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/lib/components/map/AirportsArcsLayer.svelte">
<violation number="1" location="src/lib/components/map/AirportsArcsLayer.svelte:274">
P2: by-frequency arc thickness can evaluate to 0 for the lowest-frequency route, making that route invisible in the main ArcLayer.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
89a2da4 to
ba1aa6c
Compare
ba1aa6c to
b51634d
Compare
|
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.



Description
Map appearance: improve frequency-based arc styling (color + thickness) with percentile scaling.
Issues
Raw frequency values were dominated by extreme routes, collapsing many routes into near-identical visuals.
(ex, if one route is flown 100 times, a route flown 20 times will have no visual difference with a route flown 1 time)
Changes
Summary by cubic
Improved route frequency visualization: arc thickness now uses percentile scaling and arcs can color by frequency, making busy routes stand out without flattening others. Adds a simple control in Map Appearance and persists the choice.
arcColortoMapPreferences; sanitized, persisted, and resettable.arcColorand per-route percentiles for color and width recalculation.Written for commit ba1aa6c. Summary will update on new commits.
Note
Add frequency-based route color visualization to the flights map
byFrequencyarc color mode that blends each route's source/target color toward a high-frequency red based on its percentile rank across all routes.ArcColorModetype,arcColorpreference (defaulting to'default'), and wires it through localStorage persistence, sanitization, and reset in map-preferences.svelte.ts.byFrequency, widths are now driven by a normalized 0–1 percentile scale instead of absolute frequency counts, so visual thickness is relative rather than absolute.Macroscope summarized 920799d.