-
Notifications
You must be signed in to change notification settings - Fork 232
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
Add Docked Bikeshare Systems (and Stops History) #441
Add Docked Bikeshare Systems (and Stops History) #441
Conversation
* add vehicle definition * add dock definition * add /stations endpoint (MDS Issue openmobilityfoundation#374) * add status statuses definition
Continuing the proposal to address MDS openmobilityfoundation#374. This results in two new endpoints, /stations and /station_status_changes, which will allow a user to recreate the state of the docked-bikeshare system at any point in time.
There are already open pull requests that begin to satisfy the desire for docked bikeshare systems in both MDS-Agency and MDS-Provider, see #427 and #430. We've been discussing #427 significantly in the bi-weekly Provider Working Group calls. There are still pending issues for addition of Stops to |
@cmdoptesc Follow-up to my above comment, I'd really love this to just become a PR for introducing a |
Hi @avatarneil thanks for taking a look at this. I was on the Provider Working Group call in January with my coworker @rgangopadhya and am aware of your stops proposals. I don't believe this PR and #427 are clashing because yours is focused on realtime information. Internally, @rgangopadhya and I had discussed making a recommendation for historical support in #427 (prior to it being split out into Provider and Agency), but decided that it didn't make sense to blow up the scope of that PR. Because #427 is realtime and this PR is historical, I'd love to get alignment on naming and the actual set of fields to reduce the dissonance when requesting realtime vs historical data. In addition, my understanding from the Provider Working Group call we attended was that there was some feedback on #427 that generalizing stations to stops (i.e. combining GTFS and GBFS) felt a bit too far ahead of the actual use-cases on the ground. This motivated us to focus this PR on fields related to "micromobility" stations. I see a need for realtime stop/station data, and I see a need for historical stop/station data, and MDS would be benefited by both. Lastly, with regards to adding stops to trips using GeoJSON Foreign Members (#438), I lean towards stop/station information being found at the top level of a |
Hey @cmdoptesc, thank you for the clarification! I think that we should absolutely try to align It was my hope that we could extend Funnily enough, I was a little hesitant on using GeoJSON Foreign Members too; in my opinion, just because a spec allows injecting arbitrary data doesn't mean you should. I'd went with that approach purely because I was deferring to @jfh01's suggestion, though I absolutely am in support of the stop/station information being held at the top level, and think it should be brought up during the next Provider WG. Would you be interested in bringing that up, or would you like me to? In any case, I think this definitely warrants some more discussion. Do you think it'd be worth having some discussions similar to the recent Agency/Provider reconciliation breakaway groups outside of the WG? Thanks for putting this all together by the way, super exciting to see these pieces coalesce :) |
Hi @jfh01, @thekaveman, and @avatarneil (as the most likely interested parties in this PR). I wanted to be up front on our (Remix's, including @cmdoptesc's) potential availability to help drive this forward, rather than risking this slipping. We don't have much bandwidth in this quarter, so the most we can commit to now is just being involved in the conversation and making sure that the perspective reflected in this PR is considered, but we can't help beyond that. I think materially that looks like us hopping on a call with some interested parties in a breakaway group like @avatarneil recommended a couple months ago. I was hoping we could have a meaningful conversation about this in the last provider call prior to 0.4.1, but we had to rightfully drop it in favor of getting essential 0.4.1 stuff out the door, and there wasn't enough debate about this constellation of issues. I do still think this is an important issue and would hate for it to be a lost opportunity simply because of our particular situation. |
Here is a doc we put together with MobilityData and NABSA to provide additional guidance on how GBFS and MDS should align with each other: https://github.com/openmobilityfoundation/governance/blob/master/technical/GBFS_and_MDS.md |
Moved this to the 1.1.0 release per our recent calls since it has a focus on historic data for stops and we are focusing on more real time for the beta Docked/Stops in 1.0.0 with PR #427. |
We will be discussing this tomorrow at our Joint Working Group meeting, so attend if you are interested. @cmdoptesc |
From the working group call yesterday. Idea: make this like status changes, but for stops. Populus - useful to them. Use case: know trips w/ docks/dockless already there. See travel patterns between stations. Another way to accomplish this is an ID for each MDS event that can be referenced elsewhere, like in routes along with stop ID. Need to get more people to weigh in and use case and see if this is needed, or if the existing data is good enough. @cmdoptesc what does this sound like to you? Are we missing anything? |
Hi @cmdoptesc, I'd like to propose closing this PR and instead opening a new PR or issue that is focussed on just history within stops. It could be created by you or someone else. I believe all the rest of your ideas have been addressed, and we need some community feedback and a leader to take on the stops history as a standalone idea. |
Closing this since there hasn't been much activity during the 1.1.0 release, and much of the PR has been addressed. Leaving it to someone to focus on Stops history in a new issue or new PR to move this idea forward. |
Explain pull request
With issues #374 , #428 , and #438 it seems there's an ever-increasing desire to bring docked-bikeshare information into MDS.
We propose minor additions to the existing
/trips
and/status_changes
endpoints and also the addition of new/stations
and/station_status_changes
endpoints. The two new endpoints are undoubtedly modeled after GBFS; however they’re intended for historical queries, unlike GBFS's primary purpose of providing "real-time travel advice" to bikeshare riders.To update trips to support docks (issue #428 ), we should add two new optional fields:
station_start
andstation_end
. If a vehicle starts and/or ends its trip at a station, the fields would be populated with the station ID(s).For status changes (issue #438 ), there will be an optional
event_station_id
field, whose purpose is similar to the above. If a device has a status change that occurs at a station, then the field will be populated with the station ID.For actual information on stations (issue #374 ), we’ve split this into two endpoints:
/stations
and/station_status_changes
.The reason for this separation is because the
/stations
endpoint guarantees that the user will get an inventory of all stations at predictable point in time. Since it’s costly and redundant to store the state of a station of every possible historical point in time, this endpoint would provide states on a daily cadence. To get the state at any other point in time, the user would use the/station_status_changes
endpoint; which is a stream of events.So with two endpoints, a consumer of the API can recreate the state of any station at any point in the past without needing to start from the very beginning.
Lastly, I want disclose that I may not have the availability to shepherd this proposal all the way to completion. If someone else in the MDS community would like to take the reins on this, I welcome your support.
Is this a breaking change
This PR adds optional fields to existing endpoints and proposes the addition of two new endpoints.
Impacted Spec
Which spec(s) will this pull request impact?
provider
Issues for Discussion
Which spec(s) will this pull request impact?
provider
Issues for Discussion
Vehicles[]
andDocks[]
instead of a field likenum_bikes_available
so that the station may support any type of vehicle without requiring any changes to the schema. GBFS currently has an issue with representing ebike counts, where some providers have started using their own unofficial field likenum_ebikes_available
. I'm well aware of the performance implications when parsing, but the approach of stringifyingvehicle_types
andpropulsion_types
as keys seems suboptimal as well. E.g.Stations have
vehicle_types
andpropulsion_types
fields, which represent what that station supports, however it doesn’t list the specific combination (e.g. an ebike is abike
andelectric_assist
). To do so would require the creation of some third object that would combinevehicle_type
andpropulsion_type
. This was purposely omitted to reduce complexity.The
Vehicles
object, given its inclusion ofdevice_id
andvehicle_id
, will allow a user to recreate trips. This is a minor privacy concern, especially when compared to routes routes because because docked trips are "snapped" to stations, so the level of trip detail here is coarser.Do we want to try to align station
change_type_reasons
with the existing agency and providerevent_type
framework?