diagnostics#

Curation diagnostics: geometry-indicator distributions and use-group separability, written to the cache to interrogate occupancy and geometry decisions.

Enabled by save_statistics on the curate entrypoint (or a recipe-level save_statistics: true). These functions never modify the curated output; they only write CSV summaries to the cache, and a failure is warned about rather than raised so it can never break a curation run.

Functions#

compute_geometry_indicators(→ pandas.DataFrame)

Return per-footprint geometry indicators used to interrogate occupancy.

save_geometry_statistics(→ None)

Write geometry-indicator quantiles and use-group separability to cache.

save_group_dwelling_candidates(→ None)

Flag parcel use-groups whose dwelling evidence contradicts the occupancy.

save_occupancy_evidence_comparison(→ None)

Compare the NSI / FEMA / parcel occupancy evidences for the rank decision.

Module Contents#

openplaces.io.curator.diagnostics.compute_geometry_indicators(curated) pandas.DataFrame#

Return per-footprint geometry indicators used to interrogate occupancy.

Geometry is projected to a local UTM CRS so areas, lengths, and the oriented-bounding-box dimensions are in metres. Indicators: area (m2), oriented-bbox aspect ratio (length/width), rectangularity (area / oriented-bbox area), Polsby-Popper compactness (4*pi*A / P^2), convexity (area / convex-hull area), perimeter (m), exterior vertex count, inferred n_stories, and a volume proxy (area * n_stories).

openplaces.io.curator.diagnostics.save_geometry_statistics(state) None#

Write geometry-indicator quantiles and use-group separability to cache.

Groups footprints by their parcel use_group evidence and saves, per use group, tail-weighted quantiles of each geometry indicator (including the manufactured-home criterion inputs aspect ratio and area, and inferred n_stories), plus a separability summary (one-vs-rest AUC and eta^2). No-op unless state.save_statistics is set; never raises.

openplaces.io.curator.diagnostics.save_group_dwelling_candidates(state) None#

Flag parcel use-groups whose dwelling evidence contradicts the occupancy.

Surfaces candidates for manual group corrections. Writes the per use-group candidate table (see _group_dwelling_candidates()) plus a use_group -> NSI group co-occurrence audit (counts and within-use fractions). No-op unless save_statistics is set; never raises.

openplaces.io.curator.diagnostics.save_occupancy_evidence_comparison(state) None#

Compare the NSI / FEMA / parcel occupancy evidences for the rank decision.

Coerces each available evidence column to its occupancy class and writes three cache CSVs: pairwise agreement rates, the most common conflict class-pairs, and a sample of disagreement cases (id + each source’s class) to inspect. This is the low-cost basis for choosing the evidence cascade order empirically. No-op unless state.save_statistics is set; never raises.