Leonard Armstrong

Welcome to LeonardArmstrong.Net.

Thanks for following my thoughts on career, politics, and things that interest me. I hope you will enjoy my words and will continue to read and interact.

Exploratory Analysis of Philadelphia's Indego Bike Share Service - 2018

Exploratory Analysis of Philadelphia's Indego Bike Share Service - 2018

Figure 1 - Indego bike and kiosk

Figure 1 - Indego bike and kiosk

Indego is a public bike share service owned by the City of Philadelphia. Bikes are taken from and returned to Indego stations. Each station consists of a high-tech kiosk and a set of bike docks operating 24 hours a day, seven days a week. Each kiosk manages anywhere from 11 to 57 docks. In 2018 Indego served almost two-thirds of a million trips from over 1400 bikes available at 130 kiosks. A typical Indego station with kiosk, docks and bikes is shown in Figure 1. Since it is a public service, Indego makes its trip and station data free, openly available and documented at https://www.rideindego.com/about/data/.

Indego makes trip data available in a series of CSV files, each containing three months, one calendar quarter, of trip data. As of March, 2019, quarterly data is currently available since Indego’s launch in 2015 Q2 through the most recently completed quarter, 2018 Q4.

Indego station data is made available in either GeoJSON or General Bikeshare Feed Specification (GBFS) formats. There is also a simplified CSV station table available, but that table lacks many of the fields available in the GeoJSON and GBFS data. The GeoJSON and GBFS station data is available live, in real time.

After data cleansing, the Indego data set provided information on 636,461 trips, 130 stations/kiosks, and 1,466 bikes.

When Are People Riding?

The first set of exploratory analyses were undertaken to better understand the time patterns of Indego’s ridership at multiple levels of scope. Figure 2 charts the volume of bike trips taken each month in 2018. Each month is stacked with the pass type volumes used within the month. Indego pass type descriptions can be found at https://www.rideindego.com/passes/. The data shows a near-normal distribution of monthly trip volumes peaking in July.

Figure 2 - Indego bike trip frequency by month

Figure 2 - Indego bike trip frequency by month

It is evident that Indego30 is the most popular plan used for 2018 trips. Also, the Day Pass was introduced in April and effectively eliminated the Walk-up plan that was slated to be phased out. While Walk-ups were still used in very small percentages until the end of the year, this data shows that the Day Pass, available directly at the kiosks, provided a successful transition plan, satisfying the needs of most walk-up users.

Figure 3 shows the 2018 Indego trip frequency distribution organized by day of the week with each day stacked by trip type volume. A trip type is either round trip or one way. Again, we see a fairly normal distribution, this time peaking on Wednesdays

Figure 3 - Indego bike trip frequency by day of the week

Figure 3 - Indego bike trip frequency by day of the week

One-way trip volumes far exceed round-trip volumes and round trips have a more uniform distribution across all days of the week.

Figure 4 shows 2018 trip frequency organized by the hour of the day and stacked with day of the week coloring. At a macro level there is a bi-modal distribution with peaks occurring in the 8AM hour and the 5PM hour, most likely corresponding to trips to and from work for a normal business day. There is also an embedded normal distribution during the weekend days, stacked at the bottom two colors of the graph. The weekend distribution peaks in the afternoon hours, between noon and 4PM.

Figure 4 - Indego bike trip frequency by hour of the day

Figure 4 - Indego bike trip frequency by hour of the day

How Are Stations Being Used?

Next, station distribution and usage is analyzed. An outline of Philadelphia’s Y-shaped city boundaries and the clustered locations of all Indego bike stations is shown in Figure 5. While Indego is a city-owned service, this figure shows it is not a city-wide service. Instead, Indego bike stations appear to be targeted at locations that have one or more of the following characteristics:

  • A high volume of businesses and/or a base of large employers.

  • Nearby high-volume Universities.

  • A heavy population of millennial residents.

Figure 5 - Locations of Indego bike stations inside Philadelphia’s city limits.

Figure 5 - Locations of Indego bike stations inside Philadelphia’s city limits.

Figure 6 zooms in on the southern portion of Philadelphia that includes bike stations. This image shows stations marked by one of four colors. The four colors represent the 2018 usage volumes of the stations.

  • Light blue: Less than 5,000 trips served from these station in 2018.

  • Medium blue: Between 5,000 and 10,000 trips served from these stations in 2018.

  • Orange: Between 10,000 and 15,000 trips served from these stations in 2018.

  • Over 15,000 trips served from these stations in 2018.

Figure 6 - Locations of Indego bike stations - zoomed view

Figure 6 - Locations of Indego bike stations - zoomed view

Figure 7, shows the volume of 2018 trips taken from each starting station with the color stack representing the pass type used for trips at the station. Although not labeled, each point along the x-axis represents one of Indego’s 130 stations.

Figure 7 - Indego trip volumes by station

Figure 7 - Indego trip volumes by station

The two stations called out with red arrows have a disproportionately high volume of Day Pass trips. These are the only two stations with Day Pass percentage volumes of over 50%. They are:

  • Station 3057 with 6,682 out of 11,998 trips using day passes. (55.7%)

  • Station 3049 with 2090 out of 4,073 trips using day passes. (51.3%)

The map provided in Figure 8 shows two white markers representing stations 3057(top left) and 3049 (bottom right). Station 3057 is located on the bank of the Schuylkill River, not far from the Philadelphia Art Museum, and station 3049 is located on the bank of the Delaware River in the heart of Philadelphia’s Penn’s Landing district. Both spots provide scenic routes along the water’s edge.

Figure 8 - Location of Indego stations with a higher-than-expected volume of Day Pass use

Figure 8 - Location of Indego stations with a higher-than-expected volume of Day Pass use

Figure 9 shows a heat map analysis of routes taken between different start and end station combinations. (Only the first 100 stations, by name, are shown.) Individual start stations are enumerated on the x-axis and end stations on the y-axis. Although the scale of the image combined with the volume of stations make pinpoint analysis difficult, a number of hot-points and symmetries emerge when using the artist’s trick of squinting to discover patterns.

There is a clear pattern on the diagonal, on the line that represents x = y or the start station equal to the end station. In other words, this line represents round trips. While it was shown in Figure 3 that one-way trips far outnumber round trips, the heat map shows that the 130 possible round-trip routes have notable ridership when compared to the remaining 16,670 one-way routes.

Figure 9 - Indego trip heat map

Figure 9 - Indego trip heat map

Although more difficult to see with the naked eye, there are also some hot-point symmetries across this diagonal. A couple of symmetric hot spot pairs can be seen toward the bottom left hand corer of the figure. On the left, you will see hotter spots at each ends of these symmetries. These are pairs of one-way routes taken between a set of two stations, perhaps due to one-way ridership in the AM and ridership in the opposite direction in the PM.

The single hottest (darkest) point is the most taken 2018 route and can be found about halfway up the one-way trip diagonal. This point represents round trips out of and into Indego station 3057, a station previously seen in Figure 8, located on the bank of the Schuylkill river.

How Long Are Trips Taking?

Trips are charged in either one hour or half-hour segments. Figure 10 is a Pareto chart showing trip frequencies in half-hour increments. (All trips lasting from one-minute to 30-minutes count as a one half-hour trip. Trips from 31-minutes to 60-minutes count as a two half-hour trip. Etc.)  The graph is limited to trips taking five hours or less.

Figure 10 - Indego trip length Pareto chart

Figure 10 - Indego trip length Pareto chart

Approximately 89% of all trips take one half-hour or less and 96% of all trips are complete within the first hour. With so many trips taking less than one half-hour, the granularity of this graph still leaves a lot of questions about trip duration. Figure 11 shows the minute-by-minute frequencies of trips taking under one half-hour.

Figure 11- Frequency of trip duration for Indego trips taking less than 30 minutes

Figure 11- Frequency of trip duration for Indego trips taking less than 30 minutes

As previously seen in Figure 3, the majority of trips are one-way, but we see a spike in very short round trips of one- to two-minutes. The mathematical mode of trips taking less than one-half hour is eight minutes with a log-style drop-off after the eight-minute mark.

What Bikes Are Being Used?

Figure 12 show bike usage in simple trip volumes. The Indego bike fleet consists of 1,466 bikes, each represented by a very thin line on the x-axis. Clearly, bikes in the Indego bike fleet were not used uniformly used in 2018. A small set of 10 electric bikes, represented by thin red lines on the right side of the image, were introduced to the fleet in early November 2018. The use of these electric bikes is disproportionately heavy, given they were only available for approximately 10% of the year and not during the peak ridership months.

bike-use.png
Simulating the Monty Hall Problem in Python - New Article Published on Medium

Simulating the Monty Hall Problem in Python - New Article Published on Medium

An Analysis of the Epicurious Recipe Dataset

An Analysis of the Epicurious Recipe Dataset