Tuesday, August 6, 2013

Plan your bike rides with aggregated Strava data

Edit 2013-08-17: Please read the update at the end of the post.

Most people would not think of Strava as a planning tool. Sure, it's a great performance and training tracker and provides lots of opportunities to compete with fellow cyclists and yourself, but its use for route planning is less obvious.

The basic problem is this: You want to plan a ride in area that you don't know well. There are many roads, but how can you tell apart the heavily trafficked, narrow highway from the lovely scenic back road? There already are a number of tool that can help, but they all have some shortcomings. For the amount of traffic on a given road, one can look up traffic count data from state or local departments of transportation (e.g. New York State). Depending on your location, this works reasonably well for major roads, but the small back roads that are often the nicest to ride on often lack count data. Google Street View can give you a good general impression of a road -- how wide is it, does it have a shoulder, are there big potholes? -- but it can be tedious to check longer stretches of a road. OpenStreetMap allows everyone to add useful information to their geographic database, like the existence of shoulders, the smoothness of the road, or its speed limit; but so far a lot of those features are not displayed on the map and the data especially in North America is very incomplete.

Probably a nice road for cycling -- unless the road is only this empty on early Sunday mornings ... (Screenshot from Google Street View)


So wouldn't it be great if you could just ask a fellow cyclist what she thinks of the road in question? Or, as different cyclists have different preferences, if you could ask a hundred cyclists? Or a thousand? Well, why not just do that: Hundreds of thousands of athletes log their bike rides on the Strava website, and fortunately Strava provides an API that allows other applications to access that data. The folks at raceshape.com offer a number of different analysis tools, but for our purposes the "global heatmap" is the one that's most useful.

What the heatmap does is to basically accumulate all the GPS data from Strava and overlay it on a map, with the color of the tracks representing the number of times a road has been ridden on. If you look at Montreal, for example, you can very clearly see some of the most popular cycling routes: the Estacade across the St. Lawrence, the Lachine Canal bike path, or the various ways to climb and descend Mont Royal.

Screenshot from raceshape.com

 Just like the approaches described above, there are limitations to the global heatmap for ride planning as well: Less populated areas often don't have sufficient data to be displayed on the map. In addition, it's important to keep in mind that Strava is mostly used by road cyclists, evidenced by the fact that for example the very popular bike path along the Chambly Canal doesn't even appear on the map -- presumably because it has a gravel surface.

Some traces of activity on the two highways along the Richelieu River, but nothing on the bike path (Screenshot from raceshape.com)
That being said, my own experience with using the map for route planning has been very positive. It has allowed me to discover some great cycling roads -- and avoid some of the not-so-awesome ones.

Update: As Andy and Brian have pointed out in the comments, the data used for the global heatmap is more limited than I thought: Instead of representing all or even a large portion of Strava ride data, it is only a small subset of those Strava users who explicitly have allowed the raceshape website to access their data. And at the moment there isn't even a link on the raceshape homepage to do that. If you would like to have your data included and get your own personal heatmap, use this link.

8 comments:

  1. Thanks for the post! Another limitation is that the heatmap doesn't show rides that don't contain a segment that has been raceshaped. I'm not sure what that means in terms of how much of Strava's data is represented on it.

    ReplyDelete
    Replies
    1. Hm, I must admit that I don't fully understand what "raceshaped" means, as I've never used their other services. But when I look at roads I know and compare them with their popularity on the global heatmap, things seems to match up fairly well. Thanks for pointing out this potential limitation, though!

      Delete
  2. Being "raceshaped" means that a user allows the raceshape website to compile the data to add to their heatmap. Essentially that means that relatively few Strava users' data will show unless many more people hear about it and have their data compiled in this way. It's been very apparent from Ithaca data (at least a few months back when I first heard of this). I have a lot of rides mapped, and some of random backroads that are unlikely to have the entire route randomly replicated by someone else - so I could easily see that my data (some 20,000 miles of it) was creating a very large portion of the 50-mile radius of Ithaca. A few more riders "raceshaped" their data, but there's still empty spots on the map where I know people are riding.

    But now Strava has their own route planning software. I upgraded to premium for the month to try it out. It works very well in some ways, and they seem to claim that it uses all riders data to help stick you to the popular routes. The main issue I have though, is that it still doesn't show you those routes. For an example, I knew I was headed to VT and decided to try to make a 20 mile route. I clicked around on the map, but in a 20 mile loop, without the site showing suggestions, I found that I'd have to click a bunch of farther destinations to get an idea of what they were using others' ride data for. But it's brand new, so maybe in a few months they will have a better system for showing these roads.

    ReplyDelete
    Replies
    1. Ah, thanks. So where do you allow raceshape to use your data? I can't find an option anywhere on their website. Or is it only by using one of their tools for a specific ride individually? If it's the latter, I'm somewhat surprised that the heatmap data is actually any good.

      Delete
    2. Their link went away - maybe too many people were overloading the system. Just go to http://x.raceshape.com/heatmap/ and you authorize the use of your Strava data and it will compile a personal heatmap.

      Delete
    3. Thanks again, Andy! This is a pretty big limitation for the route planning approach described in my post. I'll add a note to clarify.

      Delete
    4. So I guess the public link going away on raceshape was the first sign of the integration of personal and global heatmaps into Strava Premium. Currently you will get a notice that the personal heatmap will be discontinued soon -- we'll see if they leave the global heatmap online.

      Delete
    5. Strava announced it today. It is very similar, though the map is black and white which I don't care for. Hopefully they add some functionality to it, but currently you can pan and zoom and nothing else.

      Delete