Adding a speed segment map to speed page#1045
Draft
devinmatte wants to merge 3 commits into
Draft
Conversation
Comment on lines
+33
to
+39
| export const filterActiveElements = <T extends Record<string, unknown>>( | ||
| records: T[], | ||
| targetLine: LineShort, | ||
| targetDate: Date, | ||
| getRecordDateRange: (t: T) => [Date, Date], | ||
| getRecordLine: (t: T) => LineShort | ||
| ) => { |
Contributor
There was a problem hiding this comment.
⚪ Code Quality Violation
Too many parameters (5). Maximum allowed is 4. (...read more)
Having too many parameters can make your code hard to read. The parameters must be used in appropriate order. Forgetting the order of parameters can cause mistakes.
Too many parameters is a code smell. You should refactor your code in smaller reusable bits. While it may be valid to require more than four parameters, you should use object destructuring.
devinmatte
commented
Feb 27, 2025
Comment on lines
+52
to
+60
| // TODO: Pull from dynamo calculated hourly in data-ingestion | ||
| const speedData = TEST_DATA.map((data) => { | ||
| const intervalDistance = getStationDistance(data.from_id, data.to_id); | ||
|
|
||
| return { | ||
| ...data, | ||
| speed: convertSecondsToMph(data.travel_time, intervalDistance), | ||
| }; | ||
| }); |
Member
Author
There was a problem hiding this comment.
Do not merge until this is pulling from real data
Member
Author
There was a problem hiding this comment.
Real data relies on https://github.com/transitmatters/slow-zones/pull/65 first getting merged
|
This pull request has been automatically marked as stale because it has not had activity within 180 days. |
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.
Motivation
Changes
Testing Instructions