Coder Social home page Coder Social logo

Comments (5)

bparmentier avatar bparmentier commented on September 22, 2024

Thanks for all your suggestions!

This is in my todo list. I was thinking of making the bike in two colors (red/green or whatever) to show the bike availability/empty slots (like a progress bar) and clicking on it would pop up a bubble with more information (see the osmbonuspack project for the bubbles).

from openbikesharing.

svennevz avatar svennevz commented on September 22, 2024

Hi,

What about a toggle mode bettween the to phases of a bike trip. Finding a Bike, the color or progress represents the availability of bikes. Finding an empty slot, the color or progress represents the slots availability.

Hope it helps.

from openbikesharing.

bparmentier avatar bparmentier commented on September 22, 2024

What do you think of something like this?

stations_markers_circle

There are four five states. The algorithm is as follows:

double ratio = freeBikes / (freeBikes + emptySlots);
if (freeBikes == 0) {
    // marker0
} else if (freeBikes >= 1 && ratio <= 0.3) {
    // marker25
} else if (ratio > 0.3 && ratio < 0.7) {
    // marker50
} else if (ratio >= 0.7 && emptySlots >= 1) {
    // marker75
} else if (emptySlots == 0) {
    // marker100
}

from openbikesharing.

svennevz avatar svennevz commented on September 22, 2024

I think it does the job, it's really showing the station state like a tank gauge. Having the marker25/marker75 steps at limite of 1 will force you to look at the detail, because very few slot/bike is a risky station to go to. But knowing your trip phase, you can focus on the 3 other safe states. I see 5 states, BTW.

from openbikesharing.

bparmentier avatar bparmentier commented on September 22, 2024

I also added a sixth state (see. commit 50bfc7e) showing if a station is closed.

I personally prefer this method over a toggle mode, which adds an additional step.

from openbikesharing.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.