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:
@@ -6,7 +6,7 @@ Outputs a CSV file compatible with the browser app:
|
||||
climate-data.csv
|
||||
|
||||
Metrics produced per county:
|
||||
- koppenZone: majority Koppen-Geiger class
|
||||
- koppenZone: largest-share Köppen-Geiger class among touched cells (replaced by the Köppen apply step)
|
||||
- avgTempF: annual mean temperature from NOAA 1991-2020 gridded normals
|
||||
- annualPrecipIn: annual total precipitation from NOAA 1991-2020 gridded normals
|
||||
- seasonalityIndex: precipitation seasonality, coefficient of variation of monthly totals (%)
|
||||
@@ -256,7 +256,7 @@ def _touched_raster_values(source, geometry: BaseGeometry, split_antimeridian: b
|
||||
|
||||
|
||||
def _zonal_majority_class(koppen_raster: Path, counties: gpd.GeoDataFrame, code_map: Dict[int, str]) -> List[str]:
|
||||
"""Assign each county its most common Koppen-Geiger class."""
|
||||
"""Assign each county its most common Köppen-Geiger class."""
|
||||
classes: List[str] = []
|
||||
with rasterio.open(koppen_raster) as source:
|
||||
raster_counties = counties
|
||||
@@ -597,7 +597,7 @@ def parse_args() -> argparse.Namespace:
|
||||
"""Define and parse command-line options for this generator."""
|
||||
parser = argparse.ArgumentParser(description="Generate county climate records for the web app.")
|
||||
parser.add_argument("--counties-geojson", type=Path, required=True, help="County polygon GeoJSON path.")
|
||||
parser.add_argument("--koppen-raster", type=Path, required=True, help="Koppen-Geiger raster TIFF path.")
|
||||
parser.add_argument("--koppen-raster", type=Path, required=True, help="Köppen-Geiger raster TIFF path.")
|
||||
parser.add_argument("--koppen-legend", type=Path, default=None, help="Optional legend.txt mapping integer codes.")
|
||||
parser.add_argument(
|
||||
"--monthly-tavg-nc",
|
||||
|
||||
Reference in New Issue
Block a user