mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Parser/ETL for BRE PCDB pcdb10.dat (April 2026 revision). domain.sap.tables.pcdb.parser exposes parse_table_105 (typed GasOilBoilerRecord with brand/model/winter+summer+comparative-HW efficiency/output kW/final year) plus parse_table_raw for generic positional ingestion (pcdb_id + raw row only). etl.py runs the full ETL: reads pcdb10.dat as latin-1, writes per-table .jsonl files under docs/sap-spec/. Idempotent; runnable via PYTHONPATH=packages/domain/src python -m domain.sap.tables.pcdb.etl. Per Q1=D grilling: all 8 tables of interest ingested — 105 (Gas/Oil Boilers, typed) plus 122/143/313/353/362/391/506 (raw). Per-table typed refinement deferred to the follow-up slices that wire each table's cert-side cascade. Per Q3=B: typed fields decode against ncm-pcdb.org.uk ground-truth records (Baxi 000098 + Potterton 000619 + Saunier Duval 000732 verified by user); full raw row preserved on every record for forensics. Per Q2 user choice: NDJSON .jsonl format chosen over indented JSON to keep diff-friendliness while halving file size (17MB total vs 31MB pretty-printed). Edge cases handled: latin-1 encoding (manufacturer addresses carry the degree sign), `'obsolete'` status string where a year would otherwise live, `'>70kW'` range indicator on output-power fields — non-numeric values fall to None with the raw string preserved on `raw`. Slice 2 lands the domain.sap.tables.pcdb runtime lookup module (per-table by-pcdb-id dicts loaded at import time). Slice 3 wires Table 105 into cert_to_inputs.main_heating_efficiency / water_efficiency precedence cascades per Q5=B (space heating + water heating scalar override; equation D1 monthly + Appendix N HP factor + FGHRS/WWHRS/HIU deferred). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
11 lines
4.3 KiB
JSON
11 lines
4.3 KiB
JSON
{"pcdb_id": 692001, "raw": ["692001", "300900", "1", "2011/Sep/08 16:45", "5.03", "SAP Illustrative Products", "Illustrative Micro-CHP", "Ex 1", "Gas", "2011", "current", "1", "", "2", "2", "1", "3", "", "54.7", "-0.096", "", "", "14", "14", "11", "2", "7", "0.5", "81.9", "-0.045", "1", "83.2", "-0.056", "1.5", "82.4", "-0.065", "2", "79.7", "-0.07", "3", "73.9", "-0.079", "6", "58.7", "-0.094", "10", "57.0", "-0.085"]}
|
|
{"pcdb_id": 40001, "raw": ["040001", "000005", "0", "2019/Oct/11 10:23", "7", "Baxi Heating UK Ltd", "Baxi", "Ecogen 24/1.0", "", "2009", "current", "1", "", "2", "2", "1", "3", "", "48.3", "-0.146", "", "", "24", "24", "11", "2", "7", "0.5", "84.1", "-0.044", "1", "85.2", "-0.059", "1.5", "85.7", "-0.082", "2", "83.9", "-0.106", "3", "80", "-0.142", "6", "74.5", "-0.167", "10", "67.4", "-0.168"]}
|
|
{"pcdb_id": 40005, "raw": ["040005", "000267", "0", "2019/Oct/11 10:24", "7", "Efficient Home Energy", "EHE", "Whispergen EU1", "", "2010", "current", "1", "", "2", "2", "1", "3", "", "61.1", "-0.045", "", "", "14", "14", "11", "2", "7", "0.5", "80.7", "-0.072", "1", "82.1", "-0.077", "1.5", "83.8", "-0.078", "2", "84.4", "-0.068", "3", "84.2", "-0.048", "6", "79.4", "-0.033", "10", "69.2", "-0.031"]}
|
|
{"pcdb_id": 40009, "raw": ["040009", "000267", "0", "2019/Oct/11 10:25", "7", "Efficient Home Energy", "EHE", "Whispergen EU1A", "", "2011", "current", "1", "", "2", "2", "1", "3", "", "62.2", "-0.066", "", "", "12.5", "12.5", "11", "2", "7", "0.5", "80.2", "-0.082", "1", "81.9", "-0.088", "1.5", "83.8", "-0.091", "2", "84.3", "-0.083", "3", "83.9", "-0.066", "6", "79.8", "-0.053", "10", "70.9", "-0.05"]}
|
|
{"pcdb_id": 40010, "raw": ["040010", "000005", "0", "2019/Oct/11 10:25", "7", "Baxi Heating UK", "Baxi", "Ecogen System", "", "2014", "current", "1", "", "2", "3", "1", "3", "", "48.3", "-0.146", "", "", "24", "24", "11", "2", "7", "0.5", "84.2", "-0.043", "1", "85.7", "-0.055", "1.5", "86.9", "-0.072", "2", "86.1", "-0.087", "3", "83.7", "-0.109", "6", "78.6", "-0.125", "10", "70.8", "-0.126"]}
|
|
{"pcdb_id": 40013, "raw": ["040013", "000302", "0", "2019/Oct/11 10:25", "7", "Flow Products Ltd", "FLOW", "Flow 14H/1.0", "", "2010", "current", "1", "", "2", "2", "1", "3", "", "71.4", "0.015", "", "", "12.8", "12.8", "11", "2", "7", "0.5", "84.5", "-0.018", "1", "86", "-0.025", "1.5", "87.3", "-0.03", "2", "87.3", "-0.03", "3", "86.4", "-0.024", "6", "85.6", "-0.013", "10", "85.6", "0.003"]}
|
|
{"pcdb_id": 40014, "raw": ["040014", "000033", "0", "2020/Aug/12 16:45", "7.02", "Viessmann", "Viessmann", "Vitovalor", "300-P", "2017", "current", "1", "", "2", "2", "1", "1", "", "36.62", "-0.736", "", "", "20", "20", "11", "1", "7", "0.5", "91.2", "-0.033", "1", "88.5", "-0.047", "1.5", "85", "-0.066", "2", "81.5", "-0.084", "3", "74.9", "-0.112", "6", "61.1", "-0.129", "10", "62.9", "-0.094"]}
|
|
{"pcdb_id": 40017, "raw": ["040017", "000033", "0", "2020/Aug/12 17:05", "7.02", "Viessmann", "Viessmann", "VITOVALOR PT2", "E11T", "2019", "current", "1", "", "2", "2", "1", "1", "", "39.302", "-0.457", "", "", "11.4", "11.4", "11", "1", "7", "0.5", "78.2", "-0.094", "1", "67", "-0.186", "1.5", "58.2", "-0.299", "2", "52.6", "-0.393", "3", "45.1", "-0.54", "6", "36", "-0.659", "10", "36.8", "-0.56"]}
|
|
{"pcdb_id": 40019, "raw": ["040019", "000033", "0", "2020/Aug/12 17:08", "7.02", "Viessmann", "Viessmann", "VITOVALOR PT2", "E19T", "2019", "current", "1", "", "2", "2", "1", "1", "", "39.302", "-0.457", "", "", "19", "19", "11", "1", "7", "0.5", "78.2", "-0.094", "1", "67", "-0.186", "1.5", "58.2", "-0.299", "2", "52.6", "-0.393", "3", "45.1", "-0.54", "6", "36", "-0.659", "10", "36.8", "-0.56"]}
|
|
{"pcdb_id": 40020, "raw": ["040020", "000033", "0", "2020/Aug/12 17:08", "7.02", "Viessmann", "Viessmann", "VITOVALOR PT2", "E25T", "2019", "current", "1", "", "2", "2", "1", "1", "", "39.302", "-0.457", "", "", "24.5", "24.5", "11", "1", "7", "0.5", "78.2", "-0.094", "1", "67", "-0.186", "1.5", "58.2", "-0.299", "2", "52.6", "-0.393", "3", "45.1", "-0.54", "6", "36", "-0.659", "10", "36.8", "-0.56"]}
|
|
{"pcdb_id": 40022, "raw": ["040022", "000033", "0", "2020/Aug/12 17:12", "7.02", "Viessmann", "Viessmann", "VITOVALOR PT2", "E32T", "2019", "current", "1", "", "2", "2", "1", "1", "", "39.302", "-0.457", "", "", "30.8", "30.8", "11", "1", "7", "0.5", "78.2", "-0.094", "1", "67", "-0.186", "1.5", "58.2", "-0.299", "2", "52.6", "-0.393", "3", "45.1", "-0.54", "6", "36", "-0.659", "10", "36.8", "-0.56"]}
|