Anzon WongAW Design
Journal · Lab

One of my students, preparing for the AP exam, had an idea

One of my students, preparing for the AP exam, had an idea: map Hong Kong's building regulations. So I tried vibe-coding it…

By Anzon Wong2 min read5 plates

Plate 01 / 05

How tangled are Hong Kong's building regulations? I asked AI to turn 910 documents into one 3D map.

Practice notes, codes and circulars from the Buildings Department, the Lands Department, the Planning Department and Town Planning Board, and the Fire Services Department, plus 986 sections of the Buildings Ordinance and its regulations. The AI turned 15,920 pages into text and wrote scripts that found 4,806 citations written explicitly in the text.

The rules I gave it were simple:
・Solid line: a citation actually written in the text. Click it to see the sentence.
・Dashed line: a link the AI suggests, 99 in all, each with a written reason.
・Topics are regions and colours on the map, never lines.
The AI does not get to draw lines at will.

The rules I gave it were simple: ・Solid line: a citation actually written in the text.

Plate 02 / 05

To be clear, the AI gets things wrong. I had it re-check every summary against the full text, and 638 of 907 were corrected, including one that stated a legal effect wrongly. So the AI does the volume, and a person sets the rules and decides how it gets checked.

Cost: about US$2.40 for OCR of the scanned documents. Everything else ran on my existing Claude subscription.

The map is here:
https://cowballwong.github.io/hk-regs-map/

It's open source, so feel free to take it and play:
https://github.com/cowballwong/hk-regs-map

(A personal hobby project. Not a government site, and not legal advice. Always rely on the official documents.)

How would you improve it? Tell me what you think in the comments 👇

Plate 03 / 05
Plate 04 / 05
Plate 05 / 05

More in Lab

All →