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

Pull speed restrictions data from DynamoDB #714

Merged
merged 7 commits into from
Jul 12, 2023

Conversation

idreyn
Copy link
Contributor

@idreyn idreyn commented Jul 5, 2023

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:

image

@idreyn idreyn linked an issue Jul 5, 2023 that may be closed by this pull request
@github-actions github-actions bot added backend Change to backend code frontend Change to frontend code labels Jul 5, 2023
Copy link
Member

@devinmatte devinmatte left a 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();
Copy link
Member

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

Copy link
Contributor Author

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.

@devinmatte devinmatte added this to the Dashboard V4 milestone Jul 7, 2023
@devinmatte devinmatte added the v4 label Jul 7, 2023
@devinmatte devinmatte merged commit 1258033 into dashboard-v4 Jul 12, 2023
5 checks passed
@devinmatte devinmatte deleted the idr/speed-restrictions-api branch July 12, 2023 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Change to backend code frontend Change to frontend code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Update MBTA speed restriction data ingest
3 participants