Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework duplicate detection #6

Open
Kunsi opened this issue Dec 24, 2023 · 1 comment
Open

Rework duplicate detection #6

Kunsi opened this issue Dec 24, 2023 · 1 comment

Comments

@Kunsi
Copy link
Owner

Kunsi commented Dec 24, 2023

PR #5 introduces HAFASEvent.id, which could be used to determine if departures are listed multiple times. This would remove the need to have a lot of the logic we currently have for detecting duplicates.

Ideally, we'd have two modes of duplicate detection:
a) Only show the first event (depending on departure/arrival time)
b) Prioritize stops according to their order in stop_ids, so if a journey travels through multiple stops, the event gets prioritized by the order of stop_ids, so listing a stop earlier will prioritize it.

@Kunsi
Copy link
Owner Author

Kunsi commented Dec 25, 2023

For cancelled services with a replacement service running:

If you have two services, scheduled to arrive within the same minute, one with realtime data, one without, the one without realtime data is a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant