After dusk, Spokli offers a Night route that prefers lit streets. Riders ask, reasonably, how an app can know that. The short answer is that it does not know; it estimates, from unusually good public data, and it tells you how confident it is. Here is the long answer.
The lamp inventory
Berlin publishes its public lighting as open data: every lamp the city operates, with its position, type and status. The snapshot Spokli uses has 210,203 entries. Not all of them are lights. We drop the switch cabinets, the illuminated traffic signs and the floodlights aimed at monuments, and everything marked as out of service or temporarily removed. That leaves 205,072 lamps.
About 16,300 of them are gas lamps, a Berlin peculiarity that survives in several districts. They are beautiful and dim. Spokli counts each one at half the weight of an electric lamp.
From lamp positions to a lighting class
A lamp is a point. A street is a line. To connect the two, Spokli walks along every street in the graph in five-metre steps and asks, at each step, which lamps stand within 25 metres and how far away they are. Closer lamps count more; the influence fades smoothly with distance. The samples along a stretch are combined into one class for that stretch: lit, dim, dark, or unknown.
Two sources can override the inventory. OpenStreetMap mappers record whether a way is lit, and the bbbike project, a Berlin bike router maintained by hand for a quarter of a century, has surveyed unlit paths. Where bbbike says a park path is unlit and the inventory would have guessed otherwise from lamps on the surrounding streets, bbbike wins and the stretch is marked dim with a conflict note. We apply that rule only to paths, parks and service ways, because the same rule on streets wrongly darkened well-lit roads around Görlitzer Park.
What is deliberately unknown
Bridges, tunnels, covered passages and anything mapped on another level get the class “unknown”, no matter how many lamps stand nearby. A lamp on the road above must never be allowed to light the path below. The price is that a perfectly lit bridge shows as unknown. We think that is the right price.
Private and unmapped lights, in courtyards, on campuses, inside parks, are not in the city’s inventory. Paths there carry a lower confidence, and Spokli’s Night route treats their darkness as less certain than a dark street.
What the model cannot know
A lamp on the map is not light on the road. Spokli does not know how bright a lamp is, how high it hangs, which way it points, whether it is working tonight, or whether a plane tree has grown in front of it since the inventory was taken. It does not know what the surface reflects or what the moon is doing. The lighting class is a proxy, deliberately coarse, and it is not a measurement in lux and not a safety rating. A brightly lit street can be unpleasant for other reasons. A dark cycleway through a park can be fine.
So two rules follow. First, every Night route shows its coverage: how many metres are lit, dim, dark and unknown, and the longest continuous dark stretch, with unknown drawn as dashed grey so that it never passes for fine. Second, where the data cannot tell two routes apart, Spokli does not pretend it can.
What comes next
The model has not been field-verified. During the pilot, Night routes carry a visible low-confidence note. Before Night becomes a recommendation rather than an offer, we will ride a sample of lit, dim, dark and unknown stretches at the relevant hours, compare what we see with what the model says, and publish the result, including how often the model called a dark stretch lit. That number matters more than the overall accuracy, because false reassurance is the one mistake a lighting model must not make.
Read more: Night routes · ← All articles
