The Citi Bike operations team faces a daily challenge—ensuring that a consistent supply of bikes is available for riders at each docking station. Additionally, are there are spots available to receive bikes at a rider's destination? In this article, we discuss how we analyzed the Citi Bike trips and stations datasets to answer these questions. By “reading between the dataset lines” we can reveal how Citi Bike satisfies rider demand for bikes.
Citi Bike is a bike sharing system in the NYC area named after lead sponsor Citigroup and operated by Motivate, using technology from Lyft. It primarily serves the boroughs of Manhattan, Brooklyn, and Queens and its 169,000 plus annual subscribers take over a 100,000 trips⁄month, reducing emissions, road wear, transit congestion, and improving public health. The bikes themselves are 20kg and have a unisex step-through frame with an upright seating position and can be checked out from numerous dock stations spread across the city.
This project focuses on analyzing the supply of bikes. To understand the demand side of the story, take a look at our previous article, where we analyzed rider behavior and created a model to predict trip demand.
Consider the flow of bikes through a popular commuter stationE 24 St & Park Ave S on Monday, September 9, 2019. This particular station has a maximum capacity of 54 bikes. However, there are more bikes being ridden out of the station than coming in. Even if the station were to start out the day fully-stocked, it would get depleted halfway through the morning commuter rush hour. A significant number of riders would be without a bike! This would quickly lead to dissatisfied members canceling their subscriptions.
How is it possible that a station supplies more bikes than its capability? Well, through the Citi Bike operations team’s diligent rebalancing efforts. The team physically moves bikes from one station to another in order to:
- Ensure there are sufficient bikes to satisfy predicted demand
- Ensure there is space at destination stations to receive incoming bikes
- Minimize the number of unused bikes idling at unpopular stations
Citi Bike employs several methods to manage rebalancing needs:
- Valet Service - employees staff popular stations to manage incoming and outgoing bikes, artificially increasing station capacity and temporarily alleviating rush-hour problems
- Bike Trains - employees ride ebikes towing carriages of 12-16 bikes—ideal for going in and around tight neighborhood streets
- Motorized Vehicles - higher-capacity vans operate 24/7 to keep bikes moving to and from the most popular stations
- Bike Angels - launched in 2018, this program grants Citi Bike riders (non-employees) traveling along in-demand rebalance routes a free trip and reward points
The Citi Bike trips dataset does not contain information on individual bike rebalances. Nor is that generally available online except as aggregated data in monthly reports. So, how can someone tell when and where a bike was rebalanced?
The easiest method for a given bike is to compare the starting station for each trip with the ending station of the previous trip. If the bike appears to have teleported from one station to another between trips, it most likely was rebalanced!
We focus our exploratory data analysis on:
- Basic statistics
- The impact of the bike angel program
- When and where bikes are rebalanced
- The impact of station elevation on rebalancing
Then, we explore how this data could be used to reverse-engineer actual rebalancing operations. Finally, we visualize the data over maps of New York City.
To aid our exploratory data analysis, we built the below tool to show station information. Hover over the stations to see station name, elevation, number of trips taken from that station in 2019, and number of bike rebalances that year.
You can also check out our python dash application for more map visualizations.
The number of trips rebalanced by Citi Bike increased with general ridership for the first few years after the 2013 launch in NYC. But, in 2018, it drops dramatically.
This coincides with the introduction of the Bike Angels program and illustrates just how effective it was.
|Rebalances⁄Year||Trips⁄Year vs. Rebalances⁄Year|
We also found that almost every bike in service was rebalanced at least once each year and almost every station was involved in rebalancing operations. See here.
We wanted to see where bikes were being rebalanced, so we faceted the data by NYC borough. The vast majority of trips are in Manhattan, so it is not surprising to see that the majority of rebalances are also there. Most bikes are rebalanced from one Manhattan station to another.
However, there is still considerable effort required to move bikes across boroughs. Below, we see a log graph of bikes rebalanced. Without the log transformation, Manhattan would dwarf all other boroughs.
We can see the same information visually. Here, we see that Manhattan has all of the top 100 stations by trips.
|number of trips|
And the the same is true for stations ranked by number of bikes rebalanced from and to that station.
Stations with the highest rebalance activity mostly serve commuters traveling from home to work. These home-to-work routes often have bikes being rebalanced in both directions. In the mornings, a high number of trips are made from the “home” station to the “work” station and so bikes have to be rebalanced in the opposite direction to maintain supply. In the evening, the reverse problem is faced by the Citi Bike bike operations team. We see the pattern exhibited in the chart below.
Prior to the launch of the Bike Angel program, bike rebalances followed a similar seasonal pattern to trip demand, with considerably more activity in the summer months. Post-launch, this seasonality still exists, but to a much lower degree.
We also found that the Bike Angel program reduced rebalance needs on weekends relative to the rest of the week.
When does Citi Bike rebalance bikes?
The data doesn’t tell us when a bike was rebalanced—only when the next trip started after the bike was rebalanced. Therefore our rebalance timing estimates (in hours) reflect the maximum time frame in which the rebalance could have occurred. While not perfect, we will assume Citi Bike does not needlessly rebalance bikes and this data is fairly representative of actual movements.
Aggregate data shows bikes are frequently used shortly after rebalancing—confirming considerable effort is required to satisfy immediate demand. Longer gaps between rides suggest the bikes were rebalanced to re-stock stations during periods of low-use, such for known trip patterns like commutes, or to ensure less-used stations have bikes. We see this usage pattern in the graph below.
There was a considerable drop in immediate-use rebalances following the launch of the Bike Angel program in 2018. This may also be the result of improvements to the Valet Service, allowing a commuter station to “overflow” with bikes that are then moved in bulk overnight.
We wanted to find out how station elevation plays an effect on rebalancing. While NYC is close to sea level, there still exist hilly areas that can be a pain to climb. Our hypothesis was that bikers generally do not want to bike uphill, so stations that are at high elevations would have more bikes taken out than coming back in. So, Citi Bike would have to lug these bikes back up to the higher elevation stations.
We found that, in aggregate, more bikes were rebalanced to higher-elevation stations than away from them. The opposite is true for lower-elevation stations. This suggests that bikers who ride downhill sometimes find other modes of transport for return trips, not wanting to ride the heavy Citi Bikes back uphill. With Citi Bike electrifying its fleet, this pattern might go away as riders use ebikes.
In the below graph, we see that the there are more bikes rebalanced to higher-elevation stations (the area under the right half of the distribution) than to lower-elevation station (the area under the left half of the distribution). Focusing on years before (2016) and after (2019) the launch of the Bike Angel program, not only are there fewer total rebalances as previously discussed, but also there is a change to the distribution—the curve flattens out and shifts right, indicating that a larger percentage of bikes are rebalanced to higher-elevation stations in 2019 than earlier.
Even a free trip isn’t enough incentive to pedal uphill for the Bike Angels.
We can glean more information about how Citi Bike rebalances bikes if we consider movement between a pair of stations as a “rebalance route” rather than looking at just individual stations.
The vast majority of rebalance activity occurs between a small number of station pairs in Manhattan. This makes sense in the context of commuter bike usage, where there is a need for a constant flow of bikes away from destination stations to origin stations to keep up with demand.
Notice some of the top routes are just the reverse direction of each other. Visualizing bi-directional flow between station pairs further emphasizes how critical rebalance operations are between a small number of station pairs. If Citi Bike focuses on keeping these routes properly balanced, the majority of ridership demand would be satisfied.
We visualized the top station pairs for 2019. Hover over the arcs to see the delta bikes rebalanced between a station pair. The arc thickness indicates the netbikesnet = bikesfrom - bikesto number of bikes rebalanced and color indicates direction.
We see two main patterns:
- Bikes are moved from lower Manhattan to the Upper West Side along long routes. Ideally, Citi Bike rebalances these routes using vans.
- There are a lot of station pairs clustered in the East Village. Some station pairs are just a couple of blocks apart, so Citi Bike can manually rebalance these stations or use bike trolleys.
Investigating rebalance timing of the top 5 stations by number of bikes rebalanced reveals that not all are managed in the same way. Some seem to have the majority of rebalances done overnight while others seem to be more frequently rebalanced for immediate use.
If we focus on a single station, for example E 10 St & Avenue A, and look at its top rebalance routes, we can see there are distinct uses for each one. For this station, rebalancing from Cooper Square & E 7 St is typically done to satisfy immediate use demand, while rebalancing from E 14 St & Avenue B almost exclusively is done to fill the station during hours of low activity.
It should be noted that rebalance operations are probably more nuanced than bikes being moved along static routes involving only two stations. A van might stop at several stations along a circuit—picking up or dropping off bikes at each one. There may also be other critical decision points not obvious from an aggregate-focused analysis like ours.
However, combining our analysis with a time-series model, it could be possible to reverse-engineer Citi Bike’s rebalance operations and create a model predicting a station’s need for rebalancing. Additionally, using the real-time station utilization data from the Citi Bike
station_status feed, a more sophisticated, real-time model could be created.
There are endless ways to dive into trip and rebalance data to understand needs and motivations of bike-share participants or the general movement of individuals around New York. This analysis focused mostly on data aggregated over the years available (2014-2000) which helps us interpret rebalance operations as a whole.
Other future work could include:
- Create a (real-time) model to predict when a station needs to be rebalanced
- Identify an actual route a Citi Bike van employee might take to rebalance bikes, adapting the traveling salesman problem to bike station rebalancing. Time of day needs to be taken into consideration as different stations have different times they need to be visited
- Focusing on a specific year, season, or days to understand and predict usage and rebalance needs with respect to changes in overall ridership and events such as holidays and professional sports games
- Cost-benefit analysis of rebalancing operations. Also, quantifying savings from Bike Angels program
- Comparison of rides and rebalance statistics across years as docking stations are introduced, moved, or retired to evaluate past decisions and inform future strategy
Citi Bike’s operation team has a difficult problem to solve and they do so every hour of every day of every year across a wide geographic region to keep members happy.
They are helped significantly by the Bike Angels program in their efforts, but even those intrepid riders are put off by rebalancing to high-elevation stations. The Bike Angels program also helped to flatten the rebalancing need, particularly immediate-use rebalancing, and also reduced seasonality. We identified the top routes as well, which Citi Bike could focus on as per the Pareto principle.
We hope this analysis was helpful in understanding Citi Bike’s rebalancing operations. If you haven’t already, check out our previous articles on predicting Citi Bike trip demand or predicting property sale price in Ames, Iowa. Also, take a look at our Citi Bike app!