The Traveling Divvyer

Divvy is the bike sharing program in Chicago. Since its implementation a couple of years ago, I had wondered how someone would go about visiting all stations as quickly as possible, and also wondering whether anyone would actually deign to try.

Divvy has released basic station data and historical ride data to the public as part of the Divvy Data Challenge. Using this, I put together a little application to calculate the shortest route from any starting station, as well as calculated how quickly this had been done by the public as a whole (using the data, it is easy to show no one person has actually done this).

The Traveling Divvyer is a riff on classic traveling salesman problem, using Divvy data.
The algorithm used to compute the shortest right is a very straight forward one, using just a one look ahead nearest neighbor method; that basically says that the next station to visit is the closest one that hasn’t already been visited.

The base algorithm and data scraping were coded in Python.
The website is written in Django, and uses D3 and Leaflet for mapping functionality

Take a look.