CUTR-at-USF / usf-mobullity

USF Maps responsive web application
http://maps.usf.edu/
8 stars 7 forks source link

Add support for parking/traffic alerts #335

Open barbeau opened 8 years ago

barbeau commented 8 years ago

It would be nice if we could add an alert feature so that parking and/or traffic alerts (or any other alert type) could be displayed on the map screen for maps.usf.edu.

For example, over the weekend this Tweet went out:

USF (@USouthFlorida) tweeted at 2:07 PM on Mon, Sep 05, 2016: ATTN: Parking and Traffic Alert for September 6th: https://t.co/YyzjMTDOyZ (https://twitter.com/USouthFlorida/status/772858635621982208?s=03)

Full text from site:

Large Event to Impact Campus Parking and Campus Rec Hours

Closures begin Monday night (9/5), will reopen Tuesday afternoon (9/6).

On Tuesday, September 6, Hillary Clinton will hold a campaign event on the USF campus in Tampa at the Campus Recreation Center. USF was first contacted by the Clinton campaign over the weekend requesting to rent space.

The event begins at 1:45 p.m., however doors open at 11:45 a.m. with some attendees and press expected to arrive earlier in the day. In an effort to minimize disruption across the campus, the event will take place primarily in the immediate area around the Campus Recreation Center.

The event is expected to draw a large audience that will directly impact traffic patterns and a number of parking lots near the Sun Dome and Campus Recreation Center. Lots 22A and 22D, near the Sun Dome, will be closed beginning Monday night through the event’s conclusion late Tuesday afternoon. These areas are expected to reopen in time for Tuesday evening classes. Portions of Lot 6, between the Lee Roy Selmon Athletics Center and the Campus Recreation Center, will be also be closed during this time.

In order to help offset some of the parking closures, a temporary student parking lot will be set up for Tuesday near Leroy Collins Blvd. Students, faculty and staff are also encouraged to use the free Bull Runner service (www.usfbullrunner.com), and if possible, seek alternate routes that avoid the congested areas and the campus entrance at Fowler Ave. & Bull Run Drive, which will experience higher than normal traffic volume.

In addition, the Campus Recreation Center will be closed Monday at 6 p.m., and will reopen after the event ends Tuesday afternoon.

I imagine we'd want a summary shown in the app, like "Parking and Traffic Alert for September 6th" - maybe something like:

image

...and when clicking on the summary, you'd be redirected to the main USF page with all the details.

I'll check with USF to see if they have an RSS feed or some other API that we could use to pull this info - I'm guessing they don't, as it isn't listed on the main USF page (http://www.usf.edu/).

If we are going to generate these ourselves, we could possibly leverage the GTFS-realtime ServiceAlert format for this, although it's currently aimed at transit features. We're need to figure out how to add parking/traffic issues.

A really nice feature would be to have polygons that showed the affected area of campus (maybe as a layer in our Layer mode?), as explained in the message above. That's probably a v2 of this feature, though - just getting an alert at the top would be a nice first step.

jmfield2 commented 8 years ago

I was thinking the same thing. Along with the gtfs-realtime alerts, we could also consider adjusting the returned routes (banning, or just lowering their priority) when a particular alert is active.

barbeau commented 8 years ago

Two libraries for generating GTFS-rt Service Alerts (both from OBA - 2nd is newer):

I recall some debates for how/whether GTFS-rt Service Alerts are supposed to impact trip plans. The argument against allowing Service Alerts to cancel trips is that TripUpdates feeds support this functionality, so it's duplicative to have it in Service Alerts. The argument for allowing Service Alerts to cancel trips is that it allows an agency to use simpler tools to generate a Service Alert, so agencies without an AVL system can still communicate cancellations.

Here's Google best practices for alerts:

It says:

If the effect is NO_SERVICE, our system attempts to offer alternative routes to queries that find trips or routes currently without service.

After a bit more Googling, it looks like OTP used to support canceling trips via Service Alerts and NO_SERVICE, but that functionality was removed after feedback from TriMet: https://github.com/opentripplanner/OpenTripPlanner/issues/1368

So I'd say for now let's just work on showing the alert as information, but not have it affect routing. We'll need to have a discussion with the OTP and GTFS-rt community for that.