This code calculates cycling Level of Traffic Stress for all road and path segments in a region using data from Open Street Map.
This code is adapted from Bike Ottawa's LTS code, modified to include Level of Traffic Stress for intersections by Madeleine Bonsma-Fisher.
main
you can change the city you want to perform the analysis on.
relation
of the region you wantPlot an isochrone map for different LTS thresholds with isochrone.py
. This requires both the saved graph object and the dataframe with LTS levels calculated.
To get started with Mapbox, run the following command to create a geojson plot:
python main.py plot --format=json
You can run the mapbox webpage with the following command
python web.py
Vist http://localhost:8000 to view the rendered LTS.
Please note that the geojson file for Boston is 40mb and may render slowly with artifacts