Hubway Bike Share: Ridership Patterns
The skills the authors demonstrated here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.
Contributed by Thomas Kassel. He is currently enrolled in the NYC Data Science Academy remote bootcamp program taking place from January-May 2017. This post is based on his first class project, Exploratory Data Analysis with R, focusing on basic EDA and data visualization.
Introduction
Bostonβs bike share program, Hubway, has quickly become an enojoyable, convenient, and affordable means to navigate the city. Publicly owned by municipalities in Greater Boston and operated by national bike organization Motivate, Hubwayβs increasing popularity is consistent with national trends of greater attention to sustainable transport in metro areas.
Environmental, monetary and convenience benefits aside, most bike share programs have embraced the influx of big data collected by their bike/station technology. Hubway in particular uses the plentiful ridership data for its own business insights, and posts the raw datasets publicly for any aspiring data scientist to investigate. The purpose of this project was to explore general ridership and demographic patterns in Hubwayβs historic data.
Data
Hubway - the Hubway Trip History dataset contains information on over 1M bike trips spanning from the programβs inception in 2011 to mid-2013. Due to long processing times, this initial dataset was subsetted to include only the summer of 2012 (Jun-Sept), which still represented ~300,000 entries. Information about the variables collected (trip duration, start/end station, rider information) can be found at the site link above.
Zipcodes - Each observation (trip) in the dataset above features the riderβs registered zipcode. A reference table mapping those numeric zipcodes to their corresponding neighborhood/towns was compiled using the following public sources: Mass.gov, Cambridge.gov, R package zipcode.
Weather - public daily weather data for Greater Boston was accessed and tabularized from Weather Underground.
Analysis
1) Exploration of General Ridership Patterns
Important features provided in the Trip History dataset are the timestamps (minute-level granularity) of departure and arrival for each Hubway trip taken. These variables allow for analysis of ridership activity from the perspective of our normal temporal routines - commuting, socializing, weekend excursions, etc.
Density plots help to visualize hourly ridership throughout the course of an average weekday or weekend. Here we see an obvious βMβ shape on the weekday density curve, very likely due to commuting activity (roughly including weekday hours from 7-9AM and 4-7PM).
Further analysis reveals that these commuting rides accounted for 33% of total trips (including weekends) during the summer of 2012. Average weekend profiles exhibit an opposite daily profile with peak ridership occurring in the afternoons. A small, but noticeable amount of weekend rides occur from 12AM-3AM catering to more βadventurousβ biker-bar-goers.
We can further solidify weekday-vs-weekend behavior using density plots as a function of total trips and average trip duration. In the right-hand panel we observe a noticeable difference in the distributions of daily rides - on a given weekday, there are 500-750 more rides than a given weekend.
In the left-hand panel we see that the distribution of weekend trips has a mean trip duration of approximately 10 minutes longer than that of weekday trips, with an average trip time of ~25 mins. Hubway rides max out at 30 minutes, so weekend riders tend to make the most of their riding time.
Together, these two observations suggest that Hubway lends itself well to higher-frequency, faster weekday schedules (commuting), in addition to slower-paced weekend routines (recreational rides and sightseeing).
2) Exploration of Rider Demographics
The inclusion of rider information (which is gathered at registration for annual membership) provides interesting potential for analysis of Hubwayβs demographics. Namely, for each ride in the Trip History dataset, the riderβs zipcode, age and gender is also included. Using the compiled zipcode table described in the introductory section, each riderβs zipcode was matched to its corresponding Boston neighborhood or surrounding suburb. The plot below shows the top ten demographic cohorts (i.e. groups of gender-age-neighborhood combinations), by total rides in summer 2012. It is worth noting:
- There were no female cohorts in the top ten ridership groups for either Greater Boston or the Suburbs; all cohorts depicted below are male.
- Because of the low number of riders from the suburbs, the y-axis for suburban cohorts has been scaled up; however on absolute terms, these rides constitute a significantly lower proportion than Greater Boston residents.
Males, of all ages, from the South End and Back Bay neighborhoods, play a very significant role in Hubwayβs membership base; together they made up 17% of all registered Hubway rides during the summer of 2012. Trips are also quite popular among male millenials in other densely populated parts of Boston.
Although substantially smaller by trip volume, Hubway appears to have maintained a loyal member base from the suburbs. This segment is dominated by middle-aged males from nearby Boston towns, making heavy use of Hubway stations located at MBTA hubs (commuter rail or ferry), most notably North Station, South Station and Rowes Wharf Ferry Landing (not shown on graph).
Conclusions
Hubway has solidified its place as a viable transportation option in Greater Boston, as evidenced by incorporation of bike trips into daily routines and high adoption among particular demographic groups.
Integration of external datasets could provide further insights into the drivers for increased ridership. To examine the impact of short-term, localized events, use of publicly available subway data could attempt to draw correlations between daily MBTA maintenance/recorded downtime and increased Hubway rides. Schedules of large city-wide events encouraging travel and sight-seeing (Red Sox games, Boston Marathon, 4th of July Fireworks) could also point to ridership spikes. With an eye to longer-term Hubway growth, study of urban planning initiatives (public spaces, increased transit coverage) and commercial/residential development of new neighborhoods could indicate good candidates for new bike stations.