The filesystem key an analysis writes under: it names the parquet aggregate directory (_aggregates/<refCode>/) and the figure/CSV filenames. Built by slugging the layer's name — which is its curated NAME_SHORT, or "<tenure> <NAME_SHORT>" for a crossed unit — so the on-disk key is exactly the label shown in the figures, and two units can only collide if their curated short names do (which validateShortNames() forbids).

refCodeFor(kind, layer)

Arguments

kind

character analysis kind ("lm", "pm", "lw", "sspm", ...).

layer

character reporting-layer name (a reportingPolygons list name).

Value

a character refCode.

Details

This replaces the former abbreviate(layer, minlength = 8) keying, which gave no cross-unit uniqueness guarantee: 68 of the 399 crossed FMA x ANSR names abbreviated onto a name already taken, silently overwriting each other's aggregates and figures.