← All projects

Case Study · 2026 – present

Lights Out STP

Screenshot of Lights Out STP

The Problem

Saint Paul has more than 40,000 streetlights, and outages and copper-wire theft are reported one at a time. I wanted a single map where residents can see which lights are out, confirm each other's reports, and follow repairs.

Key Decisions

Give every pole an ID the app owns

The city's streetlight layer is wiped and reloaded on each update, and every ID in it is reassigned. Between the February and November 2026 loads, not one ID carried over. Community reports keyed to city IDs would have been orphaned on the first refresh. The app keeps its own registry instead. On every refresh, each pole is matched by its pole number where that is unique (about 99% of poles), then by nearest coordinate within 15 metres. Matched poles keep their ID, new poles get a new one, and retired IDs are never reused.

Ship only the data the map draws

The raw city layer carries more than the app needs, including staff editing metadata. The published file keeps the five fields the app renders, with coordinates trimmed to six decimals. That keeps the download small and keeps staff metadata out of the public file.

Get theft data through records requests

There is no public dataset of wire-theft reports. I get them as exports from city records requests, and a script matches each one to a pole so theft and outages can be shown together.

Let the community verify reports

A single report might be wrong or out of date. Residents vote to confirm or dispute each other's reports. Accounts and reports live in Supabase, with row-level security deciding who can change what.

Results

  • 40,000+ streetlights mapped with outage, theft and repair status
  • Community reports stay attached to the right pole across city data reloads
  • Map behaviour covered by Playwright tests

Stack

ReactTypeScriptViteSupabaseLeafletGeoJSONPlaywright