Data Analysis on Washington D.C Bike Share Demand

Posted on Jun 7, 2020
The skills the author demoed here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Data shows Washington D.C.ย  is home to about 705,749 people. As for any major city, this agglomeration of people in one place puts a toll on the transportation infrastructure. Until last decade, cars were the de facto method of transportation, followed byย  buses and then the metro.

However, except for the latter, traffic is their common nemesis. In addition, the rising numbers of motor vehicles and their emission of carbon monoxide poses a significant concern for its impact on climate change. Consequently, alternate modes of transportation are encouraged to be used whenever possible. One such alternative discussed here is the use of bicycles.

Data Acquisition and Project Objectives:

The purpose of this project is to review the available two years of data of theย  Washington D.C. bikeshare transactions, so as to obtain knowledge to accurately predict hourly bike demand. This could then be used to optimize the bike stocking process and grow the business.Data used for this project was acquired from

Yearly Data Analysis


โ€‹โ€‹โ€‹โ€‹A first look into the data revealed that there are two different types of users: registered users (those who subscribe to aย  monthly or yearly plan) and casual (those who use the service occasionally). As shown on the graph below, registered users account for about 80% of rides for every year in the dataset(2011 and 2012 respectively).

This proportion is consistent per season for every year in the data. In addition, the data showed that demand drops with cold temperature and This proportion is consistent per season for every year in the data. In addition, the data showed that demand correlates to the temperature. The lower the temperature, the lower the demand, and that applies to both user groups.This is illustrated on the plot below which shows demand proportion for each user group per season.

User Group Data Analysis

Once it was established that the two user groups have a consistent demand proportion year after year, it was substantiated to combine both years(given the size of the data) and look at the behavior of each user group individually. Here again, it was confirmed that demand is related to temperature as there was a rise in bike usage in warmer seasons and a decrease in colder seasons for both user groups. This was reasonableย  because generally, people tend to ride when the weather is nice.

With temperature depence established, the next factor to explore was time of day. Given that congested traffic is one of the reasons why some people bike to work, it was intuitive to think such a trend might exist in data. As shown on the graph below, it appeared that both user groups used the bike at different times of day. Registered users have two modes: 8AM and 5PM. It can be deduced here that most of these users are commuters going and coming back from work.

On the other hand, casual users have a steady usage increase from 7AM to 2 PM with a mode at 2 and 3 PM. and then a steady decrease. This shows that both user groups use the bike for different reasons. As Washington D.C is a city that attracts many tourists, it could be inferred that most of these users might be tourists visiting sites during the day.


Given our observation in the data, it is clear that bike demand is correlated to temperature and time of the day. My advice to this business owner in terms of business growth and efficiency will be to offer each user group Peak and OffPeak hour rates at their respective peak and perks during OffPeak to increase usage and most likely revenue.

The next step in this project will be to implement a regression model using dependent variables analyzed above(user type, time, temperature) to predict hourly demand and compare our model to more recent data from the company.

R Shiny App

GitHub Source code

About Author

Patrice Kontchou

Certified Data Scientist with a Masters in Software Engineering (concentration in Artificial Intelligence). Enthusiastic and self-motivated, backed by professional experience driving business insight from terabytes of data using visualization, statistical analysis and machine learning. Strong discipline and leadership...
View all posts by Patrice Kontchou >

Leave a Comment

No comments found.

View Posts by Categories

Our Recent Popular Posts

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