Mapping Philadelphia’s Bike Lanes with Tableau

hero_biking_blogpost_1024x423_02

Last month, Hero Digital announced our expansion to Philadelphia with the acquisition of Delphic Digital. As most locals know, the best way to get around Philly is by bike – which is great, because we at Hero Digital love to bike.

Below is a map of all roads that have a bike lane in Philadelphia. These roads are colored yellow, while all other roads are grey. The bike lanes can be used to commute to work (as many on the team regularly do) and to connect to more scenic rides on the Schuykilll Bike Trail or Forbidden Drive.

philly-bike-lanes-tableau

Click through for the live data visualization. (Note: due to the large size of the data set, the visualization may take a moment to respond.)

This visualization uses Tableau, a powerful BI tool that helps people better understand their data. It is using data from the City of Philadelphia via opendataphilly.com. The trick of this visualization is that it combines two datasets together via blending (you can also do a “join”) to highlight elements (bike routes) of a mapped dataset (roads). The two datasets are as follows:

All Philadelphia Roads

All Philadelphia Bike Lanes

The All Philadelphia Roads dataset acts as the base layer showing all roads. Before the bike lanes can be highlighted, the roads needs to be map-able by Tableau. To do this, use this tool (press “Run” to use it in browser). Then bring both datasets into Tableau.

To create the map, put the All Philadelphia Roads datasets’ Latitude and Longitude on the Rows and Columns shelves, respectively, then aggregate by average. Polygon ID goes on detail and Point ID goes on Path. All said, it should now look like this:

screenshot_1

To get the roads with bike lanes highlighted, use a common dimension to link the datasets together. In this case, Street Code is common between the datasets. Do this by renaming Street Code in both datasets so they’re the same. Then go to the Bike Lanes dataset and make sure there is a little chain next to Street ID. Press it so it turns orange. The datasets are now being blended. Then, create a calculated field in the primary dataset so that it sees the street name in the Bike Lanes dataset (therefore the street has a bike lane), then mark it as such. Otherwise mark it as not having a bike lane. That equation reads as such:

IF ISNULL(ATTR([Bike Lane Dataset].[Street Name])) THEN “No Bike Lane”

ELSE “Bike Lane”

END

Drag that new calculated field onto color. You have now created your data visualization! Feel free to add filters, legends, or anything else makes it easier to digest. And remember to always wear a helmet.

You can download a packaged workbook via Tableau Public and explore more yourself.

At Hero Digital, we love using data to create valuable user experiences. Let us know if we can help you use data to achieve your business goals.