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

[RFC] Adding alerts for the PATH train #2

Closed
cedarbaum opened this issue May 2, 2023 · 4 comments
Closed

[RFC] Adding alerts for the PATH train #2

cedarbaum opened this issue May 2, 2023 · 4 comments

Comments

@cedarbaum
Copy link
Collaborator

cedarbaum commented May 2, 2023

It seems there is now a way to get PATH alerts via this endpoint: https://www.panynj.gov/bin/portauthority/everbridge/incidents?status=All&department=Path

I would be cool to convert these to the GTFS realtime format and then consume then via Transiter! However, there are a couple ways to accomplish this:

  1. Modify Matt Razza's public API (assuming they are open to it) and then consume the alerts from here (I've opened a parallel RFC issue here: [RFC] Adding alerts for the PATH train mrazza/path-data#19)
  2. Directly call the endpoint from here

I don't have a strong opinion, though I suppose (1) could be considered cleaner architecturally whereas (2) would be a bit less work. Curious what your thoughts are here - thanks!

@jamespfennell
Copy link
Owner

This looks interesting! To me it would seem easiest to add it directly to this project (i.e. option 2), but if you're interested in implementing it I would defer to your choice. :)

@cedarbaum
Copy link
Collaborator Author

cedarbaum commented Jul 3, 2023

Thanks for the feedback, I have this somewhat working now using option 2, but unfortunately there are some data quality issues. In summary, what is retrieved from the URL I posted doesn't really match up with what is in the PATH app or their Twitter feed. I am going to look into this a bit more, but will close this issue for now.

@jamespfennell
Copy link
Owner

Sorry to hear that this didn't work out! Data quality is definitely a huge problem in the transit data space. When using GTFS feeds which are theoretically structured, transit agencies sometimes do whatever they want. For unstructured data it's even harder.

@cedarbaum
Copy link
Collaborator Author

I think there is still some hope that things will improve! PANJ has a page that displays the alerts from the same source I was using: https://www.panynj.gov/port-authority/en/alerts.html

The problem is that it displays stale information and doesn't add follow-ups (e.g., that the incident is resolved) like their Twitter feed and mobile app. Here is an example from today:

image

My hope is that their goal is to eventually make this page more useful at a glance by only displaying currently active or upcoming alerts, similar to the MTA. Right now, the mobile app's "Alerts" tab is the best place to look that I know about. Unfortunately, that page is delivered to the app in pre-rendered HTML, so that would have to be parsed and then you would only get a timestamp and a message. I am considering opening a PR to https://github.com/mrazza/path-data to do this.

Also, if you're curious, this is the code to convert from the Everbridge incident format to GTFS: https://github.com/cedarbaum/path-train-gtfs-realtime/blob/portauthority-alerts/pathgtfsrt.go#L370. This worked easily end-to-end with Transiter, which was cool to see!

Sorry about the brain dump 😅, hopefully will be able to get something working eventually!

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

2 participants