Friday, December 19, 2014

Should you wait or should you go



Visualizing the usage of Barcelona's public bicycle system looks cool and it might actually give you some general idea about when and where to find a bike. But, imagine you find yourself at a station with no bikes. I certainly have, and I ponder over the same question every time: "Should I wait for a while until a bike arrives, or would it be faster if just walk to the next Bicing station?"

So, after almost 3 months of scraping Bicing's data, 944 lines of code and 2 weeks of non-stop parallel computing on 6 cores, I finally have the answer.

I wanted to share it with you, but I thought I'd rather let you get it yourself. So, I designed this little tool below. I call it BUBADE (Barcelona's Urban Bicycle Anticipation Decision Engine).  You only need to type or select the street where your empty station is. The tool will then tell you if you are better off waiting or walking.
For the geeks among you - there's a table with details. It tells you what's the chance that, by the average time it takes to walk to the 4 closest stations, a bike would have arrived to where you are. It also gives you the probability that there would be bikes on each of the 4 closest stations by the time you arrive (given the condition that there are no bikes on your station).

Bear in mind that these chances are averages. I would not consider them if there's an exceptional event in the neighbourhood, like Fiesta de GrĂ cia or Poblenou Craft Beer Festival.



































If you want to learn more about the methodology I used - stay tuned! I will soon share my R code.

No comments :

Post a Comment

Blog Archive