When a bikeshare station is empty, or an app tells you it’s only got a bike or two left, should you just try another station? In both cases, waiting it out is often the best bet for getting a bike most quickly.

Photo by Mr.TinDC on Flickr.

A team of data scientists at TransitScreen recently put some thought into how to make information about bikeshare more helpful. Rather than just showing “0 bikes” at an empty station, for example, we wondered whether we could predict how long you would wait to get a bike at that station.

Using Capital Bikeshare data from 2012 through 2014, we calculated the probability of the bike count increasing or decreasing within five minutes. We did this for each station, then we smoothed this probability across hours, days, and months.

We looked at five different stations where more than 10 bikes per hour were turning over, but ended up looking most closely at the Thomas Circle station at 14th & M St NW. This 33-dock station was particularly interesting since its place on a border between residential and commercial neighborhoods leads to rapid turnover throughout the day.

We noticed the wait was most predictable at bikeshare stations that see a lot of turnover, like Thomas Circle. When that’s the case, it’s highly likely a bike will be available within a reasonable amount of time (even if you’re in a hurry). And when there aren’t many bikes left at a station, there’s still a good chance that one will be available within a given five minute stretch.

If it’s rush hour, waiting is a good call

Imagine you’re working near Thomas Circle and looking to run an errand at 5 pm on a Tuesday. You rush over to the bikeshare station only to find it empty. What should you do?

The data shows that if you wait for five minutes, there is a 50% chance a bike will appear. Considering how long it might take to walk to the next-closest station, five minutes might not be so bad!

If the same situation came up at 1 pm, however, you’d only have a 20% chance of getting a bike within five minutes. Waiting would probably be a waste of time, and you might want to find another bikeshare station (or choose another transportation mode altogether).

Chance of bikes appearing within five minutes at different times of day. The station is Thomas Circle, the time is a weekday during May. Graphs from TransitScreen.

It’s rare for a station to go from having few bikes to actually having zero

Let’s say that next week, at the same time, you check an app like TransitScreen before leaving your building. This time, the dock isn’t empty…but it only has one bike.

What’s the chance there won’t be any bikes left after the five minutes it takes you to walk there? It turns out even at the busiest time, evening rush, it’s still 60% likely a bike will still be there when you arrive.

Chance of a single bike remaining after 5 minutes at different times of day. Station is Thomas Circle, time is a weekday during May.

Similar ideas hold for returning bikes to full stations

It’s not uncommon for people to get “dockblocked,” which is when you go to return a bikeshare bike but the station is full.

Anecdotally, this seems even more common than people waiting at empty stations. It’s possible that’s because it’s just easier to see a person waiting with a bike rather than one who is empty-handed. It could also be that people who need to return bikes are willing to wait longer because they’ve just finished a ride and they’re feeling tired.

Either way, like with empty stations, we predict that in a lot of cases, it makes sense to wait rather than find another station.

We can do similar studies for other stations

We used Thomas Circle as our example, but as long as it has open bikeshare data, we can study stations with high bike turnover in any city —New York, Boston, London, or Paris— With a combination of “big data” and data science, it turns out bikeshare systems are surprisingly predictable!

Three dockblocked riders patiently waiting in Dublin. Photo by Ryan Croft.

I’d like to thank Erin Boyle for doing the coding and analysis for our recent research. Dan Gohlke shared his CaBiTracker data store with us, and we used open source code from the Data Science for Social Good group.

Matt Caywood is a DC resident and co-founder and CEO of TransitScreen, which brings live transit information displays into public spaces all over the world. He co-founded Mobility Lab’s Transit Tech project and is an advocate for open transportation data.