Track long outages#61
Draft
hamima-halim wants to merge 8 commits into
Draft
Conversation
hamima-halim
commented
Jan 19, 2024
| mode = "cr" | ||
| # rapid transit may rarely have dashes AND SPACES in stop id/route id! | ||
| # ex, Green_D_1-Union Square-02 | ||
| # ex, Green-D_1-Union Square-02 |
Contributor
Author
There was a problem hiding this comment.
fake news-ass comment
Contributor
|
if you're looking for a builtin solution for caching on the file-system to avoid ballooning memory usage, I think shelve could work for your needs here: https://docs.python.org/3/library/shelve.html |
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.
ISSUE
part 1 of a 2 parter to address stop_id/direction outages in our vehicle pings #51
in part 1, build out a cache/data structure that keeps track of degenerate GPS ping sequences that don't have stop_id or directional info. it should probably be purged daily
in part 2, we'll single out ping sequences that have been dark for sufficiently long (~1 minute) and start trying to intuit their route progress with a shape interpolation algorithm using
shapes.txt.BACKGROUND
as far as i can tell, there's 3 kinds of outages (c+p from the original issue)
THIS PR
i've set the cutoff for suspected extended outages to be 1 minute, after which we start trying to do shape interpolation things. there's some logic here to try and figure out just whether a bad ping is a continuation of a sequence we're already tracking, or if this is a new instance of an outage.
i really do not like this dict-as-a-cache setup here at the moment. yall got cleaner suggestions?