BostonCyclistsUnion / StressMap

Calculating Level of Traffic Stress using Open Street Map data
4 stars 3 forks source link

Improve LTS calculations, especially for low traffic roads e.g. dead ends #3

Open sckilcoyne opened 6 months ago

sckilcoyne commented 6 months ago

RFC

Reading the actual LTS rating system tables (https://peterfurth.sites.northeastern.edu/files/2014/05/LTS-Tables-v2.2.pdf), they use ADT (average daily traffic) as a metric to adjust the LTS of a given street. The BikeOttawa code only takes into account physical attributes of a street segment. This leads to short dead-end roads being labeled LTS 3 even though there might be <10 cars on it in a given day.

For most network analyses, this probably doesn't affect the results considerably, but when people zoom into their neighborhood and see streets that don't get any traffic being rated poorly, they may lose trust in the rest of the ratings.

sckilcoyne commented 1 month ago

Found this comment about dead-ends

Yes you can easily identify which nodes are actual intersections, vs dead-ends. OSMnx creates a graph attribute that states how many physical streets are connected to each node. Any node with >1 is an intersection. For example:


G = ox.graph_from_place('Piedmont, California, USA', network_type='drive')
streets_per_node = G.graph['streets_per_node']
node_ids = set(G.nodes())
intersections = [node for node, count in streets_per_node.items() if count>1]
dead_ends = [node for node, count in streets_per_node.items() if count==1]

https://geoffboeing.com/2016/11/osmnx-python-street-networks/
sckilcoyne commented 1 month ago

In the process of updating the code to implement LTS 2.2, there is an ADT (average daily traffic) input to the rating. Everything is going to need an estimate on that, so being able to identify dead ends might be enough to overwrite the ADT estimate to be lower and get the accurate LTS rating.