A formula for accurate freeway traffic visualization

Maps are a tool to represent the distance between any two points. Distances are subject to a distortion induced by map projection, but lets set that aside, because we’re going to make a map of Los Angeles, over which projection errors are negligible.

I want to make a different type of traffic map–one that represents the time required to travel between points at fluctuating speed. It does so by distorting or stretching the map along freeways (actually, along any route for which we have traffic data) so that that road and all the map areas connected to it are made farther away.

The formula for doing this is as follows:

  • Get OpenStreetMap data for Los Angeles.
  • Map each point on the map to a vertex on a 2d mesh
  • Apply a surface deformation along each shortest path between points for which there exists traffic data (do any of the providers have a usable API for this stuff?). Note: we have to finely divide the mesh, so that high-traffic routes that are “contained” by low traffic routes are turned into zig-zags.
  • Apply the deformation on the grid back to an image of the original map.
  • Post the data live on the web, as a warning for those who dare to travel the infinite streets of Los Angeles in traffic on the evening of a long holiday weekend

Me… I’ll be biking it.

brainstormed with @kjkjerstin and @armedneutrality



3 comments


    Drew Perttula

    November 28, 2009

    I did a related mapping thing at http://bigasterisk.com/projects/gis and then some freeway data plots at http://bigasterisk.com/freeway/
    I haven’t combined them yet. The thing I want to see is what the map looks like when you animate it over a day. That would probably reveal some traffic patterns that people aren’t aware of.
    Also related: http://www.joachim-breitner.de/blog/archives/288-guid.html

    eric

    November 30, 2009

    Oh yeah, seeing a map like this stretch and shrink over the course of the day is key.

    One thing I realized reading your comment is that a map like this is inherently viewpoint-dependent, if for no other reason than that freeways are directed graphs… their speed (and thus, stretch metric) varies depending on which direction you’re driving.

    Good stuff on your site, Drew.

Leave a comment


Name

Email(will not be published)

Website

Your comment