-
Notifications
You must be signed in to change notification settings - Fork 17
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
Pull speed restrictions data from DynamoDB #714
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and worked for me in testing. Thanks!
Only noticed one thing in the code that I'm concerned about, but, can't test until it gets later today (or if it would even break anything)
window.location.origin | ||
); | ||
return fetch(speed_restrictions_url.toString()).then((resp) => resp.json()); | ||
const today = new Date(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this may cause issues after 8pm EST as it'll be tomorrow in GMT. I think we try to use dayJs dates throughout the code to avoid this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good callout but in this case we're never going to display the date, we just treat it as a timestamp.
In transitmatters/data-ingestion#26 I added the MBTA's data on track speed restrictions to our DynamoDB tables. This PR updates the DD's speed restriction info to query from that table. It ultimately goes here, in the SZ map tooltip: