NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship 🏆 Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release 🎉
Free Lesson
Intro to Data Science New Release 🎉
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See 🔥
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular 🔥 Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New 🎉 Generative AI for Finance New 🎉 Generative AI for Marketing New 🎉
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular 🔥 Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular 🔥 Data Science R: Machine Learning Designing and Implementing Production MLOps New 🎉 Natural Language Processing for Production (NLP) New 🎉
Find Inspiration
Get Course Recommendation Must Try 💎 An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release 🎉
Free Lessons
Intro to Data Science New Release 🎉
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See 🔥
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > Big Data > Data Driven Rebalancing of Citi Bike Operations

Data Driven Rebalancing of Citi Bike Operations

Rishi Goutam, James Goudreault and Srikar Pamidimukkala
Posted on Apr 1, 2022

Introduction

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 data sets 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.

What is rebalancing? Why do we care?

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

How does Citi Bike rebalance bikes?

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

Identifying Rebalance Movements

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!

Analyzing the Data

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.

Visualizing dock stations and bike rebalancing

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.

Open this visualization in a new tab
NYC Citi Bike stations (2019)

You can also check out our python dash application for more map visualizations and our presentation slides.

Rebalance Operations

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

 Scroll to see the above side-by-side images

 

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.

from to

 Scroll to see the above side-by-side images

 

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.

Seasonality

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.

Rebalance Timing

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.

Station Elevation

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.

data

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.

data

Investigating rebalance routes

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.

Top routes for bike rebalancing

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 net bikes rebalanced between a station pair (bikesnet = bikesfrom - bikesto). The arc thickness indicates the number of bikes rebalanced and color indicates direction.

Open this visualization in a new tab. Bikes are rebalanced from blue to red stations along the arcs

Click image to open visualization

We see two main patterns:

  1. Bikes are moved from lower Manhattan to the Upper West Side along long routes. Ideally, Citi Bike rebalances these routes using vans.
  2. 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.

When are routes rebalanced?

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.

Future Work

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

Conclusion

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!

About Authors

Rishi Goutam

Data scientist and software engineer. Previously, I was a software developer at Microsoft (Azure) and Amazon (Kindle). You can find me at www.goutam.io
View all posts by Rishi Goutam >

James Goudreault

Data Scientist with nine years prior experience in manufacturing and operations. I'm passionate about using data to solve complex problems with demonstrated ability to plan, communicate, and achieve sustainable results. I love finding clever ways to approach situations...
View all posts by James Goudreault >

Srikar Pamidimukkala

Mathematically fluent data scientist with 5 years of technical and engineering communication skills across a wide range of audiences and expertise levels. B.S. in Materials Science and Engineering from Georgia Institute of Technology. Currently studying in an M.S....
View all posts by Srikar Pamidimukkala >

Related Articles

Capstone
Catching Fraud in the Healthcare System
Capstone
The Convenience Factor: How Grocery Stores Impact Property Values
Capstone
Acquisition Due Dilligence Automation for Smaller Firms
Machine Learning
Pandemic Effects on the Ames Housing Market and Lifestyle
Machine Learning
The Ames Data Set: Sales Price Tackled With Diverse Models

Leave a Comment

No comments found.

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day ChatGPT citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay football gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income industry Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    © 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application