Interactive Road Orientation Distributions – How Ordered is Your Town?

San Francisco Road Orientation DistributionsAn image created by Seth Kadish at Vizual Statistix caught my eye in my Twitter timeline yesterday showing road orientation distributions (i.e. what directions the roads go in) for a number of US cities.  Being British, the idea of roads forming a nice, thought-out pattern is completely alien to me and takes all the fun out of trying to get lost but the visualisations intrigued me none the less.  The calculations used by Seth had a few limitations as the length of each street didn’t influence the plot and a twisty street would only register in a single orientation rather than being split appropriately.  So time to step up to the plate to see if I can find a more interactive and representative way of doing the same thing.

Try it out

For those wanting to get straight to the action then here’s the link: veloviewer.com/roads

Getting the data

Fortunately as well as providing raster (image) tiles for their maps, OSM (Open Street Map) can also provide vector maps which break down each road into small chunks of straight road that are joined together to make the full map for a given tile.  Pulling in that data for a chosen map and I’ve got the data for a huge collection of bits of road.  Rounding those up to the nearest 5 degrees and summing the actual distances for each chunk and hey presto, an accurate distribution of road orientation distances!  Rendering them out using a bit of d3 magic and ther you have it.

Just drag the map around and zoom in and out as required to get the plots for anywhere in the world.

Examples

Road Orientation Distribution - Austin, Texas

Austin, Texas.

Road Orientation Distribution - Sheffield, UK

My home town of Sheffield, UK. That’s more like it!

Road Orientation Distribution - San Francisco

San Francisco, California.

0 thoughts on “Interactive Road Orientation Distributions – How Ordered is Your Town?

  • I thought about a routeplanner which calculates the best route, considering the direction of the roads, the direction of the wind and the characteristics of the area (trees, buildings). You’re app fills in a bit of this application, although it will be difficult to calculate all these variables.

    • I started building a route/segment planner early last year that was to take into account winds to help. The actual routing was too flaky/hard to implement using OSM for some reason so gave up but still have an improved segment finder in the pipeline.

  • It’s fascinating that San Francisco is so close to the cardinal directions, but not right on. I would love to know the history of this…i.e. was it the first road along the coast that set it?

  • This is really interesting. Now, would it be possible to exclude certain roads? Motorways spring to mind and maybe an option to exclude A roads. I don’t know how they are represented by the map data.
    Would it then be possible to superimpose the rides you have done on top of this. Might give you an idea of an untapped area to ride in.
    Sorry, you probably hate posts like this.

    • There is a distinction between the different road types so yes, I’ll look to add in some filters.
      I won’t overlay rides in this view but what I could perhaps do is add this view to the activities list charts section? Not sure how useful it would be for people but an interesting visualisation none the less.
      I love this kind of comment!

      • Ok great. The Activity page would probably be a good place. As to its usefulness, I think it’s one of those “till you see it you don’t know” kinda things. I often wonder if there are untapped areas where I live.

        So, on another but related note. Would it make sense to add in where everyone is riding most. Turn up somewhere new, holiday, weekend away etc and want to see where the locals go. If you were looking for something specific, distance, elevation etc you could filter out all the short rides (that might just be commutes).

        • You can already see where you have or haven’t ridden by turning on the map on the activities page.
          In terms of finding where other people ride then check out the heat map functionality on Strava and RaceShape. I’ve not got the direct links for these right now but should be easy to find.

  • Alan Tullett says:

    Amazing tool. Sometimes use a compass tool on my phone to find the orientation relative to the wind forecast. This is much easier and the speed with which it updates on my mini iPad is fantastic!

  • Ever thought of a way to separate on road to off road Strava segments, or estimating percent off road for a ride? MTB users would features like this!

    • I can add the bike type to the segment list so you can filter by the bike used for each PR. It would be good to have those as filter options on the summary page too.
      There is a potential to work out the percentage of each type of road (or offroad) on a route using OSM data but I’m not sure how reliable it’ll be and would take a bunch of work to do. I’ve added it to the long list but don’t hold your breath!

        • I’ve had a read of those threads and it seems like a no-win situation for Strava. It would be great to have a road/off-road flag for segments so you can filter the searches a bit better but all that talk of filtering leaderboards is just riddled with problems and the results would be pretty meaningless as lots of people don’t put their bikes into Strava. Fastest time is the fastest, keep it simple. Tyre size, type and pressure make the most difference to times rather than the bike being used.

Comments are closed.