Traffic Data · OpenStreetMap · Lachen SZ

Traffic in Lachen, Before and After the Bypass

In October 2017, Lachen opened a bypass along the railway and closed its historic village centre to through traffic. A road network model, fitted to the traffic counts from before and after, shows where the traffic went.

Data~500 traffic counts, 2014 to 2018
SourcesMunicipality, Canton of Schwyz, cantonal police
MapOpenStreetMap
OriginMy Matura thesis, 2018
Data Visualization OpenStreetMap Statistics Network Model
01

How Lachen grew

Before 1919, Lachen was a small village by the lake. Over the twentieth century it grew in every direction, north of St. Gallerstrasse and across the railway, and the traffic through its narrow centre grew with it, until the bypass of 2017.

2026
bypass, 2017 pedestrian zone 20 km/h zone Historic maps: Journey through time © swisstopo · Overlay © OpenStreetMap contributors

swisstopo's national maps from each revision of the Lachen sheet: the Siegfried map from 1889, the National Map from 1960 (both 1:25,000). The last step is today's map, marked with what the bypass and the new traffic regime changed in 2017.

02

The switch

Before the bypass, about 9,100 vehicles a day drove through the village centre. Within a year, the main flow had moved to the new road along the railway. Every dot is a simulated vehicle on its way through a model of Lachen's road network.

road graph way into town side street canton counting station thesis count simulated vehicle Map data © OpenStreetMap contributors

Over the years

The canton counts traffic all year at the ways into town, some stations since 2014. Traffic on the roads into Lachen hardly changed when the bypass opened: the bypass did not bring more cars, it moved them out of the centre. On the bypass at the station, 11,200 to 12,500 vehicles a day have been counted in every year since 2019.

Counted traffic, 2014 to 2025

Vehicles per day, both directions, as yearly averages from the canton's permanent counting stations. Hollow points are years with building works nearby. Not every station counted every year.

The model

The model rests on two sets of counts. The canton of Schwyz counts traffic all year at permanent stations: at the roundabouts at both ends of the bypass, on the road to the motorway and at the junction towards Wangen, some of them since 2014. The thesis adds counts inside the centre, before and after the bypass. The streets become a graph, once for each network, taken from OpenStreetMap as it was mapped at the time: June 2016 for before, September 2018 for after. So the one-way rules, speed limits and which roads existed come from the map data of the day: before, Herrengasse and Marktstrasse as one-way cantonal roads at 50 km/h and no bypass; after, the bypass, the pedestrian zone and living streets at 20 km/h in the centre.

Trips start and end at the three ways into town (from Altendorf, from Wangen and at the motorway roundabout) and at the 85 places where a side street joins the network. Each side street is weighted by the buildings nearest to it. There are three kinds of trips: through traffic between the ways into town, trips from each way into town into one of four parts of town and back, and trips between side streets. Drivers spread over the routes of their period that take about as long, and they keep to the main roads: a minute on a residential street counts like three on a main road. That is the value that best predicts a counting station left out of the fit.

How many trips of each kind there are is fitted for every year at once, with a penalty that keeps neighbouring years alike. The map shows the average of 2014 to 2016 and of 2018 to 2025. Through traffic changes slowly, also when the bypass opens: the bypass changed the routes, not where people drive to. Over all of the canton's counts the model is off by 10% on average, over the thesis counts by 21%.

Counts against the model
counted from a counted change, the thesis estimate or read from the thesis map model

Vehicles per day, both directions. The canton's stations as averages of 2014 to 2016 and of 2018 to 2025, without years of building works; the thesis counts before the bypass against the model's average of 2014 to 2016. Changes counted without a baseline (Schützen-, Oberdorf-, Vordere and Hintere Bahnhofstrasse) are fitted as ratios and not shown here. Biberzeltenstrasse is left out: its traffic comes from the quarter itself, which the model does not include.

03

Slower, but more often too fast

The limit in the centre dropped from 50 to 30 or 20 km/h. The whole speed distribution moved down, but not as far as the limit: on Schützenstrasse, half of all vehicles are now above it.

2014–2017 2018 above the new limit old limit new limit

Speed curves reconstructed from two published numbers per street: V85, the speed 85% of vehicles stay below, and the share above the limit. Measured speeds are skewed, so the curves are skew-normal, with the skew taken from the three weeks in the thesis recorded vehicle by vehicle: a tail of fast drivers in 20 km/h zones, many slow vehicles in 30 km/h zones. Where the old share was rounded to 0 or 1%, the 2018 spread is kept. Percentages on the right are measured.

04

The Matura thesis

All counts on this page come from my Matura thesis at Kantonsschule Ausserschwyz in 2018, my first programming project. The municipality of Lachen, the Canton of Schwyz and the cantonal police gave me their raw counts: about 500 spreadsheets from different devices, directions and periods. Sorting out which were real measurements and which were extrapolations took longer than anything else.

For the visualisation, I learned Processing from scratch and wrote a program that rebuilt the streets of Lachen from almost 40,000 lines of OpenStreetMap XML and drew every counted street with a width and colour for its traffic: static maps for the written thesis and animated ones for the presentation. To estimate speeding from reports that only gave V50 and V85, I fitted a hyperbolic tangent through the two points.

This page goes further with the same numbers: a network model that fills in the streets without a count, a simulation of the vehicles on it, and speed curves fitted to the weeks that were recorded vehicle by vehicle.