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

Add "num_usable_bikes" and "num_usable_spaces" to station_status.json #95

Closed
wants to merge 1 commit into from

Conversation

albloptor
Copy link

This change tries to fix the limitation the current spec has, where it's not possible to know how many bikes are there at a station when is_renting = 0.

In my opinion, as exposed in issue #94, is_renting should be independent to num_bikes_available. In the same way, is_returning should be independent to num_docks_available.

Because changing the spec would break existing clients implementing it, I propose adding num_usable_bikes and num_usable_spaces to the spec.

These two new fields, in conjunction with is_renting and is_returning, arguably make num_bikes_available and num_docks_available redundant, but keeping them guarantees backward compatibility.

What we achieve with this spec change is to know how many bikes and spaces there are in a station regardless of the is_renting and is_returning flag.

This allows clients to:

  • Keep all the current GBFS functionality, but providing the extra features below.
  • Plan their journeys before the beginning of a station's renting hours. If a station starts renting at 7am, they will be able to see how many usable bikes there are at the station before that time. The current spec would display 0 bikes until 7am.
  • Visualize number of bikes in each station on a map, regardless of the renting/returning hours.

Add "num_usable_bikes" and "num_usable_spaces" to station_status.json
@jcn
Copy link
Contributor

jcn commented May 10, 2018

Closing this as there appears to be consensus in #94 that adding additional fields does not actually solve the underlying problem, and that the better course of action is to fix/clarify the existing fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants