Document restructuring and the beginnings of Filter 2 changes
Split the pipeline documentation by purpose so each fact has one home: - docs/pipeline-plan.md keeps the plan, checklist, tracker, and guardrails - docs/decisions.md holds open decisions and the dated decision log - docs/reviews/ holds findings and tasks: one file per filter, plus 00-cross-filter.md for findings that span filters - scripts/common/README.md holds the shared-helper rules (formerly Phase 2) - filter-calculations.md now describes calculations only Filed findings 12-22 from a consistency audit of the app, docs, and scripts. Filter 1 (Köppen-Geiger): use "Köppen" with the umlaut in all prose, labels, docstrings, help text, and checker messages (finding 21), and correct the base build's "majority" docstring (finding 22). Filter 2 (annual avg temperature): record the adopted definition in filter-calculations.md §2: equally weighted 1991-2020 monthly normals, per WMO-No. 1203 and NOAA's 2020 methodology; area-weighted county means; blank unless all 12 months exist. Code changes for this filter are still pending. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -110,7 +110,7 @@ METRIC_RULES: Dict[str, MetricRule] = {
|
||||
}
|
||||
|
||||
IDENTITY_COLUMNS = ("countyFips", "countyName", "state")
|
||||
# Stripe classes the app draws for Mixed Koppen counties; blank otherwise.
|
||||
# Stripe classes the app draws for Mixed Köppen counties; blank otherwise.
|
||||
KOPPEN_STRIPE_COLUMNS = ("koppenPrimaryClass", "koppenSecondaryClass")
|
||||
AUDIT_COLUMNS = ("humidHeatSourceFips", "humidHeatFipsAdjustment", "source")
|
||||
EXPECTED_COLUMNS = IDENTITY_COLUMNS + tuple(METRIC_RULES) + KOPPEN_STRIPE_COLUMNS + AUDIT_COLUMNS
|
||||
@@ -341,13 +341,13 @@ def check_cross_fields(report: Report, rows: List[Dict[str, str]]) -> None:
|
||||
secondary = row.get("koppenSecondaryClass") or ""
|
||||
if zone == MIXED_KOPPEN_CLASS:
|
||||
if not (primary and secondary):
|
||||
report.add(CHECK_CROSS, f"{fips}: Mixed Koppen county needs koppenPrimaryClass and koppenSecondaryClass")
|
||||
report.add(CHECK_CROSS, f"{fips}: Mixed Köppen county needs koppenPrimaryClass and koppenSecondaryClass")
|
||||
elif primary not in KOPPEN_CODES or secondary not in KOPPEN_CODES:
|
||||
report.add(CHECK_CROSS, f"{fips}: invalid Koppen stripe classes {primary!r}/{secondary!r}")
|
||||
report.add(CHECK_CROSS, f"{fips}: invalid Köppen stripe classes {primary!r}/{secondary!r}")
|
||||
elif primary == secondary:
|
||||
report.add(CHECK_CROSS, f"{fips}: Koppen stripe classes are both {primary}")
|
||||
report.add(CHECK_CROSS, f"{fips}: Köppen stripe classes are both {primary}")
|
||||
elif primary or secondary:
|
||||
report.add(CHECK_CROSS, f"{fips}: Koppen stripe classes are set but koppenZone is {zone or 'blank'}, not Mixed")
|
||||
report.add(CHECK_CROSS, f"{fips}: Köppen stripe classes are set but koppenZone is {zone or 'blank'}, not Mixed")
|
||||
|
||||
if not (row.get("source") or "").strip():
|
||||
report.add(CHECK_CROSS, f"{fips}: source is blank")
|
||||
|
||||
Reference in New Issue
Block a user