bparmentier / OpenBikeSharing

Shared bikes availability in your city
https://openbikesharing.org
Other
67 stars 56 forks source link

colour stations on map according to bike availbility/free parking #2

Closed axelsimon closed 10 years ago

axelsimon commented 10 years ago

To visually filter out more easily the stations on the map when looking for a bike or a parking space, it would be very nice to have the bike logos that represent the stations have a colour code.

For example (just an idea, clearly): red: the station has no free bikes, no free spaces (ie: the station is out of order, basically) green: the station has free bikes, free spaces grey: the station has free bikes, no spaces (can happen even when the station is not actually full of bikes) brown: the station has no free bikes, but has free spaces

I realise these colours are probably not the best, especially the grey and brown ones.

Another option is to use the bike logo in two-halves, ie: front wheel of the bike represents bike availability, back wheel represents free spaces. Green front wheel, red back wheel: bikes available, no free spaces. etc.

Last suggestion (I'm on a roll!), the colours could also be a gradient according to the number of free bikes on total number of bikes, and/or free spaces on total number of spaces. Probably not very relevant info, but still a possibility.

Hope this helps!

bparmentier commented 10 years ago

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).

svennevz commented 10 years ago

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.

bparmentier commented 10 years ago

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
}
svennevz commented 10 years ago

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.

bparmentier commented 10 years ago

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

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