A Quarter-of-a-Million Healthy Rides

A Visualization of Pittsburgh’s Bike Share System

Steve Cotter
Jun 18 · 5 min read

Pittsburgh’s Bike Share System, Healthy Ride, launched in June of 2015. By June 30, 2018, riders had made 238,467 trips. The network currently includes 52 stations and continues to expand. With all this data, I just had to build something.

An animation of ride arcs over time.

I first experimented with this data by animating ride arcs between stations in proportion to how long the ride actually took. But that was many years ago, and now there are about six times the number of trips in the available data. What can we learn about how people use the bike share program from all this information?

Stations

First, let’s map the 52 bike share stations which are mostly are located in the city’s eastern neighborhoods.

Pittsburgh’s Bike Share network comprises 52 stations.

Street maps fail to capture the topography of the city, which has a lot of hills. Many are quite steep. Adding topography to our map helps to explain the geographic distribution of the stations.

Pittsburgh has a lot of hills.

Trips

Let’s now look at trips. Which stations are busiest? It’s easy enough to convert our station map in a bubble plot.

A bubble plot of stations sized by their number of trips.

Here we can see that the busiest stations are on the Southside, Downtown, and in the Strip District. In fact, the busiest station is Southside Works, with 12,641 trips or about 5.3 percent of all trips, followed closely by Liberty and Stanwix, with 12,021 trips, and Market Square with 11,709. As we can see, these areas are very flat, making them more bike-friendly. What we can’t see in this particular map is that they are also very close to bike lanes and trails.

The least busy station is near the center of the map on aptly named Centre Ave & Kirkpatrick St. This station is isolated by its surrounding terrain in the middle of the Hill District. While it may not be as busy as the tourist-filled areas of Market Square, with 662 trips, it is certainly being used and may be a vital connection for residents who are up for the 250 foot ascent back up the hill.

The Network

The trip data include the starting stations and the return station for each trip, forming a directed graph. Let’s add the edges to our bubble plot above. Here, the opacity and weight of each line is scaled to the number of trips between those stations. To incorporate trips that start and end at the same station, I also shaded and weighted the border of each station circle.

A visualization of bike share trips between stations, forming a directed graph.

Now we can see which stations are related based on the trips between each pair. Downtown has strong connections to the North Side, the Strip District, Southside, and Lawrenceville. Oakland, Shadyside, and Bakery Square have strong interconnections, as do Shadyside, Bloomfield, and Lawrenceville.

Of all trips, 26.7 percent or 63,862 began and ended at the same station. Looking at this statistic for individual stations reveals an interesting distinction. Some stations, including the busiest, are what I’ll call out-and-back stations — the bike is more likely to be returned to the same station than to another. I’ll call the others commuter stations — the bike is more likely to be returned to a different station. The vast majority of stations — 42 of 52 — are out-and-back stations. Only 10 are commuter stations. That’s interesting. So which stations are these?

Fifth Ave & S Bouquet St Commuter

6,309 rides, 2.6% of total

The most popular destination station from here is Boulevard of the Allies & Parkview Ave with 18.8 percent of trips taking 14 minutes on average. These are likely students riding from their apartments in South Oakland to class and back.

Fifth Ave & S Bouquet St

17th St & Penn Ave

5,980 rides, 2.5% of total

The David L. Lawrence Convention Center is the most popular return station from here with 16.6 percent of trips. These bikers are out joy-riding with an average trip duration of 30 minutes.

17th St & Penn Ave

Boulevard of the Allies & Parkview Ave

5,265 rides, 2.2% of total

Here go those students again. They must be late for class with 25 percent of trips heading back up to Fifth Ave & S Bouquet St in only 9 minutes, compared to the 14 minutes on the way down.

Boulevard of the Allies & Parkview Ave

Ross St & Sixth Ave (Steel Plaza T Station)

4,354 rides, 1.8% of total

As the last of the 10 commuter stations I profile, the most popular destination is S 12th St & E Carson St on the Southside taking an average of 25 minutes.

Ross St & Sixth Ave (Steel Plaza T Station)

To find clusters of stations quantitatively, I applied Spectral Clustering using the proportion of trips between each pair of stations as the measure of similarity. In the map above, imagine that the lines between stations are actually strings. Stations with more trips have thicker strings strung between them. Spectral clustering tells us how to divide up the stations into a given number of clusters so that we cut the fewest and thinnest strings. This reveals the clusters of stations formed by trips.

Results of Spectral Clustering with six clusters.

With the number of clusters set to six, we have three large clusters — 17 stations combining Shadyside with East Liberty and Bloomfield; 15 stations comprising the North Side combined with northern Downtown and Lawrenceville; 13 stations from the Southside grouped with the southern stations Downtown, and the southeastern stations in Oakland. We also have one smaller cluster of 5 stations in Oakland and two stations that are each in their own cluster, the Healthy Ride Hub and Centre Ave & Kirkpatrick St.


If you’d like to explore the data further, check out the interactive visualization. It’s written in React.js and uses the wonderful Leaflet.js library for mapping. I crunched the numbers in R. All the code is available on GitHub.

An interactive visualization of Pittsburgh’s Bike Share System.

    Steve Cotter

    Written by

    Plays with data. It’s a mess.