opentraffic / tangram-viz-experiments

OTv2: work-in-progress to visualize anonymized and aggregated traffic statics using Tangram
http://opentraffic.io/tangram-viz-experiments/
MIT License
4 stars 1 forks source link

Small roads look "stopped", but are actually moving #24

Open nvkelso opened 7 years ago

nvkelso commented 7 years ago

Many of the smaller roads in Manila (e.g. tertiary) just don't move as fast as motorway speeds, but our colors and the speed breaks are biased for the bigger express routes. This makes the neighborhood streets look "grid locked", but in fact traffic is probably moving like "normal" there with respect to city street speed regulations. On a highway it may be 100 km/hr, but on a surface road it may be 45 km/hr max regulation speed.

Maybe we can use the same "colors", but with different speed breaks per road class, in Tilezen kind syntax:

@patriciogonzalezvivo what do you think? 2 or 3 different shaders, or one shader with a property we can toggle per kind of road?

patriciogonzalezvivo commented 7 years ago

maybe the server can return deltas from an average... in the previous demo I end up visualizing the delta over time https://github.com/mapzen/open-traffic-poc-data-demo/blob/gh-pages/scene.yaml#L76-L98

So will be blue (green in our case) when start moving... and red when start decelerating. Will be great to have date about the difference respect to an average: usually on this days ppl go at 30km today goes at 40km -> way faster!

nvkelso commented 7 years ago

Can we do a proxy for that where we pretend like the average is:

(I'm totally spit balling those numbers.)

And then we take the average on the way, subtract that from the expected average speed, and then do the coloring based on that?

patriciogonzalezvivo commented 7 years ago

nice idea! we can pass those numbers as defines or uniforms

patriciogonzalezvivo commented 7 years ago

or better, use the new custom attribute, @bcamper is working on

nvkelso commented 7 years ago

Neat! Can you prototype something like this, please?

On Mar 23, 2017, at 13:08, Patricio Gonzalez Vivo notifications@github.com wrote:

or better, use the new custom attribute, @bcamper is working on

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

patriciogonzalezvivo commented 7 years ago

Working on it : )

patriciogonzalezvivo commented 7 years ago

Ok... here is the branch for it https://github.com/opentraffic/tangram-viz-experiments/tree/deltas

screen shot 2017-03-24 at 10 19 46 am

Need some TLC on the numbers... I don't see residential geometry and I lower the average speeds to make it less RED.

Take a look to this coloring functions https://github.com/opentraffic/tangram-viz-experiments/blob/deltas/scene.yaml#L35-L49. The tweaking magic happens there... Instead of sending a flag for one_way y replace it with an average speed. The CPU filtering takes care of that. The arrows go at the speed of the speed : ) while de coloring is calculated against the deference with the road type "average". That's the magic number that needs to be tweak ultimately