From 5923f8d072dcef017b8e0e8b456c860118eae132 Mon Sep 17 00:00:00 2001 From: Jun-te Kim Date: Mon, 15 Jun 2026 12:11:26 +0000 Subject: [PATCH] =?UTF-8?q?Parse=20full-SAP=20SAP-Schema-17.1=20certificat?= =?UTF-8?q?e=20payloads=20=F0=9F=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 (1M context) --- .../epc/domain/tests/test_from_sap_schema.py | 49 ++ datatypes/epc/schema/sap_schema_17_1.py | 18 + .../epc/schema/tests/fixtures/sap_17_1.json | 433 +++++++++++++++++ .../schema/tests/fixtures/sap_17_1_flat.json | 343 ++++++++++++++ .../schema/tests/fixtures/sap_17_1_house.json | 448 ++++++++++++++++++ 5 files changed, 1291 insertions(+) create mode 100644 datatypes/epc/domain/tests/test_from_sap_schema.py create mode 100644 datatypes/epc/schema/sap_schema_17_1.py create mode 100644 datatypes/epc/schema/tests/fixtures/sap_17_1.json create mode 100644 datatypes/epc/schema/tests/fixtures/sap_17_1_flat.json create mode 100644 datatypes/epc/schema/tests/fixtures/sap_17_1_house.json diff --git a/datatypes/epc/domain/tests/test_from_sap_schema.py b/datatypes/epc/domain/tests/test_from_sap_schema.py new file mode 100644 index 00000000..980aa95a --- /dev/null +++ b/datatypes/epc/domain/tests/test_from_sap_schema.py @@ -0,0 +1,49 @@ +"""Unit tests for the full-SAP (`SAP-Schema-17.1`) → `EpcPropertyData` mapper. + +Mirrors `test_from_rdsap_schema.py`: parse a frozen real-cert fixture with +`from_dict`, then assert the mapper's per-field behaviour. Three fixtures +exercise the shape variation the design decisions hinge on +(`scripts/hyde/mapping_decisions.md`): + + * `sap_17_1.json` — ground-floor flat, cert 0862-…-2325 (lodged 83) + * `sap_17_1_house.json` — semi-detached, 3-way wall split + roof window + * `sap_17_1_flat.json` — ground-floor flat, party wall + 2 distinct door U +""" + +import json +import os +from typing import Any, Dict + +import pytest + +from datatypes.epc.schema.sap_schema_17_1 import SapSchema17_1 +from datatypes.epc.schema.tests.helpers import from_dict + +FIXTURES = os.path.join(os.path.dirname(__file__), "../../schema/tests/fixtures") + +_ALL_FIXTURES = ("sap_17_1.json", "sap_17_1_house.json", "sap_17_1_flat.json") + + +def load(filename: str) -> Dict[str, Any]: + with open(os.path.join(FIXTURES, filename)) as f: + return json.load(f) # type: ignore[no-any-return] + + +class TestSapSchema17_1Parsing: + """Slice 1: the schema dataclass parses the real full-SAP payloads.""" + + @pytest.mark.parametrize("fixture", _ALL_FIXTURES) + def test_parses_every_fixture(self, fixture: str) -> None: + # Arrange / Act + schema = from_dict(SapSchema17_1, load(fixture)) + + # Assert + assert schema.schema_type == "SAP-Schema-17.1" + + def test_sample_identity_fields(self) -> None: + # Arrange / Act + schema = from_dict(SapSchema17_1, load("sap_17_1.json")) + + # Assert + assert schema.uprn == 10092973954 + assert schema.total_floor_area == 68 diff --git a/datatypes/epc/schema/sap_schema_17_1.py b/datatypes/epc/schema/sap_schema_17_1.py new file mode 100644 index 00000000..e7a1a19d --- /dev/null +++ b/datatypes/epc/schema/sap_schema_17_1.py @@ -0,0 +1,18 @@ +"""Full-SAP (`SAP-Schema-17.1`) payload dataclasses. + +Unlike the RdSAP schemas (reduced-data, for existing dwellings), full SAP +carries the measured SAP calculation input set — typically new-build / +on-construction (`assessment_type: "SAP"`). Built incrementally via TDD; +fields are modelled as the mapper slices demand them. `Optional[...]` per +observed corpus presence (`backend/epc_api/json_samples/SAP-Schema-17.1/ +corpus.jsonl`), since the custom `from_dict` ignores unmodelled keys and +raises only on a missing *required* field. +""" + +from dataclasses import dataclass + + +@dataclass +class SapSchema17_1: + # Stub — slice 1 will grow this to parse the real cert's identity fields. + uprn: int diff --git a/datatypes/epc/schema/tests/fixtures/sap_17_1.json b/datatypes/epc/schema/tests/fixtures/sap_17_1.json new file mode 100644 index 00000000..8d828d3e --- /dev/null +++ b/datatypes/epc/schema/tests/fixtures/sap_17_1.json @@ -0,0 +1,433 @@ +{ + "uprn": 10092973954, + "roofs": [ + { + "description": { + "value": "(other premises above)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "walls": [ + { + "description": { + "value": "Average thermal transmittance 0.17 W/m\u00b2K", + "language": "1" + }, + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": { + "value": "Average thermal transmittance 0.13 W/m\u00b2K", + "language": "1" + }, + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "status": "entered", + "tenure": "ND", + "windows": { + "description": { + "value": "High performance glazing", + "language": "1" + }, + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "lighting": { + "description": { + "value": "Low energy lighting in all fixed outlets", + "language": "1" + }, + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "postcode": "ME1 3WR", + "data_type": 2, + "hot_water": { + "description": { + "value": "From main system", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "ROCHESTER", + "built_form": 1, + "created_at": "2020-03-12 08:41:35", + "living_area": 23.45, + "orientation": 6, + "region_code": 14, + "report_type": 3, + "sap_heating": { + "water_fuel_type": 1, + "water_heating_code": 901, + "main_heating_details": [ + { + "main_fuel_type": 1, + "heat_emitter_type": 1, + "emitter_temperature": 0, + "is_flue_fan_present": "true", + "main_heating_number": 1, + "main_heating_control": 2110, + "is_interlocked_system": "true", + "main_heating_category": 2, + "main_heating_fraction": 1, + "main_heating_flue_type": 2, + "central_heating_pump_age": 2, + "main_heating_data_source": 1, + "main_heating_index_number": 17929, + "has_separate_delayed_start": "false", + "load_or_weather_compensation": 4, + "compensating_controller_index_number": 200004, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "false", + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1, + "sap_heating_design_water_use": 1 + }, + "sap_version": 9.92, + "schema_type": "SAP-Schema-17.1", + "uprn_source": "Address Matched", + "country_code": "ENG", + "main_heating": [ + { + "description": { + "value": "Boiler and radiators, mains gas", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "air_tightness": { + "description": { + "value": "Air permeability 2.6 m\u00b3/h.m\u00b2 (as tested)", + "language": "1" + }, + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "dwelling_type": { + "value": "Ground-floor flat", + "language": "1" + }, + "language_code": 1, + "property_type": 2, + "address_line_1": "Flat 1 William House", + "address_line_2": "22, Keepers Cottage Lane", + "address_line_3": "Wouldham", + "assessment_date": "2020-03-12", + "assessment_type": "SAP", + "completion_date": "2020-03-12", + "inspection_date": "2020-03-12", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 1, + "wet_rooms_count": 2, + "air_permeability": 2.6, + "open_flues_count": 0, + "ventilation_type": 6, + "extract_fans_count": 0, + "open_fireplaces_count": 0, + "sheltered_sides_count": 1, + "kitchen_duct_fans_count": 0, + "kitchen_room_fans_count": 0, + "kitchen_wall_fans_count": 1, + "flueless_gas_fires_count": 0, + "mechanical_vent_duct_type": 2, + "non_kitchen_duct_fans_count": 0, + "non_kitchen_room_fans_count": 0, + "non_kitchen_wall_fans_count": 1, + "mechanical_ventilation_data_source": 1, + "mechanical_vent_system_index_number": 500229, + "is_mechanical_vent_approved_installer_scheme": "true" + }, + "design_water_use": 1, + "sap_data_version": 9.92, + "sap_flat_details": { + "level": 1 + }, + "total_floor_area": 68, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2020-03-12", + "sap_energy_source": { + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 2, + "fixed_lighting_outlets_count": 1, + "low_energy_fixed_lighting_outlets_count": 1, + "low_energy_fixed_lighting_outlets_percentage": 100 + }, + "sap_opening_types": [ + { + "name": "Door (1)", + "type": 1, + "u_value": 1.4, + "data_source": 2, + "description": "Data from Manufacturer", + "glazing_type": 1 + }, + { + "name": "Windows (1)", + "type": 4, + "u_value": 1.4, + "frame_type": 2, + "data_source": 2, + "description": "Data from Manufacturer", + "frame_factor": 0.7, + "glazing_type": 7, + "solar_transmittance": 0.63 + } + ], + "secondary_heating": { + "description": { + "value": "None", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Exposed Roof", + "u_value": 0, + "roof_type": 2, + "kappa_value": 0, + "total_roof_area": 0 + }, + { + "name": "Ceiling", + "u_value": 0, + "roof_type": 4, + "kappa_value": 20, + "total_roof_area": 67.84 + } + ], + "sap_walls": [ + { + "name": "Brickwork", + "u_value": 0.18, + "wall_type": 2, + "kappa_value": 18, + "total_wall_area": 13.1, + "is_curtain_walling": "false" + }, + { + "name": "Weatherboarding", + "u_value": 0.18, + "wall_type": 2, + "kappa_value": 18, + "total_wall_area": 46.95, + "is_curtain_walling": "false" + }, + { + "name": "Sole Plate Detail", + "u_value": 0.18, + "wall_type": 2, + "kappa_value": 18, + "total_wall_area": 3.1, + "is_curtain_walling": "false" + }, + { + "name": "Stair Wall", + "u_value": 0.19, + "wall_type": 2, + "kappa_value": 18, + "total_wall_area": 28.39, + "is_curtain_walling": "false" + }, + { + "name": "Stud Walls", + "u_value": 0, + "wall_type": 5, + "kappa_value": 9, + "total_wall_area": 125.952 + } + ], + "identifier": "Main Dwelling", + "overshading": 2, + "sap_openings": [ + { + "name": 1, + "type": "Door (1)", + "width": 1, + "height": 2, + "location": "Stair Wall", + "orientation": 6 + }, + { + "name": 2, + "type": "Windows (1)", + "width": 1, + "height": 5.92, + "location": "Brickwork", + "orientation": 8 + }, + { + "name": 3, + "type": "Windows (1)", + "width": 1, + "height": 1.45, + "location": "Brickwork", + "orientation": 2 + }, + { + "name": 4, + "type": "Windows (1)", + "width": 1, + "height": 1.45, + "location": "Brickwork", + "orientation": 6 + }, + { + "name": 5, + "type": "Windows (1)", + "width": 1, + "height": 5.28, + "location": "Weatherboarding", + "orientation": 2 + }, + { + "name": 6, + "type": "Windows (1)", + "width": 1, + "height": 1.5, + "location": "Weatherboarding", + "orientation": 4 + } + ], + "construction_year": 2020, + "sap_thermal_bridges": { + "thermal_bridges": [ + { + "length": 9.79, + "psi_value": 0.3, + "psi_value_source": 2, + "thermal_bridge_type": "E2" + }, + { + "length": 3.18, + "psi_value": 0.04, + "psi_value_source": 2, + "thermal_bridge_type": "E3" + }, + { + "length": 23.7, + "psi_value": 0.05, + "psi_value_source": 2, + "thermal_bridge_type": "E4" + }, + { + "length": 38.14, + "psi_value": 0.16, + "psi_value_source": 2, + "thermal_bridge_type": "E5" + }, + { + "length": 38.14, + "psi_value": 0.07, + "psi_value_source": 2, + "thermal_bridge_type": "E7" + }, + { + "length": 21.6, + "psi_value": 0.09, + "psi_value_source": 2, + "thermal_bridge_type": "E16" + }, + { + "length": 12, + "psi_value": -0.09, + "psi_value_source": 2, + "thermal_bridge_type": "E17" + } + ], + "thermal_bridge_code": 5 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.13, + "floor_type": 2, + "kappa_value": 75, + "storey_height": 2.4, + "heat_loss_area": 67.84, + "total_floor_area": 67.84 + } + ] + } + ], + "heating_cost_current": { + "value": 201, + "currency": "GBP" + }, + "co2_emissions_current": 1.1, + "energy_rating_average": 60, + "energy_rating_current": 83, + "lighting_cost_current": { + "value": 55, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": { + "value": "Time and temperature zone control", + "language": "1" + }, + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "has_hot_water_cylinder": "false", + "heating_cost_potential": { + "value": 201, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 68, + "currency": "GBP" + }, + "co2_emissions_potential": 1.1, + "energy_rating_potential": 83, + "lighting_cost_potential": { + "value": 55, + "currency": "GBP" + }, + "schema_version_original": "LIG-17.0", + "hot_water_cost_potential": { + "value": 68, + "currency": "GBP" + }, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 2140, + "water_heating": 1522 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 91, + "has_fixed_air_conditioning": "false", + "multiple_glazed_percentage": 100, + "calculation_software_version": "Version: 1.0.4.25", + "energy_consumption_potential": 91, + "environmental_impact_current": 86, + "current_energy_efficiency_band": "B", + "environmental_impact_potential": 86, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "B", + "co2_emissions_current_per_floor_area": 16 +} \ No newline at end of file diff --git a/datatypes/epc/schema/tests/fixtures/sap_17_1_flat.json b/datatypes/epc/schema/tests/fixtures/sap_17_1_flat.json new file mode 100644 index 00000000..dcd533f1 --- /dev/null +++ b/datatypes/epc/schema/tests/fixtures/sap_17_1_flat.json @@ -0,0 +1,343 @@ +{ + "uprn": 90124027, + "roofs": [ + { + "description": "Average thermal transmittance 0.32 W/m\u00b2K", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.30 W/m\u00b2K", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.57 W/m\u00b2K", + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + } + ], + "status": "entered", + "tenure": "ND", + "windows": { + "description": "Fully double glazed", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "lighting": { + "description": "Low energy lighting in 67% of fixed outlets", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "postcode": "DY1 2QG", + "data_type": 4, + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "DUDLEY", + "built_form": 3, + "created_at": "2019-04-16 16:00:34", + "living_area": 14.87, + "orientation": 5, + "region_code": 6, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "water_fuel_type": 1, + "water_heating_code": 901, + "main_heating_details": [ + { + "main_fuel_type": 1, + "heat_emitter_type": 1, + "emitter_temperature": 0, + "is_flue_fan_present": "true", + "main_heating_number": 1, + "main_heating_control": 2104, + "is_interlocked_system": "false", + "main_heating_category": 2, + "main_heating_fraction": 1, + "main_heating_flue_type": 2, + "central_heating_pump_age": 2, + "main_heating_data_source": 1, + "main_heating_index_number": 17507, + "has_separate_delayed_start": "false", + "load_or_weather_compensation": 0, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "false", + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1 + }, + "sap_version": 9.92, + "schema_type": "SAP-Schema-17.1", + "uprn_source": "Energy Assessor", + "country_code": "ENG", + "main_heating": [ + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "air_tightness": { + "description": "(not tested)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "dwelling_type": "Ground-floor flat", + "language_code": 1, + "property_type": 2, + "address_line_1": "Flat 1 Banklands", + "address_line_2": "94, Himley Road", + "assessment_date": "2019-04-16", + "assessment_type": "SAP", + "completion_date": "2019-04-16", + "inspection_date": "2019-04-16", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 3, + "air_permeability": 15, + "open_flues_count": 0, + "ventilation_type": 1, + "extract_fans_count": 2, + "open_fireplaces_count": 0, + "sheltered_sides_count": 2, + "flueless_gas_fires_count": 0 + }, + "sap_data_version": 9.92, + "sap_flat_details": { + "level": 1 + }, + "total_floor_area": 41, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2019-04-16", + "sap_energy_source": { + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 2, + "fixed_lighting_outlets_count": 6, + "low_energy_fixed_lighting_outlets_count": 4, + "low_energy_fixed_lighting_outlets_percentage": 67 + }, + "sap_opening_types": [ + { + "name": "DTC", + "type": 3, + "u_value": 1.4, + "data_source": 3, + "glazing_type": 1 + }, + { + "name": "new Window", + "type": 4, + "u_value": 1.6, + "data_source": 2, + "frame_factor": 0.7, + "glazing_type": 3, + "solar_transmittance": 0.76 + }, + { + "name": "New HGD", + "type": 2, + "u_value": 1.8, + "data_source": 2, + "glazing_type": 3 + }, + { + "name": "Existing Glazing", + "type": 4, + "u_value": 2.8, + "frame_type": 2, + "data_source": 3, + "glazing_gap": 2, + "frame_factor": 0.7, + "glazing_type": 3, + "isargonfilled": "false", + "solar_transmittance": 0.76 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof 1", + "u_value": 0.32, + "roof_type": 2, + "description": "External Roof 1", + "total_roof_area": 6.94 + }, + { + "name": "Party roof 1", + "u_value": 0, + "roof_type": 4, + "description": "Party Ceilings 1", + "total_roof_area": 33.66 + } + ], + "sap_walls": [ + { + "name": "External Wall 1", + "u_value": 0.31, + "wall_type": 2, + "description": "External Wall 1", + "total_wall_area": 31.56, + "is_curtain_walling": "false" + }, + { + "name": "External Wall 2", + "u_value": 0.31, + "wall_type": 3, + "description": "WTC", + "total_wall_area": 15.48, + "is_curtain_walling": "false" + }, + { + "name": "Party Wall 0", + "u_value": 0, + "wall_type": 4, + "total_wall_area": 30.72 + } + ], + "identifier": "Main Dwelling", + "overshading": 2, + "sap_openings": [ + { + "name": "Front", + "type": "DTC", + "width": 1.89, + "height": 1, + "location": "External Wall 2", + "orientation": 0 + }, + { + "name": "Rear", + "type": "Existing Glazing", + "width": 4.51, + "height": 1, + "location": "External Wall 1", + "orientation": 1 + }, + { + "name": "Rear", + "type": "New HGD", + "width": 2.12, + "height": 1, + "location": "External Wall 1", + "orientation": 0 + }, + { + "name": "Side", + "type": "new Window", + "width": 0.97, + "height": 1, + "location": "External Wall 1", + "orientation": 3 + } + ], + "construction_year": 2019, + "sap_thermal_bridges": { + "thermal_bridge_code": 1 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.57, + "floor_type": 2, + "description": "Heat Loss Floor 1", + "storey_height": 2.4, + "heat_loss_area": 40.6, + "total_floor_area": 40.6 + } + ], + "thermal_mass_parameter": 100 + } + ], + "heating_cost_current": { + "value": 279, + "currency": "GBP" + }, + "co2_emissions_current": 1.5, + "energy_rating_average": 60, + "energy_rating_current": 73, + "lighting_cost_current": { + "value": 47, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Programmer and room thermostat", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + } + ], + "has_hot_water_cylinder": "false", + "heating_cost_potential": { + "value": 281, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 69, + "currency": "GBP" + }, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 11, + "currency": "GBP" + }, + "indicative_cost": "\u00a310", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 5, + "energy_performance_rating": 74, + "environmental_impact_rating": 76 + } + ], + "co2_emissions_potential": 1.5, + "energy_rating_potential": 74, + "lighting_cost_potential": { + "value": 36, + "currency": "GBP" + }, + "schema_version_original": "LIG-17.0", + "hot_water_cost_potential": { + "value": 69, + "currency": "GBP" + }, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 3899, + "water_heating": 1553 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 216, + "has_fixed_air_conditioning": "false", + "multiple_glazed_percentage": 100, + "calculation_software_version": "4.10r08", + "energy_consumption_potential": 212, + "environmental_impact_current": 76, + "current_energy_efficiency_band": "C", + "environmental_impact_potential": 76, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 38 +} \ No newline at end of file diff --git a/datatypes/epc/schema/tests/fixtures/sap_17_1_house.json b/datatypes/epc/schema/tests/fixtures/sap_17_1_house.json new file mode 100644 index 00000000..8097a76d --- /dev/null +++ b/datatypes/epc/schema/tests/fixtures/sap_17_1_house.json @@ -0,0 +1,448 @@ +{ + "uprn": 10090592989, + "roofs": [ + { + "description": "Average thermal transmittance 0.14 W/m\u00b2K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.27 W/m\u00b2K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.22 W/m\u00b2K", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "status": "entered", + "tenure": "ND", + "windows": { + "description": "High performance glazing", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "lighting": { + "description": "Low energy lighting in all fixed outlets", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "postcode": "DN11 8FB", + "data_type": 2, + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "DONCASTER", + "built_form": 2, + "created_at": "2019-07-29 10:22:30", + "living_area": 14.54, + "orientation": 4, + "region_code": 3, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "water_fuel_type": 1, + "water_heating_code": 901, + "main_heating_details": [ + { + "main_fuel_type": 1, + "heat_emitter_type": 1, + "emitter_temperature": 1, + "is_flue_fan_present": "true", + "main_heating_number": 1, + "main_heating_control": 2110, + "is_interlocked_system": "true", + "main_heating_category": 2, + "main_heating_fraction": 1, + "main_heating_flue_type": 2, + "central_heating_pump_age": 2, + "main_heating_data_source": 1, + "main_heating_index_number": 17045, + "has_separate_delayed_start": "true", + "load_or_weather_compensation": 0, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "false", + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1 + }, + "sap_version": 9.92, + "schema_type": "SAP-Schema-17.1", + "uprn_source": "Energy Assessor", + "country_code": "ENG", + "main_heating": [ + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "air_tightness": { + "description": "Air permeability 7.5 m\u00b3/h.m\u00b2 (assessed average)", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "dwelling_type": "Semi-detached house", + "language_code": 1, + "property_type": 0, + "address_line_1": "29, Avalon Gardens", + "address_line_2": "Harworth", + "assessment_date": "2019-07-29", + "assessment_type": "SAP", + "completion_date": "2019-07-29", + "inspection_date": "2019-07-29", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 5, + "air_permeability": 5.47, + "open_flues_count": 0, + "ventilation_type": 1, + "extract_fans_count": 4, + "open_fireplaces_count": 0, + "sheltered_sides_count": 2, + "flueless_gas_fires_count": 0 + }, + "design_water_use": 1, + "sap_data_version": 9.9, + "total_floor_area": 82, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2019-07-29", + "sap_energy_source": { + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 1, + "fixed_lighting_outlets_count": 11, + "low_energy_fixed_lighting_outlets_count": 11, + "low_energy_fixed_lighting_outlets_percentage": 100 + }, + "sap_opening_types": [ + { + "name": "Door", + "type": 1, + "u_value": 1.1, + "data_source": 2, + "glazing_type": 1 + }, + { + "name": "Windows", + "type": 4, + "u_value": 1.35, + "data_source": 2, + "frame_factor": 0.7, + "glazing_type": 7, + "solar_transmittance": 0.63 + }, + { + "name": "Rooflights", + "type": 5, + "u_value": 1.35, + "data_source": 2, + "frame_factor": 0.7, + "glazing_type": 7, + "solar_transmittance": 0.63 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof 1", + "u_value": 0.14, + "roof_type": 2, + "description": "Cold Roof", + "kappa_value": 0, + "total_roof_area": 45.87 + } + ], + "sap_walls": [ + { + "name": "External Wall 1", + "u_value": 0.26, + "wall_type": 2, + "description": "External Wall", + "kappa_value": 0, + "total_wall_area": 91.31, + "is_curtain_walling": "false" + }, + { + "name": "External Wall 2", + "u_value": 0.4, + "wall_type": 3, + "description": "Garage Wall", + "kappa_value": 0, + "total_wall_area": 17.02, + "is_curtain_walling": "false" + }, + { + "name": "Party Wall 0", + "u_value": 0, + "wall_type": 4, + "kappa_value": 45, + "total_wall_area": 29.56 + }, + { + "name": "Internal Wall 0", + "u_value": 0, + "wall_type": 5, + "kappa_value": 9, + "total_wall_area": 55.0346 + }, + { + "name": "Internal Wall 0", + "u_value": 0, + "wall_type": 5, + "kappa_value": 9, + "total_wall_area": 97.359 + } + ], + "identifier": "Main Dwelling", + "overshading": 2, + "sap_openings": [ + { + "name": "Front Door", + "type": "Door", + "width": 1.95, + "height": 1, + "location": "External Wall 1", + "orientation": 0 + }, + { + "name": "Front Windows", + "type": "Windows", + "width": 5.33, + "height": 1, + "location": "External Wall 1", + "orientation": 4 + }, + { + "name": "RH Windows", + "type": "Windows", + "width": 0.66, + "height": 1, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "Rear Windows", + "type": "Windows", + "width": 7.92, + "height": 1, + "location": "External Wall 1", + "orientation": 8 + } + ], + "construction_year": 2015, + "sap_thermal_bridges": { + "thermal_bridges": [ + { + "length": 11.19, + "psi_value": 0.395, + "psi_value_source": 3, + "thermal_bridge_type": "E1" + }, + { + "length": 8.46, + "psi_value": 0.028, + "psi_value_source": 3, + "thermal_bridge_type": "E3" + }, + { + "length": 27, + "psi_value": 0.035, + "psi_value_source": 3, + "thermal_bridge_type": "E4" + }, + { + "length": 25.51, + "psi_value": 0.061, + "psi_value_source": 3, + "thermal_bridge_type": "E5" + }, + { + "length": 22.28, + "psi_value": 0.07, + "psi_value_source": 2, + "thermal_bridge_type": "E6" + }, + { + "length": 12.86, + "psi_value": 0.098, + "psi_value_source": 3, + "thermal_bridge_type": "E10" + }, + { + "length": 10.76, + "psi_value": 0.069, + "psi_value_source": 3, + "thermal_bridge_type": "E12" + }, + { + "length": 14.4, + "psi_value": 0.062, + "psi_value_source": 3, + "thermal_bridge_type": "E16" + }, + { + "length": 4.65, + "psi_value": -0.078, + "psi_value_source": 3, + "thermal_bridge_type": "E17" + }, + { + "length": 9.75, + "psi_value": 0.076, + "psi_value_source": 3, + "thermal_bridge_type": "E18" + }, + { + "length": 4.46, + "psi_value": 0.043, + "psi_value_source": 3, + "thermal_bridge_type": "P1" + }, + { + "length": 4.46, + "psi_value": 0, + "psi_value_source": 4, + "thermal_bridge_type": "P2" + }, + { + "length": 7.52, + "psi_value": 0.055, + "psi_value_source": 3, + "thermal_bridge_type": "P4" + } + ], + "thermal_bridge_code": 5 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.22, + "floor_type": 2, + "description": "Ground Floor", + "kappa_value": 0, + "storey_height": 2.33, + "heat_loss_area": 37.78, + "total_floor_area": 37.78, + "kappa_value_from_below": 9 + }, + { + "storey": 1, + "u_value": 0.21, + "floor_type": 3, + "description": "Floor Above Garage", + "kappa_value": 18, + "storey_height": 2.55, + "heat_loss_area": 8.08, + "total_floor_area": 43.99 + } + ] + } + ], + "heating_cost_current": { + "value": 241, + "currency": "GBP" + }, + "co2_emissions_current": 1.4, + "energy_rating_average": 60, + "energy_rating_current": 83, + "lighting_cost_current": { + "value": 64, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Time and temperature zone control", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "has_hot_water_cylinder": "false", + "heating_cost_potential": { + "value": 241, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 79, + "currency": "GBP" + }, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 29, + "currency": "GBP" + }, + "indicative_cost": "\u00a34,000 - \u00a36,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 84, + "environmental_impact_rating": 87 + }, + { + "sequence": 2, + "typical_saving": { + "value": 294, + "currency": "GBP" + }, + "indicative_cost": "\u00a33,500 - \u00a35,500", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 94, + "environmental_impact_rating": 96 + } + ], + "co2_emissions_potential": 0.4, + "energy_rating_potential": 94, + "lighting_cost_potential": { + "value": 64, + "currency": "GBP" + }, + "schema_version_original": "LIG-17.0", + "hot_water_cost_potential": { + "value": 50, + "currency": "GBP" + }, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 3202, + "water_heating": 1776 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 100, + "has_fixed_air_conditioning": "false", + "multiple_glazed_percentage": 100, + "calculation_software_version": "4.04r04", + "energy_consumption_potential": 24, + "environmental_impact_current": 85, + "current_energy_efficiency_band": "B", + "environmental_impact_potential": 96, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "A", + "co2_emissions_current_per_floor_area": 17 +} \ No newline at end of file