diff --git a/backend/Property.py b/backend/Property.py index 5e994cae..1d79b16d 100644 --- a/backend/Property.py +++ b/backend/Property.py @@ -890,6 +890,7 @@ class Property: "lodged_co2_emissions": float(self.epc_record.original_epc["co2-emissions-current"]), "lodged_heat_demand": float(self.epc_record.original_epc["energy-consumption-current"]), "has_been_remodelled": self.epc_record.has_been_remodelled, + "environment_impact_current": self.epc_record.environment_impact_current } return property_details_epc diff --git a/backend/SearchEpc.py b/backend/SearchEpc.py index a633176e..7d3a8b3d 100644 --- a/backend/SearchEpc.py +++ b/backend/SearchEpc.py @@ -2,6 +2,7 @@ import os import time import re +from typing import Optional from urllib.parse import urlencode import usaddress import pandas as pd @@ -162,7 +163,8 @@ class SearchEpc: property_type=None, fast=False, heating_system: [str, None] = None, - associated_uprns: [List[int] | None] = None + associated_uprns: [List[int] | None] = None, + lmk_key: Optional[str] = None, ): """ Address lines 1 and postcode are mandatory fields. The other address lines are optional @@ -225,6 +227,7 @@ class SearchEpc: # Be default, this is set to false. This flag indicates whether we should take the existing EPC, but use # the estimated EPC to clean missings self.clean_missing_on_expired = False + self.lmk_key = lmk_key def set_strict_property_type_search(self): """ @@ -289,18 +292,22 @@ class SearchEpc: else: return None - def _get_epc(self, params, size): + def _get_epc(self, params, size, lmk_key=None): """ To be called by get_epc() - not for external usage """ - url = os.path.join(self.client.domestic.host, "search") - if size: - url += "?" + urlencode({k: v for k, v in {"size": size}.items() if v}) + if lmk_key is not None: + url = os.path.join(self.client.domestic.host, f"certificate/{lmk_key}") + else: + url = os.path.join(self.client.domestic.host, "search") + if size: + url += "?" + urlencode({k: v for k, v in {"size": size}.items() if v}) for retry in range(self.max_retries): try: response = self.client.domestic.call(method="get", url=url, params=params) + if response: self.data = response return { @@ -341,6 +348,15 @@ class SearchEpc: self.data = output["response"] return output["msg"] + if self.lmk_key: + data = {"rows": []} + api_response = self._get_epc(params={}, size=size, lmk_key=self.lmk_key) + data["rows"].extend(api_response["response"]["rows"]) + api_response["msg"] = self.SUCCESS + self.data = data + self.data["rows"][0]["uprn"] = str(self.uprn) + return api_response["msg"] + if not self.uprn and not self.address1 and not self.postcode: raise ValueError("No search parameters provided") diff --git a/backend/addresses/Address.py b/backend/addresses/Address.py index f348b141..0d957679 100644 --- a/backend/addresses/Address.py +++ b/backend/addresses/Address.py @@ -48,6 +48,10 @@ class Address: # domna_full_address: Optional[str] # domna_address_1: Optional[str] + # Identifiers to handle the case where we have erroneous matches based on UPRN due to probelmatic EPC data + lmk_key: Optional[str] + epc_certificate_number: Optional[str] + @property def request_data(self) -> dict[str, Optional[str]]: """ diff --git a/backend/addresses/Addresses.py b/backend/addresses/Addresses.py index c1624522..4c046554 100644 --- a/backend/addresses/Addresses.py +++ b/backend/addresses/Addresses.py @@ -134,6 +134,19 @@ class Addresses: postcode = str(row.get("postcode", "")).strip().upper() + lmk_key = row.get("lmk_key", None) + # Handle NAN + if pd.isnull(lmk_key): + lmk_key = None + + epc_certificate_number = row.get("certificate_number", None) + if pd.isnull(epc_certificate_number): + epc_certificate_number = None + + landlord_heating_system = row.get("epc_heating_type", None) + if pd.isnull(landlord_heating_system): + landlord_heating_system = None + return Address( uprn=uprn, landlord_property_id=str(row["landlord_property_id"]) if row.get("landlord_property_id") else None, @@ -153,7 +166,7 @@ class Addresses: landlord_roof_construction=None, landlord_floor_construction=None, landlord_windows_type=None, - landlord_heating_system=row.get("epc_heating_type"), + landlord_heating_system=landlord_heating_system, landlord_fuel_type=None, landlord_heating_controls=None, landlord_hot_water_system=None, @@ -168,4 +181,8 @@ class Addresses: landlord_has_sloping_ceiling=None, landlord_multi_glaze_proportion=None, landlord_construction_age_band=None, + + # EPC identifiers which are helpful if UPRN is problematic + lmk_key=lmk_key, + epc_certificate_number=epc_certificate_number ) diff --git a/backend/app/db/functions/epc_functions.py b/backend/app/db/functions/epc_functions.py index 1dcb92fe..f43c270b 100644 --- a/backend/app/db/functions/epc_functions.py +++ b/backend/app/db/functions/epc_functions.py @@ -11,7 +11,7 @@ class EpcStoreService: Service layer for EPC data lookup and persistence. """ - FRESHNESS_DAYS = 180 # Upgraded to 180 days + FRESHNESS_DAYS = 14 # Upgraded to 14 days # status labels FRESH = "fresh" @@ -22,7 +22,7 @@ class EpcStoreService: def get_epc_for_uprn(cls, session: Session, uprn: int): """ Query EPC data for a given UPRN and return a dict describing: - - epc_api: only if within last 30 days + - epc_api: only if within last 21 days - epc_page: only if epc_api exists - status: 'fresh', 'expired', or 'missing' """ diff --git a/backend/app/db/functions/uploaded_files_functions.py b/backend/app/db/functions/uploaded_files_functions.py new file mode 100644 index 00000000..3708813a --- /dev/null +++ b/backend/app/db/functions/uploaded_files_functions.py @@ -0,0 +1,25 @@ +from typing import Optional + +from sqlalchemy import select + +from backend.app.db.connection import db_read_session +from backend.app.db.models.uploaded_file import ( + FileSourceEnum, + FileTypeEnum, + UploadedFile, +) + + +def get_uploaded_file_by_listing_type_and_source( + hubspot_listing_id: int, + file_type: FileTypeEnum, + file_source: FileSourceEnum, +) -> Optional[UploadedFile]: + with db_read_session() as session: + statement = select(UploadedFile).where( + UploadedFile.hubspot_listing_id == hubspot_listing_id, + UploadedFile.file_type == file_type, + UploadedFile.file_source == file_source, + ) + + return session.exec(statement).one_or_none() diff --git a/backend/app/db/models/portfolio.py b/backend/app/db/models/portfolio.py index c511b6c9..a4f9a675 100644 --- a/backend/app/db/models/portfolio.py +++ b/backend/app/db/models/portfolio.py @@ -263,6 +263,8 @@ class PropertyDetailsEpcModel(Base): lodged_heat_demand = Column(Float) has_been_remodelled = Column(Boolean, default=False) + environment_impact_current = Column(Float) + class PropertyDetailsSpatial(Base): __tablename__ = "property_details_spatial" diff --git a/backend/app/db/models/uploaded_file.py b/backend/app/db/models/uploaded_file.py index 9b751d34..71763790 100644 --- a/backend/app/db/models/uploaded_file.py +++ b/backend/app/db/models/uploaded_file.py @@ -14,6 +14,8 @@ class FileTypeEnum(enum.Enum): PAR_PHOTO_PACK = "par_photo_pack" PAS_2023_PROPERTY = "pas_2023_property" PAS_2023_OCCUPANCY = "pas_2023_occupancy" + ECMK_SITE_NOTE = "ecmk_site_note" + ECMK_RD_SAP_SITE_NOTE = "ecmk_rd_sap_site_note" class FileSourceEnum(enum.Enum): @@ -37,9 +39,21 @@ class UploadedFile(Base): hubspot_listing_id = Column(BigInteger, nullable=True) file_type = Column( - SqlEnum(FileTypeEnum, name="file_type", create_type=False), nullable=True + SqlEnum( + FileTypeEnum, + name="file_type", + create_type=False, + values_callable=lambda enum_cls: [e.value for e in enum_cls], + ), + nullable=True, ) file_source = Column( - SqlEnum(FileSourceEnum, name="file_source", create_type=False), nullable=True + SqlEnum( + FileSourceEnum, + name="file_source", + create_type=False, + values_callable=lambda enum_cls: [e.value for e in enum_cls], + ), + nullable=True, ) diff --git a/backend/ecmk_fetcher/address_list.py b/backend/ecmk_fetcher/address_list.py index d273c45d..ba636a70 100644 --- a/backend/ecmk_fetcher/address_list.py +++ b/backend/ecmk_fetcher/address_list.py @@ -1,40 +1,59 @@ -from typing import Dict, Optional -from openpyxl import load_workbook import re +from dataclasses import dataclass +from typing import Any, Dict, Optional +from openpyxl import Workbook, load_workbook +from openpyxl.worksheet.worksheet import Worksheet -def extract_addresses_from_spreadsheet(filepath: str) -> Dict[str, str]: - wb = load_workbook(filepath, data_only=True) - ws = wb["Southern RA-Lite Programme 3103"] +@dataclass +class PropertyRow: + row_index: int + address: str + listing_id: str - properties: Dict[str, str] = {} - header_row = 1 - id_col_index = None - deal_name_col_index = None +def extract_addresses_from_spreadsheet( + filepath: str, +) -> Dict[str, PropertyRow]: + wb: Workbook = load_workbook(filepath, data_only=True) + ws: Worksheet = wb["Southern RA-Lite Programme 3103"] + header_row: int = 1 + id_col: Optional[int] = None + deal_name_col: Optional[int] = None + listing_id_col: Optional[int] = None + + # find columns for col in range(1, ws.max_column + 1): - value = ws.cell(row=header_row, column=col).value + raw_value: Any = ws.cell(row=header_row, column=col).value + value: str = str(raw_value).strip().lower() if raw_value else "" - if value and str(value).strip().lower() == "id": - id_col_index = col + if value == "id": + id_col = col + elif value == "deal name": + deal_name_col = col + elif value == "associated listing ids": + listing_id_col = col - if value and str(value).strip().lower() == "deal name": - deal_name_col_index = col - break + if id_col is None or deal_name_col is None or listing_id_col is None: + raise Exception("Missing required columns") - if id_col_index is None or deal_name_col_index is None: - raise Exception("Required columns not found") + properties: Dict[str, PropertyRow] = {} for row in range(2, ws.max_row + 1): - id_val = ws.cell(row=row, column=id_col_index).value - deal_name = ws.cell(row=row, column=deal_name_col_index).value + id_val: Any = ws.cell(row=row, column=id_col).value + deal_name: Any = ws.cell(row=row, column=deal_name_col).value + listing_id: Any = ws.cell(row=row, column=listing_id_col).value - if not id_val or not deal_name: + if not id_val or not deal_name or not listing_id: continue - properties[str(id_val).strip()] = extract_succinct_address( - str(deal_name).strip() + property_id: str = str(id_val).strip() + + properties[property_id] = PropertyRow( + row_index=row, + address=extract_succinct_address(str(deal_name)), + listing_id=listing_id, ) return properties diff --git a/backend/ecmk_fetcher/browser.py b/backend/ecmk_fetcher/browser.py index 6d018537..de349b92 100644 --- a/backend/ecmk_fetcher/browser.py +++ b/backend/ecmk_fetcher/browser.py @@ -50,6 +50,7 @@ def get_first_row_signature(page: Page) -> str: def go_to_next_page(page: Page) -> bool: + logger.info("Going to next page") before = get_first_row_signature(page) page.locator("#assessmentDatatable_next a").click() diff --git a/backend/ecmk_fetcher/handler/Dockerfile b/backend/ecmk_fetcher/handler/Dockerfile new file mode 100644 index 00000000..fa2126fd --- /dev/null +++ b/backend/ecmk_fetcher/handler/Dockerfile @@ -0,0 +1,26 @@ +FROM mcr.microsoft.com/playwright/python:v1.58.0-jammy + +# Install AWS Lambda RIE +ADD https://github.com/aws/aws-lambda-runtime-interface-emulator/releases/latest/download/aws-lambda-rie /usr/local/bin/aws-lambda-rie +RUN chmod +x /usr/local/bin/aws-lambda-rie + +# Set working directory (Lambda task root) +WORKDIR /var/task + +COPY backend/ecmk_fetcher/handler/requirements.txt . +RUN pip install --no-cache-dir -r requirements.txt + +COPY utils/ utils/ +COPY backend/ backend/ +COPY datatypes/ datatypes/ + +# Local lambda entrypoint +# ENTRYPOINT ["/usr/local/bin/aws-lambda-rie", "python", "-m", "awslambdaric"] + +#AWS lambda entrypoint +ENTRYPOINT ["python", "-m", "awslambdaric"] + +# ----------------------------- +# Lambda handler +# ----------------------------- +CMD ["backend.ecmk_fetcher.handler.handler.handler"] \ No newline at end of file diff --git a/backend/ecmk_fetcher/handler/handler.py b/backend/ecmk_fetcher/handler/handler.py index 4ce3a949..b777cc9f 100644 --- a/backend/ecmk_fetcher/handler/handler.py +++ b/backend/ecmk_fetcher/handler/handler.py @@ -1,9 +1,13 @@ from typing import Any, Mapping from backend.ecmk_fetcher.processor import run_job +from utils.logger import setup_logger + +logger = setup_logger() def handler(event: Mapping[str, Any], context: Any) -> None: + logger.info("Entered handler") run_job() diff --git a/backend/ecmk_fetcher/handler/requirements.txt b/backend/ecmk_fetcher/handler/requirements.txt new file mode 100644 index 00000000..2692484e --- /dev/null +++ b/backend/ecmk_fetcher/handler/requirements.txt @@ -0,0 +1,12 @@ +awslambdaric +playwright==1.58.0 +msal +openpyxl +sqlalchemy==2.0.36 +sqlmodel +pytz==2024.2 +psycopg2-binary==2.9.10 +pydantic-settings==2.6.0 +boto3==1.35.44 +pandas==2.2.2 +numpy<2.0 \ No newline at end of file diff --git a/backend/ecmk_fetcher/local_handler/docker-compose.yml b/backend/ecmk_fetcher/local_handler/docker-compose.yml new file mode 100644 index 00000000..fd642499 --- /dev/null +++ b/backend/ecmk_fetcher/local_handler/docker-compose.yml @@ -0,0 +1,11 @@ +version: "3.9" + +services: + ecmk-fetcher-lambda: + build: + context: ../../../ + dockerfile: backend/ecmk_fetcher/handler/Dockerfile + ports: + - "9000:8080" + env_file: + - ../../../.env \ No newline at end of file diff --git a/backend/ecmk_fetcher/local_handler/invoke_local_lambda.py b/backend/ecmk_fetcher/local_handler/invoke_local_lambda.py new file mode 100644 index 00000000..ba76301e --- /dev/null +++ b/backend/ecmk_fetcher/local_handler/invoke_local_lambda.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +import json +import requests + +HOST = "localhost" +PORT = "9000" + +LAMBDA_URL = f"http://{HOST}:{PORT}/2015-03-31/functions/function/invocations" + +payload = { + "Records": [ + { + "body": json.dumps( + { + "test": 123456, + } + ) + } + ] +} + +response = requests.post(LAMBDA_URL, json=payload) + +print("Status code:", response.status_code) +print("Response:") +print(response.text) diff --git a/backend/ecmk_fetcher/processor.py b/backend/ecmk_fetcher/processor.py index 1852b867..2f122080 100644 --- a/backend/ecmk_fetcher/processor.py +++ b/backend/ecmk_fetcher/processor.py @@ -1,6 +1,5 @@ import os -from typing import Dict, List - +from typing import Dict from playwright.sync_api import ( sync_playwright, Locator, @@ -9,7 +8,14 @@ from playwright.sync_api import ( BrowserContext, ) -from backend.ecmk_fetcher.address_list import extract_addresses_from_spreadsheet +from backend.app.db.functions.uploaded_files_functions import ( + get_uploaded_file_by_listing_type_and_source, +) +from backend.app.db.models.uploaded_file import FileSourceEnum, FileTypeEnum +from backend.ecmk_fetcher.address_list import ( + PropertyRow, + extract_addresses_from_spreadsheet, +) from backend.ecmk_fetcher.browser import ( attach_debug_listeners, download_with_retry, @@ -18,14 +24,25 @@ from backend.ecmk_fetcher.browser import ( go_to_next_page, login, ) -from backend.ecmk_fetcher.reports import REPORT_TYPES, build_property_id -from backend.ecmk_fetcher.sharepoint import upload_file_to_sharepoint +from backend.ecmk_fetcher.reports import ( + REPORT_TYPES, + build_property_id, + map_report_type_to_db_file_type, +) +from backend.ecmk_fetcher.upload import ( + upload_file_to_s3_and_update_db, + upload_file_to_sharepoint, +) +from utils.logger import setup_logger from utils.sharepoint.domna_sharepoint_client import DomnaSharepointClient from utils.sharepoint.domna_sites import DomnaSites +logger = setup_logger() + def run_job() -> None: - username: str = "" + + username: str = "" # TODO: get from github secrets password: str = "" property_list_file: str = ( @@ -35,8 +52,7 @@ def run_job() -> None: BASE_DIR: str = os.path.dirname(__file__) filepath: str = os.path.join(BASE_DIR, property_list_file) - property_map: Dict[str, str] = extract_addresses_from_spreadsheet(filepath) - property_ids: List[str] = list(property_map.keys()) + property_map: Dict[str, PropertyRow] = extract_addresses_from_spreadsheet(filepath) sharepoint_client: DomnaSharepointClient = DomnaSharepointClient( sharepoint_location=DomnaSites.PRIVATE_PAY @@ -44,6 +60,8 @@ def run_job() -> None: sharepoint_base_path: str = "/Projects/Southern Housing/SH-SURV-26-001/Assessments" + s3_bucket: str = "retrofit-energy-assessments-dev" + with sync_playwright() as p: browser: Browser = p.chromium.launch(headless=True) context: BrowserContext = browser.new_context() @@ -79,14 +97,38 @@ def run_job() -> None: property_id: str = build_property_id(address, postcode) - if property_id not in property_ids: + property_row: PropertyRow | None = property_map.get(property_id) + + if not property_row: continue - sharepoint_address: str = property_map[property_id] + logger.info(f"Match found for property {address}") + + sharepoint_address: str = property_row.address go_to_assessment_details(page, row) for report_type in REPORT_TYPES: + hubspot_listing_id: str = property_row.listing_id + try: + db_file_type: FileTypeEnum = ( + map_report_type_to_db_file_type(report_type) + ) + + except ValueError: + logger.error( + f"Unknown report type {report_type}, skipping file" + ) + continue + + if get_uploaded_file_by_listing_type_and_source( + hubspot_listing_id=int(hubspot_listing_id), + file_type=db_file_type, + file_source=FileSourceEnum.ECMK, + ): + logger.debug("File already uploaded to s3, skipping") + continue + file_path: str | None = download_with_retry( page, report_type ) @@ -94,6 +136,10 @@ def run_job() -> None: if not file_path: continue + logger.info( + f"Successfully downloaded file {os.path.basename(file_path)} from ECMK" + ) + try: upload_file_to_sharepoint( client=sharepoint_client, @@ -101,6 +147,20 @@ def run_job() -> None: base_path=sharepoint_base_path, subpath=sharepoint_address, ) + logger.info( + f"Successfully loaded {os.path.basename(file_path)} to sharepoint for {address}" + ) + + # Upload to s3 and update db + upload_file_to_s3_and_update_db( + bucket=s3_bucket, + file_path=file_path, + hubspot_listing_id=hubspot_listing_id, + file_type=db_file_type, + ) + + except Exception: + raise finally: if os.path.exists(file_path): os.remove(file_path) diff --git a/backend/ecmk_fetcher/reports.py b/backend/ecmk_fetcher/reports.py index a8f12792..d8d11d50 100644 --- a/backend/ecmk_fetcher/reports.py +++ b/backend/ecmk_fetcher/reports.py @@ -1,5 +1,7 @@ from enum import Enum +from backend.app.db.models.uploaded_file import FileTypeEnum + class FileDownloadButtonType(Enum): ASSESSOR_HUB_SITENOTE_REPORT = 11 @@ -15,6 +17,16 @@ REPORT_TYPES = [ ] +def map_report_type_to_db_file_type(report_type: int) -> FileTypeEnum: + match report_type: + case FileDownloadButtonType.ASSESSOR_HUB_SITENOTE_REPORT.value: + return FileTypeEnum.ECMK_SITE_NOTE + case FileDownloadButtonType.SITENOTE_REPORT.value: + return FileTypeEnum.ECMK_RD_SAP_SITE_NOTE + case _: + raise ValueError("Unknown report type") + + def build_report_selector(report_type: int) -> str: return f"a.download-report-btn[data-report-type='{report_type}']" diff --git a/backend/ecmk_fetcher/sharepoint.py b/backend/ecmk_fetcher/sharepoint.py deleted file mode 100644 index 79db1294..00000000 --- a/backend/ecmk_fetcher/sharepoint.py +++ /dev/null @@ -1,20 +0,0 @@ -import os - -from utils.sharepoint.domna_sharepoint_client import DomnaSharepointClient - - -def upload_file_to_sharepoint( - client: DomnaSharepointClient, - file_path: str, - base_path: str, - subpath: str, -) -> None: - filename = os.path.basename(file_path) - - full_path = f"{base_path}/{subpath}/1. Retrofit Assessment/A. Assessment" - - client.upload_file( - file_path=file_path, - sharepoint_path=full_path, - file_name=filename, - ) diff --git a/backend/ecmk_fetcher/upload.py b/backend/ecmk_fetcher/upload.py new file mode 100644 index 00000000..0a744e53 --- /dev/null +++ b/backend/ecmk_fetcher/upload.py @@ -0,0 +1,51 @@ +from datetime import datetime, timezone +import os + +from backend.app.db.connection import db_session +from backend.app.db.models.uploaded_file import ( + FileSourceEnum, + FileTypeEnum, + UploadedFile, +) +from utils.s3 import upload_file_to_s3 +from utils.sharepoint.domna_sharepoint_client import DomnaSharepointClient + + +def upload_file_to_sharepoint( + client: DomnaSharepointClient, + file_path: str, + base_path: str, + subpath: str, +) -> None: + filename = os.path.basename(file_path) + + full_path = f"{base_path}/{subpath}/1. Retrofit Assessment/A. Assessment" + + client.upload_file( + file_path=file_path, + sharepoint_path=full_path, + file_name=filename, + ) + + +def upload_file_to_s3_and_update_db( + bucket: str, file_path: str, hubspot_listing_id: str, file_type: FileTypeEnum +) -> None: + filename: str = os.path.basename(file_path) + key: str = f"documents/hubspot_listing_id/{hubspot_listing_id}/{filename}" + + upload_file_to_s3(file_path, bucket, key) + + uploaded_file = UploadedFile( + s3_file_bucket=bucket, + s3_file_key=key, + s3_upload_timestamp=datetime.now(timezone.utc), + hubspot_listing_id=hubspot_listing_id, + file_source=FileSourceEnum.ECMK.value, + file_type=file_type.value, + ) + + with db_session() as session: + # TODO: we should do multiple files at once to reduce db trips + session.add(uploaded_file) + session.commit() diff --git a/backend/engine/engine.py b/backend/engine/engine.py index b1b57529..67c9dd4e 100644 --- a/backend/engine/engine.py +++ b/backend/engine/engine.py @@ -582,7 +582,8 @@ async def model_engine(body: PlanTriggerRequest): os_api_key="", full_address=addr.full_address, heating_system=addr.landlord_heating_system, - associated_uprns=associated_uprns + associated_uprns=associated_uprns, + lmk_key=addr.lmk_key ) epc_searcher.ordnance_survey_client.built_form = addr.landlord_built_form epc_searcher.ordnance_survey_client.property_type = addr.landlord_property_type @@ -627,7 +628,12 @@ async def model_engine(body: PlanTriggerRequest): # if we have a remote assment data type, we pull the additional data and include it epc_page_source, find_my_epc_components = {}, [] - if (body.event_type == "remote_assessment") and not (epc_searcher.newest_epc.get("estimated")): + if ((body.event_type == "remote_assessment") and not ( + epc_searcher.newest_epc.get("estimated")) + ) or addr.epc_certificate_number: + + if addr.epc_certificate_number: + rrn = addr.epc_certificate_number property_non_invasive_recommendations, patch, epc_page_source, find_my_epc_components = ( RetrieveFindMyEpc.get_from_epc_with_fallback( epc=epc_searcher.newest_epc, @@ -641,6 +647,10 @@ async def model_engine(body: PlanTriggerRequest): epc_records = patch_epc(patch, epc_records) + # Hack - temp while we're planning to rebuild backend + if addr.epc_certificate_number is not None and epc_records["original_epc"].get("estimated"): + epc_records["original_epc"]["estimated"] = False + prepared_epc = EPCRecord( epc_records=epc_records, run_mode="newdata", cleaning_data=cleaning_data, address_metadata=addr ) diff --git a/backend/epc_api/api_spec.md b/backend/epc_api/api_spec.md new file mode 100644 index 00000000..5e1c309d --- /dev/null +++ b/backend/epc_api/api_spec.md @@ -0,0 +1 @@ +Hello World \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.0/cepc+rr.json b/backend/epc_api/json_samples/CEPC-7.0/cepc+rr.json new file mode 100644 index 00000000..876603e7 --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.0/cepc+rr.json @@ -0,0 +1,278 @@ +{ + "ber": 158.9, + "ser": 59.26, + "ter": 39.95, + "tyr": 106.52, + "uprn": 12457, + "status": "entered", + "postcode": "PT42 7AD", + "post_town": "POSTTOWN", + "issue_date": "2013-08-16", + "methodology": "SBEM", + "report_type": 3, + "schema_type": "CEPC-7.0", + "uprn_source": "Energy Assessor", + "valid_until": "2023-08-15", + "asset_rating": 134, + "language_code": 1, + "output_engine": "EPCgen, v4.1.e.5", + "property_type": "A3/A4/A5 Restaurant and Cafes/Drinking Establishments and Hot Food takeaways", + "address_line_2": "Acme Coffee", + "address_line_3": "13 Old Street", + "assessment_type": "CEPC", + "inspection_date": "2013-08-10", + "inspection_type": "Physical", + "ac_questionnaire": { + "ac_present": "No", + "ac_rated_output": { + "ac_rating_unknown_flag": 1 + }, + "ac_inspection_commissioned": 4 + }, + "calculation_tool": "CLG, iSBEM, v4.1.e, SBEM, v4.1.e.5", + "is_heritage_site": "N", + "transaction_type": 1, + "registration_date": "2013-08-15", + "building_complexity": "Level 3", + "new_build_benchmark": 34, + "location_description": "Located in main shopping area in Posttown town centre", + "technical_information": { + "floor_area": 314, + "building_level": 3, + "main_heating_fuel": "Grid Supplied Electricity", + "building_environment": "Heating and Natural Ventilation" + }, + "summary_of_performance": { + "building_data": [ + { + "area": 313.8, + "weather": "BEL", + "activities": [ + { + "id": 1010, + "area": 142.6 + }, + { + "id": 1030, + "area": 66.9 + }, + { + "id": 1032, + "area": 58.4 + }, + { + "id": 1036, + "area": 4.8 + }, + { + "id": 1031, + "area": 41.1 + } + ], + "building_w_k": 1317.44, + "hvac_systems": [ + { + "area": 142.6, + "type": "No Heating or Cooling", + "fuel_type": "Oil", + "activities": [ + { + "id": 1010, + "area": 142.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 0, + "heating_sseff": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 0, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 0, + "mj_m2_cooling_dem": 47.0757, + "mj_m2_heating_dem": 604.144 + }, + { + "area": 171.2, + "type": "Other local room heater - unfanned", + "fuel_type": "Grid Supplied Electricity", + "activities": [ + { + "id": 1030, + "area": 66.9 + }, + { + "id": 1032, + "area": 58.4 + }, + { + "id": 1036, + "area": 4.8 + }, + { + "id": 1031, + "area": 41.1 + } + ], + "heat_source": "Room heater", + "cooling_sseer": 0, + "heating_sseff": 0.8, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 255.695, + "cooling_gen_seer": 0, + "heating_gen_seff": 1, + "kwh_m2_auxiliary": 1.95411, + "mj_m2_cooling_dem": 683.721, + "mj_m2_heating_dem": 736.402 + } + ], + "analysis_type": "ACTUAL", + "area_exterior": 873.7, + "building_alpha": 3.81869, + "building_w_m2k": 1.50789, + "q50_infiltration": 25, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 27.3554, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 139.499, + "kwh_m2_lighting": 139.423, + "kwh_m2_supplied": 307.344, + "kwh_m2_auxiliary": 1.06611, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 66.704, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 0, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 313.8, + "weather": "BEL", + "activities": [ + { + "id": 1010, + "area": 142.6 + }, + { + "id": 1030, + "area": 66.9 + }, + { + "id": 1032, + "area": 58.4 + }, + { + "id": 1036, + "area": 4.8 + }, + { + "id": 1031, + "area": 41.1 + } + ], + "building_w_k": 301.464, + "hvac_systems": [ + { + "area": 142.6, + "type": "No Heating or Cooling", + "fuel_type": "Oil", + "activities": [ + { + "id": 1010, + "area": 142.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 0, + "heating_sseff": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 0, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 0, + "mj_m2_cooling_dem": 18.7903, + "mj_m2_heating_dem": 179.595 + }, + { + "area": 171.2, + "type": "Other local room heater - unfanned", + "fuel_type": "Oil", + "activities": [ + { + "id": 1030, + "area": 66.9 + }, + { + "id": 1032, + "area": 58.4 + }, + { + "id": 1036, + "area": 4.8 + }, + { + "id": 1031, + "area": 41.1 + } + ], + "heat_source": "Room heater", + "cooling_sseer": 0, + "heating_sseff": 0.792, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 104.881, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 0.521096, + "mj_m2_cooling_dem": 287.737, + "mj_m2_heating_dem": 299.036 + } + ], + "analysis_type": "NOTIONAL", + "area_exterior": 873.7, + "building_alpha": 42.6344, + "building_w_m2k": 0.345043, + "q50_infiltration": 6.0896, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 32.702, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 89.9222, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 57.2199, + "kwh_m2_lighting": 25.9805, + "kwh_m2_supplied": 26.2648, + "kwh_m2_auxiliary": 0.284295, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 66.704, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 0, + "kwh_m2_district_heating": 0 + } + } + ] + }, + "existing_stock_benchmark": 90, + "related_certificate_number": "4444-5555-6666-7777-8889", + "current_energy_efficiency_band": "F" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.0/cepc-rr.json b/backend/epc_api/json_samples/CEPC-7.0/cepc-rr.json new file mode 100644 index 00000000..9e594325 --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.0/cepc-rr.json @@ -0,0 +1,60 @@ +{ + "uprn": 12457, + "status": "cancelled", + "postcode": "SW1A 2AA", + "post_town": "Fulchester", + "issue_date": "2020-05-14", + "report_type": 4, + "schema_type": "CEPC-7.0", + "uprn_source": "Energy Assessor", + "valid_until": "2021-05-03", + "long_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Consider installing an air source heat pump.", + "recommendation_code": "EPC-R5" + } + ], + "language_code": 1, + "other_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Consider installing PV.", + "recommendation_code": "EPC-R4" + } + ], + "property_type": "B1 Offices and Workshop businesses", + "short_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Consider replacing T8 lamps with retrofit T5 conversion kit.", + "recommendation_code": "ECP-L5" + }, + { + "co2_impact": "LOW", + "recommendation": "Introduce HF (high frequency) ballasts for fluorescent tubes: Reduced number of fittings required.", + "recommendation_code": "EPC-L7" + } + ], + "address_line_1": "Some Unit", + "address_line_2": "2 Lonely Street", + "address_line_3": "Some Area", + "address_line_4": "Some County", + "medium_payback": [ + { + "co2_impact": "MEDIUM", + "recommendation": "Add optimum start/stop to the heating system.", + "recommendation_code": "EPC-H7" + } + ], + "assessment_type": "CEPC-RR", + "inspection_date": "2020-05-04", + "calculation_tool": "CEPC Compute v0.2", + "formatted_report": "ZGVmYXVsdA==", + "registration_date": "2020-05-05", + "technical_information": { + "floor_area": 10, + "building_environment": "Natural Ventilation Only" + }, + "related_certificate_number": "0000-0000-0000-0000-0001" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.0/cepc.json b/backend/epc_api/json_samples/CEPC-7.0/cepc.json new file mode 100644 index 00000000..d65c34bf --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.0/cepc.json @@ -0,0 +1,285 @@ +{ + "ber": 67.09, + "ser": 42.07, + "ter": 23.2, + "tyr": 67.98, + "uprn": 12457, + "status": "entered", + "postcode": "SW1A 2AA", + "post_town": "Whitbury", + "issue_date": "2020-05-14", + "report_type": 3, + "schema_type": "CEPC-7.0", + "uprn_source": "Energy Assessor", + "valid_until": "2026-05-04", + "asset_rating": 80, + "language_code": 1, + "property_type": "B1 Offices and Workshop businesses", + "address_line_1": "Some Unit", + "address_line_2": "2 Lonely Street", + "address_line_3": "Some Area", + "address_line_4": "Some County", + "assessment_type": "CEPC", + "inspection_date": "2020-05-04", + "ac_questionnaire": { + "ac_present": "No", + "ac_rated_output": { + "ac_kw_rating": 100 + }, + "ac_estimated_output": 3, + "ac_inspection_commissioned": 1 + }, + "calculation_tool": "Casio fx-39", + "is_heritage_site": "N", + "or_building_data": { + "hvac_system": "Yes", + "other_hvac_system": "Yes", + "internal_environment": "Yes", + "assessment_period_alignment": "Yes" + }, + "transaction_type": 1, + "or_benchmark_data": { + "benchmarks": [ + { + "floor_area": 403, + "benchmark_id": 1 + } + ] + }, + "registration_date": "2020-05-04", + "building_complexity": "Level 3", + "new_build_benchmark": 28, + "or_usable_floor_area": { + "ufa_1": { + "floor_area": 100 + } + }, + "or_energy_consumption": { + "anthracite": { + "end_date": "2030-12-25", + "estimate": 3, + "start_date": "2019-12-25", + "consumption": 12.6 + } + }, + "technical_information": { + "floor_area": 403, + "building_level": 3, + "main_heating_fuel": "Natural Gas", + "renewable_sources": "Renewable sources test", + "special_energy_uses": "Test sp", + "building_environment": "Air Conditioning", + "or_availability_date": "2020-01-04", + "other_fuel_description": "Test" + }, + "or_assessment_end_date": "2030-05-14", + "summary_of_performance": { + "building_data": [ + { + "area": 402.6, + "weather": "LON", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "building_w_k": 411.86, + "hvac_systems": [ + { + "area": 402.6, + "type": "Fan coil systems", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 1.963, + "heating_sseff": 0.827, + "kwh_m2_cooling": 25.3865, + "kwh_m2_heating": 41.0355, + "cooling_gen_seer": 2.5, + "heating_gen_seff": 0.89, + "kwh_m2_auxiliary": 39.0832, + "mj_m2_cooling_dem": 179.401, + "mj_m2_heating_dem": 122.171 + } + ], + "analysis_type": "ACTUAL", + "area_exterior": 1058.32, + "building_alpha": 18.3412, + "building_w_m2k": 0.389164, + "q50_infiltration": 10, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 2.77834, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 3.07665, + "kwh_m2_ses": 0.801605, + "kwh_m2_coal": 0, + "kwh_m2_wind": 3.02777, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 25.3865, + "kwh_m2_heating": 41.0355, + "kwh_m2_lighting": 54.0787, + "kwh_m2_supplied": 121.327, + "kwh_m2_auxiliary": 39.0832, + "kwh_m2_displaced": 6.10442, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 42.185, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 41.0355, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 402.6, + "weather": "LON", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "building_w_k": 362.524, + "hvac_systems": [ + { + "area": 402.6, + "type": "Fan coil systems", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 3.6, + "heating_sseff": 0.819, + "kwh_m2_cooling": 7.46769, + "kwh_m2_heating": 18.1581, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 14.0716, + "mj_m2_cooling_dem": 96.7814, + "mj_m2_heating_dem": 53.5375 + } + ], + "analysis_type": "NOTIONAL", + "area_exterior": 1058.32, + "building_alpha": 11.2489, + "building_w_m2k": 0.342547, + "q50_infiltration": 3, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 3.33761, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 3.33761, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 7.46769, + "kwh_m2_heating": 18.1582, + "kwh_m2_lighting": 14.4489, + "kwh_m2_supplied": 35.9883, + "kwh_m2_auxiliary": 14.0716, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 42.185, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 18.1582, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 402.6, + "weather": "LON", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "building_w_k": 718.761, + "hvac_systems": [ + { + "area": 402.6, + "type": "Fan coil systems", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 2.25, + "heating_sseff": 0.73, + "kwh_m2_cooling": 25.6538, + "kwh_m2_heating": 71.9516, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 2.16062, + "mj_m2_cooling_dem": 207.795, + "mj_m2_heating_dem": 189.088 + } + ], + "analysis_type": "REFERENCE", + "area_exterior": 1058.32, + "building_alpha": 10, + "building_w_m2k": 0.679153, + "q50_infiltration": 10, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 6.41192, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 25.6538, + "kwh_m2_heating": 71.9516, + "kwh_m2_lighting": 45.54, + "kwh_m2_supplied": 73.3544, + "kwh_m2_auxiliary": 2.16062, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 42.185, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 78.3634, + "kwh_m2_district_heating": 0 + } + } + ] + }, + "renewable_energy_source": [ + { + "name": "Solar panel", + "end_date": "2030-12-25", + "generation": 20, + "start_date": "2019-12-25", + "energy_type": 2 + } + ], + "existing_stock_benchmark": 81, + "or_assessment_start_date": "2020-05-14", + "related_certificate_number": "4192-1535-8427-8844-6702", + "current_energy_efficiency_band": "D" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.0/dec+rr.json b/backend/epc_api/json_samples/CEPC-7.0/dec+rr.json new file mode 100644 index 00000000..ed560a1b --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.0/dec+rr.json @@ -0,0 +1,128 @@ +{ + "uprn": 12457, + "status": "entered", + "postcode": "PT4 1SK", + "post_town": "POSTTOWN", + "dec_status": 0, + "issue_date": "2016-02-23", + "methodology": "ORCalc", + "reason_type": 2, + "report_type": 1, + "schema_type": "CEPC-7.0", + "uprn_source": "Energy Assessor", + "valid_until": "2017-04-24", + "language_code": 1, + "output_engine": "ORGen v3.6.2", + "property_type": "Schools And Seasonal Public Buildings; Swimming Pool Centre", + "address_line_1": "Mr Blobby's Sports Academy", + "address_line_2": "Mr Blobby's Academy", + "address_line_3": "Blobby Custard Lane", + "assessment_type": "DEC", + "inspection_date": "2016-04-11", + "this_assessment": { + "heating_co2": 153, + "energy_rating": 77, + "nominated_date": "2016-02-23", + "renewables_co2": 0, + "electricity_co2": 163 + }, + "ac_questionnaire": { + "ac_present": "Yes", + "ac_rated_output": { + "ac_rating_unknown_flag": 1 + }, + "ac_estimated_output": 2, + "ac_inspection_commissioned": 4 + }, + "calculation_tool": "Property-Tectonics Ltd, Lifespan DEC, v3.6.1", + "or_building_data": { + "hvac_system": "Radiators", + "internal_environment": "Mixed-mode with Natural Ventilation", + "assessment_period_alignment": "End Of Main Heating Fuel Period" + }, + "or_previous_data": { + "asset_rating": 0, + "previous_rating_1": { + "or": 95, + "ormm": 11, + "oryyyy": 2014 + }, + "previous_rating_2": { + "or": 113, + "ormm": 11, + "oryyyy": 2013 + } + }, + "year1_assessment": { + "heating_co2": 176, + "energy_rating": 95, + "nominated_date": "2014-11-30", + "renewables_co2": 0, + "electricity_co2": 266 + }, + "year2_assessment": { + "heating_co2": 238, + "energy_rating": 113, + "nominated_date": "2013-11-30", + "renewables_co2": 0, + "electricity_co2": 333 + }, + "building_category": "S3; H6", + "or_benchmark_data": { + "benchmarks": [ + { + "name": "Secondary school", + "tufa": 4646.48, + "benchmark": "Schools And Seasonal Public Buildings", + "floor_area": 4646.48, + "area_metric": "Gross floor area measured as RICS Gross Internal Area (GIA)", + "benchmark_id": 1, + "occupancy_level": "Extended Occupancy" + }, + { + "name": "Swimming pool", + "tufa": 254.52, + "benchmark": "Swimming Pool Centre", + "floor_area": 254.52, + "area_metric": "Gross floor area measured as RICS Gross Internal Area (GIA)", + "benchmark_id": 2, + "occupancy_level": "Extended Occupancy" + } + ], + "main_benchmark": "Schools And Seasonal Public Buildings" + }, + "registration_date": "2016-04-25", + "or_energy_consumption": { + "gas": { + "end_date": "2016-01-01", + "estimate": 0, + "start_date": "2015-01-01", + "consumption": 786655 + }, + "electricity": { + "end_date": "2015-12-31", + "estimate": 0, + "start_date": "2015-01-01", + "consumption": 296820 + } + }, + "technical_information": { + "floor_area": 4901, + "main_heating_fuel": "Natural Gas", + "building_environment": "Mixed-mode with Natural Ventilation", + "separately_metered_electric_heating": 0 + }, + "or_assessment_end_date": "2016-01-01", + "or_assessment_start_date": "2015-01-01", + "dec_annual_energy_summary": { + "typical_thermal_use": 244, + "renewables_electrical": 0, + "typical_electrical_use": 67, + "renewables_fuel_thermal": 0, + "annual_energy_use_electrical": 61, + "annual_energy_use_fuel_thermal": 161 + }, + "related_certificate_number": "3333-4444-5555-6666-7778", + "dec_related_party_disclosure": 3, + "current_energy_efficiency_band": "D" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.0/dec-rr.json b/backend/epc_api/json_samples/CEPC-7.0/dec-rr.json new file mode 100644 index 00000000..1974d031 --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.0/dec-rr.json @@ -0,0 +1,76 @@ +{ + "uprn": 12457, + "status": "entered", + "postcode": "SW1A 2AA", + "post_town": "Fulchester", + "issue_date": "2020-05-04", + "report_type": 2, + "schema_type": "CEPC-7.0", + "uprn_source": "Energy Assessor", + "valid_until": "2028-05-03", + "long_payback": [ + { + "co2_impact": "LOW", + "recommendation": "Consider replacing or improving glazing", + "recommendation_code": "ECP-F4" + } + ], + "language_code": 1, + "other_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Add a big wind turbine", + "recommendation_code": "ECP-H2" + } + ], + "property_type": "University campus", + "short_payback": [ + { + "co2_impact": "MEDIUM", + "recommendation": "Consider thinking about maybe possibly getting a solar panel but only one.", + "recommendation_code": "ECP-L5" + }, + { + "co2_impact": "LOW", + "recommendation": "Consider introducing variable speed drives (VSD) for fans, pumps and compressors.", + "recommendation_code": "EPC-L7" + } + ], + "site_services": { + "service_1": { + "quantity": 751445, + "description": "Electricity" + }, + "service_2": { + "quantity": 72956, + "description": "Gas" + }, + "service_3": { + "quantity": 0, + "description": "Not used" + } + }, + "address_line_1": "Some Unit", + "address_line_2": "2 Lonely Street", + "address_line_3": "Some Area", + "address_line_4": "Some County", + "medium_payback": [ + { + "co2_impact": "LOW", + "recommendation": "Engage experts to propose specific measures to reduce hot waterwastage and plan to carry this out.", + "recommendation_code": "ECP-C1" + } + ], + "assessment_type": "DEC-RR", + "inspection_date": "2020-05-04", + "inspection_type": "Physical", + "calculation_tool": "DCLG, ORCalc, v3.6.2", + "formatted_report": "ZGVmYXVsdA==", + "registration_date": "2020-05-04", + "technical_information": { + "floor_area": 10, + "renewable_sources": "Renewable source", + "special_energy_uses": "Special discount", + "building_environment": "Air Conditioning" + } +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.1/cepc+rr.json b/backend/epc_api/json_samples/CEPC-7.1/cepc+rr.json new file mode 100644 index 00000000..a41ca736 --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.1/cepc+rr.json @@ -0,0 +1,264 @@ +{ + "ber": 135.65, + "ser": 72.8, + "ter": 39.05, + "tyr": 114.44, + "uprn": 12457, + "status": "entered", + "postcode": "A1 1AA", + "post_town": "New Town", + "energy_use": { + "energy_consumption_current": 802.38 + }, + "issue_date": "2017-10-13", + "methodology": "SBEM", + "report_type": 3, + "schema_type": "CEPC-7.1", + "uprn_source": "Energy Assessor", + "valid_until": "2027-10-12", + "asset_rating": 93, + "language_code": 1, + "output_engine": "EPCgen, v5.3.a.0", + "property_type": "A1/A2 Retail and Financial/Professional services", + "address_line_1": "99a Address Street", + "address_line_2": "Place Location", + "assessment_type": "CEPC", + "inspection_date": "2017-10-10", + "inspection_type": "Physical", + "ac_questionnaire": { + "ac_present": "No", + "ac_rated_output": { + "ac_rating_unknown_flag": 1 + }, + "ac_inspection_commissioned": 4 + }, + "calculation_tool": "CLG, iSBEM, v5.3.a, SBEM, v5.3.a.0", + "is_heritage_site": "N", + "transaction_type": 6, + "registration_date": "2017-10-13", + "building_complexity": "Level 3", + "new_build_benchmark": 27, + "technical_information": { + "floor_area": 222, + "building_level": 3, + "main_heating_fuel": "Grid Supplied Electricity", + "building_environment": "Heating and Natural Ventilation" + }, + "summary_of_performance": { + "building_data": [ + { + "area": 221.66, + "weather": "NEW", + "activities": [ + { + "id": 1078, + "area": 6.84 + }, + { + "id": 1077, + "area": 3.42 + }, + { + "id": 1074, + "area": 43.89 + }, + { + "id": 1305, + "area": 167.51 + } + ], + "building_w_k": 756.843, + "hvac_systems": [ + { + "area": 54.15, + "type": "Other local room heater - fanned", + "fuel_type": "Grid Supplied Electricity", + "activities": [ + { + "id": 1078, + "area": 6.84 + }, + { + "id": 1077, + "area": 3.42 + }, + { + "id": 1074, + "area": 43.89 + } + ], + "heat_source": "Room heater", + "cooling_sseer": 0, + "heating_sseff": 0.8, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 221.413, + "cooling_gen_seer": 0, + "heating_gen_seff": 1, + "kwh_m2_auxiliary": 8.58942, + "mj_m2_cooling_dem": 82.8076, + "mj_m2_heating_dem": 637.668 + }, + { + "area": 167.51, + "type": "Other local room heater - unfanned", + "fuel_type": "Grid Supplied Electricity", + "activities": [ + { + "id": 1305, + "area": 167.51 + } + ], + "heat_source": "Room heater", + "cooling_sseer": 0, + "heating_sseff": 0.8, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 143.224, + "cooling_gen_seer": 0, + "heating_gen_seff": 1, + "kwh_m2_auxiliary": 0, + "mj_m2_cooling_dem": 277.439, + "mj_m2_heating_dem": 412.486 + } + ], + "analysis_type": "ACTUAL", + "area_exterior": 578.13, + "building_alpha": 5.48977, + "building_w_m2k": 1.30912, + "q50_infiltration": 25, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 1.42751, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 162.325, + "kwh_m2_lighting": 95.5093, + "kwh_m2_supplied": 261.361, + "kwh_m2_auxiliary": 2.09834, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 17.0788, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 0, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 221.66, + "weather": "NEW", + "activities": [ + { + "id": 1078, + "area": 6.84 + }, + { + "id": 1077, + "area": 3.42 + }, + { + "id": 1074, + "area": 43.89 + }, + { + "id": 1305, + "area": 167.51 + } + ], + "building_w_k": 141.605, + "hvac_systems": [ + { + "area": 54.15, + "type": "Other local room heater - fanned", + "fuel_type": "Oil", + "activities": [ + { + "id": 1078, + "area": 6.84 + }, + { + "id": 1077, + "area": 3.42 + }, + { + "id": 1074, + "area": 43.89 + } + ], + "heat_source": "Room heater", + "cooling_sseer": 0, + "heating_sseff": 0.819, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 83.8955, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 2.29051, + "mj_m2_cooling_dem": 32.988, + "mj_m2_heating_dem": 247.357 + }, + { + "area": 167.51, + "type": "Other local room heater - unfanned", + "fuel_type": "Oil", + "activities": [ + { + "id": 1305, + "area": 167.51 + } + ], + "heat_source": "Room heater", + "cooling_sseer": 0, + "heating_sseff": 0.819, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 18.2439, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 0, + "mj_m2_cooling_dem": 153.68, + "mj_m2_heating_dem": 53.7903 + } + ], + "analysis_type": "NOTIONAL", + "area_exterior": 578.13, + "building_alpha": 12.3616, + "building_w_m2k": 0.244936, + "q50_infiltration": 5, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 1.64373, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 35.9259, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 34.2821, + "kwh_m2_lighting": 53.9687, + "kwh_m2_supplied": 54.5286, + "kwh_m2_auxiliary": 0.559555, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 17.0788, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 0, + "kwh_m2_district_heating": 0 + } + } + ] + }, + "existing_stock_benchmark": 79, + "related_certificate_number": "9999-9999-3333-9999-2222", + "current_energy_efficiency_band": "D" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.1/cepc-rr.json b/backend/epc_api/json_samples/CEPC-7.1/cepc-rr.json new file mode 100644 index 00000000..be34f330 --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.1/cepc-rr.json @@ -0,0 +1,60 @@ +{ + "uprn": 12457, + "status": "cancelled", + "postcode": "SW1A 2AA", + "post_town": "Fulchester", + "issue_date": "2020-05-14", + "report_type": 4, + "schema_type": "CEPC-7.1", + "uprn_source": "Energy Assessor", + "valid_until": "2021-05-03", + "long_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Consider installing an air source heat pump.", + "recommendation_code": "EPC-R5" + } + ], + "language_code": 1, + "other_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Consider installing PV.", + "recommendation_code": "EPC-R4" + } + ], + "property_type": "B1 Offices and Workshop businesses", + "short_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Consider replacing T8 lamps with retrofit T5 conversion kit.", + "recommendation_code": "ECP-L5" + }, + { + "co2_impact": "LOW", + "recommendation": "Introduce HF (high frequency) ballasts for fluorescent tubes: Reduced number of fittings required.", + "recommendation_code": "EPC-L7" + } + ], + "address_line_1": "Some Unit", + "address_line_2": "2 Lonely Street", + "address_line_3": "Some Area", + "address_line_4": "Some County", + "medium_payback": [ + { + "co2_impact": "MEDIUM", + "recommendation": "Add optimum start/stop to the heating system.", + "recommendation_code": "EPC-H7" + } + ], + "assessment_type": "CEPC-RR", + "inspection_date": "2020-05-04", + "calculation_tool": "CEPC Compute v0.2", + "formatted_report": "ZGVmYXVsdA==", + "registration_date": "2020-05-05", + "technical_information": { + "floor_area": 10, + "building_environment": "Natural Ventilation Only" + }, + "related_certificate_number": "0000-0000-0000-0000-0001" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.1/cepc.json b/backend/epc_api/json_samples/CEPC-7.1/cepc.json new file mode 100644 index 00000000..f89954e6 --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.1/cepc.json @@ -0,0 +1,288 @@ +{ + "ber": 67.09, + "ser": 42.07, + "ter": 23.2, + "tyr": 67.98, + "uprn": 12457, + "status": "entered", + "postcode": "BT4 3SR", + "post_town": "Whitbury", + "energy_use": { + "energy_consumption_current": 413.22 + }, + "issue_date": "2020-05-14", + "report_type": 3, + "schema_type": "CEPC-7.1", + "uprn_source": "Energy Assessor", + "valid_until": "2026-05-04", + "asset_rating": 80, + "language_code": 1, + "property_type": "B1 Offices and Workshop businesses", + "address_line_1": "Some Unit", + "address_line_2": "2 Lonely Street", + "address_line_3": "Some Area", + "address_line_4": "Some County", + "assessment_type": "CEPC", + "inspection_date": "2020-05-04", + "ac_questionnaire": { + "ac_present": "No", + "ac_rated_output": { + "ac_kw_rating": 100 + }, + "ac_estimated_output": 3, + "ac_inspection_commissioned": 1 + }, + "calculation_tool": "Casio fx-39", + "is_heritage_site": "N", + "or_building_data": { + "hvac_system": "Yes", + "other_hvac_system": "Yes", + "internal_environment": "Yes", + "assessment_period_alignment": "Yes" + }, + "transaction_type": 1, + "or_benchmark_data": { + "benchmarks": [ + { + "floor_area": 403, + "benchmark_id": 1 + } + ] + }, + "registration_date": "2020-05-04", + "building_complexity": "Level 3", + "new_build_benchmark": 28, + "or_usable_floor_area": { + "ufa_1": { + "floor_area": 100 + } + }, + "or_energy_consumption": { + "anthracite": { + "end_date": "2030-12-25", + "estimate": 3, + "start_date": "2019-12-25", + "consumption": 12.6 + } + }, + "technical_information": { + "floor_area": 403, + "building_level": 3, + "main_heating_fuel": "Natural Gas", + "renewable_sources": "Renewable sources test", + "special_energy_uses": "Test sp", + "building_environment": "Air Conditioning", + "or_availability_date": "2020-01-04", + "other_fuel_description": "Test" + }, + "or_assessment_end_date": "2030-05-14", + "summary_of_performance": { + "building_data": [ + { + "area": 402.6, + "weather": "LON", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "building_w_k": 411.86, + "hvac_systems": [ + { + "area": 402.6, + "type": "Fan coil systems", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 1.963, + "heating_sseff": 0.827, + "kwh_m2_cooling": 25.3865, + "kwh_m2_heating": 41.0355, + "cooling_gen_seer": 2.5, + "heating_gen_seff": 0.89, + "kwh_m2_auxiliary": 39.0832, + "mj_m2_cooling_dem": 179.401, + "mj_m2_heating_dem": 122.171 + } + ], + "analysis_type": "ACTUAL", + "area_exterior": 1058.32, + "building_alpha": 18.3412, + "building_w_m2k": 0.389164, + "q50_infiltration": 10, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 2.77834, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 3.07665, + "kwh_m2_ses": 0.801605, + "kwh_m2_coal": 0, + "kwh_m2_wind": 3.02777, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 25.3865, + "kwh_m2_heating": 41.0355, + "kwh_m2_lighting": 54.0787, + "kwh_m2_supplied": 121.327, + "kwh_m2_auxiliary": 39.0832, + "kwh_m2_displaced": 6.10442, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 42.185, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 41.0355, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 402.6, + "weather": "LON", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "building_w_k": 362.524, + "hvac_systems": [ + { + "area": 402.6, + "type": "Fan coil systems", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 3.6, + "heating_sseff": 0.819, + "kwh_m2_cooling": 7.46769, + "kwh_m2_heating": 18.1581, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 14.0716, + "mj_m2_cooling_dem": 96.7814, + "mj_m2_heating_dem": 53.5375 + } + ], + "analysis_type": "NOTIONAL", + "area_exterior": 1058.32, + "building_alpha": 11.2489, + "building_w_m2k": 0.342547, + "q50_infiltration": 3, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 3.33761, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 3.33761, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 7.46769, + "kwh_m2_heating": 18.1582, + "kwh_m2_lighting": 14.4489, + "kwh_m2_supplied": 35.9883, + "kwh_m2_auxiliary": 14.0716, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 42.185, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 18.1582, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 402.6, + "weather": "LON", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "building_w_k": 718.761, + "hvac_systems": [ + { + "area": 402.6, + "type": "Fan coil systems", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 2.25, + "heating_sseff": 0.73, + "kwh_m2_cooling": 25.6538, + "kwh_m2_heating": 71.9516, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 2.16062, + "mj_m2_cooling_dem": 207.795, + "mj_m2_heating_dem": 189.088 + } + ], + "analysis_type": "REFERENCE", + "area_exterior": 1058.32, + "building_alpha": 10, + "building_w_m2k": 0.679153, + "q50_infiltration": 10, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 6.41192, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 25.6538, + "kwh_m2_heating": 71.9516, + "kwh_m2_lighting": 45.54, + "kwh_m2_supplied": 73.3544, + "kwh_m2_auxiliary": 2.16062, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 42.185, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 78.3634, + "kwh_m2_district_heating": 0 + } + } + ] + }, + "renewable_energy_source": [ + { + "name": "Solar panel", + "end_date": "2030-12-25", + "generation": 20, + "start_date": "2019-12-25", + "energy_type": 2 + } + ], + "existing_stock_benchmark": 81, + "or_assessment_start_date": "2020-05-14", + "related_certificate_number": "4192-1535-8427-8844-6702", + "current_energy_efficiency_band": "D" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.1/dec+rr.json b/backend/epc_api/json_samples/CEPC-7.1/dec+rr.json new file mode 100644 index 00000000..f03bd052 --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.1/dec+rr.json @@ -0,0 +1,118 @@ +{ + "uprn": 12457, + "status": "entered", + "postcode": "A1 1AA", + "post_town": "Town", + "dec_status": 0, + "issue_date": "2015-12-14", + "methodology": "ORCalc", + "reason_type": 1, + "report_type": 1, + "schema_type": "CEPC-7.1", + "uprn_source": "Energy Assessor", + "valid_until": "2016-12-29", + "language_code": 1, + "output_engine": "ORGen v3.6.2", + "property_type": "Schools And Seasonal Public Buildings", + "address_line_2": "Place Early Years Centre", + "address_line_3": "Address Road", + "assessment_type": "DEC", + "inspection_date": "2015-12-09", + "this_assessment": { + "heating_co2": 28, + "energy_rating": 80, + "nominated_date": "2015-12-30", + "renewables_co2": 0, + "electricity_co2": 33 + }, + "ac_questionnaire": { + "ac_present": "No", + "ac_rated_output": { + "ac_rating_unknown_flag": 1 + }, + "ac_inspection_commissioned": 4 + }, + "calculation_tool": "DCLG, ORCalc, v3.6.2", + "or_building_data": { + "hvac_system": "Convectors", + "internal_environment": "Heating and Natural Ventilation", + "assessment_period_alignment": "End Of Main Heating Fuel Period" + }, + "or_previous_data": { + "previous_rating_1": { + "or": 75, + "ormm": 12, + "oryyyy": 2014 + }, + "previous_rating_2": { + "or": 75, + "ormm": 12, + "oryyyy": 2013 + } + }, + "year1_assessment": { + "heating_co2": 24, + "energy_rating": 75, + "nominated_date": "2014-12-01", + "renewables_co2": 0, + "electricity_co2": 30 + }, + "year2_assessment": { + "heating_co2": 29, + "energy_rating": 75, + "nominated_date": "2013-12-01", + "renewables_co2": 0, + "electricity_co2": 31 + }, + "building_category": "S3;", + "or_benchmark_data": { + "benchmarks": [ + { + "name": "Nursery or kindergarten", + "tufa": 1219.2, + "benchmark": "Schools And Seasonal Public Buildings", + "floor_area": 1219.2, + "area_metric": "Gross floor area measured as RICS Gross Internal Area (GIA)", + "benchmark_id": 1, + "occupancy_level": "Extended Occupancy", + "total_equivalent": 2437.5 + } + ], + "main_benchmark": "Schools And Seasonal Public Buildings" + }, + "registration_date": "2015-12-14", + "location_description": "Refurbished and extended nursery school building with flat and pitched roof areas, double glazed windows and cavity walls. The building is heated by gas fired boilers.", + "or_energy_consumption": { + "gas": { + "end_date": "2015-09-30", + "estimate": 0, + "start_date": "2014-09-30", + "consumption": 143533 + }, + "electricity": { + "end_date": "2015-10-01", + "estimate": 0, + "start_date": "2014-10-01", + "consumption": 59477 + } + }, + "technical_information": { + "floor_area": 1219.2, + "main_heating_fuel": "Natural Gas", + "building_environment": "Heating and Natural Ventilation", + "separately_metered_electric_heating": 0 + }, + "or_assessment_end_date": "2015-09-30", + "or_assessment_start_date": "2014-09-30", + "dec_annual_energy_summary": { + "typical_thermal_use": 176, + "renewables_electrical": 0, + "typical_electrical_use": 51, + "renewables_fuel_thermal": 0, + "annual_energy_use_electrical": 49, + "annual_energy_use_fuel_thermal": 118 + }, + "related_certificate_number": "0000-0000-0000-0000-0006", + "dec_related_party_disclosure": 4, + "current_energy_efficiency_band": "D" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-7.1/dec-rr.json b/backend/epc_api/json_samples/CEPC-7.1/dec-rr.json new file mode 100644 index 00000000..95accca6 --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-7.1/dec-rr.json @@ -0,0 +1,76 @@ +{ + "uprn": 12457, + "status": "entered", + "postcode": "SW1A 2AA", + "post_town": "Fulchester", + "issue_date": "2020-05-04", + "report_type": 2, + "schema_type": "CEPC-7.1", + "uprn_source": "Energy Assessor", + "valid_until": "2028-05-03", + "long_payback": [ + { + "co2_impact": "LOW", + "recommendation": "Consider replacing or improving glazing", + "recommendation_code": "ECP-F4" + } + ], + "language_code": 1, + "other_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Add a big wind turbine", + "recommendation_code": "ECP-H2" + } + ], + "property_type": "University campus", + "short_payback": [ + { + "co2_impact": "MEDIUM", + "recommendation": "Consider thinking about maybe possibly getting a solar panel but only one.", + "recommendation_code": "ECP-L5" + }, + { + "co2_impact": "LOW", + "recommendation": "Consider introducing variable speed drives (VSD) for fans, pumps and compressors.", + "recommendation_code": "EPC-L7" + } + ], + "site_services": { + "service_1": { + "quantity": 751445, + "description": "Electricity" + }, + "service_2": { + "quantity": 72956, + "description": "Gas" + }, + "service_3": { + "quantity": 0, + "description": "Not used" + } + }, + "address_line_1": "Some Unit", + "address_line_2": "2 Lonely Street", + "address_line_3": "Some Area", + "address_line_4": "Some County", + "medium_payback": [ + { + "co2_impact": "LOW", + "recommendation": "Engage experts to propose specific measures to reduce hot waterwastage and plan to carry this out.", + "recommendation_code": "ECP-C1" + } + ], + "assessment_type": "DEC-RR", + "inspection_date": "2020-05-04", + "inspection_type": "Physical", + "calculation_tool": "DCLG, ORCalc, v3.6.2", + "formatted_report": "ZGVmYXVsdA==", + "registration_date": "2020-05-04", + "technical_information": { + "floor_area": 10, + "renewable_sources": "Renewable source", + "special_energy_uses": "Special discount", + "building_environment": "Air Conditioning" + } +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-8.0.0/cepc+rr.json b/backend/epc_api/json_samples/CEPC-8.0.0/cepc+rr.json new file mode 100644 index 00000000..9ff6ca3a --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-8.0.0/cepc+rr.json @@ -0,0 +1,468 @@ +{ + "ber": 76.29, + "ser": 45.61, + "ter": 31.05, + "tyr": 90.98, + "uprn": 12457, + "status": "entered", + "postcode": "NE0 0AA", + "post_town": "Big Rock", + "energy_use": { + "energy_consumption_current": 451.27 + }, + "issue_date": "2021-03-19", + "methodology": "SBEM", + "report_type": 3, + "schema_type": "CEPC-8.0.0", + "uprn_source": "Energy Assessor", + "valid_until": "2031-03-18", + "asset_rating": 84, + "language_code": 1, + "output_engine": "EPCgen, v5.6.b.0", + "property_type": "A1/A2 Retail and Financial/Professional services", + "address_line_1": "60 Maple Syrup Road", + "address_line_2": "Candy Mountain", + "assessment_type": "CEPC", + "inspection_date": "2021-03-19", + "inspection_type": "Physical", + "ac_questionnaire": { + "ac_present": "No", + "ac_rated_output": { + "ac_rating_unknown_flag": 1 + }, + "ac_inspection_commissioned": 4 + }, + "calculation_tool": "G-ISBEM Ltd, G-ISBEM, v24.0, SBEM, v5.6.b.0", + "is_heritage_site": "N", + "transaction_type": 1, + "registration_date": "2021-03-19", + "building_complexity": "Level 3", + "new_build_benchmark": 34, + "technical_information": { + "floor_area": 951, + "building_level": 3, + "main_heating_fuel": "Grid Supplied Electricity", + "building_environment": "Air Conditioning" + }, + "summary_of_performance": { + "building_data": [ + { + "area": 951.34, + "weather": "NEW", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + }, + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + }, + { + "id": 1077, + "area": 30.09 + } + ], + "building_w_k": 314.665, + "hvac_systems": [ + { + "area": 353.64, + "type": "No Heating or Cooling", + "fuel_type": "Oil", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 0, + "heating_sseff": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 0, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 4.9793, + "mj_m2_cooling_dem": 44.0312, + "mj_m2_heating_dem": 79.1732 + }, + { + "area": 567.61, + "type": "Split or multi-split system", + "fuel_type": "Grid Supplied Electricity", + "activities": [ + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + } + ], + "heat_source": "Heat pump: air source", + "cooling_sseer": 2.457, + "heating_sseff": 3.466, + "kwh_m2_cooling": 65.3618, + "kwh_m2_heating": 2.17225, + "cooling_gen_seer": 3.46, + "heating_gen_seff": 3.72, + "kwh_m2_auxiliary": 6.9318, + "mj_m2_cooling_dem": 578.138, + "mj_m2_heating_dem": 27.1043 + }, + { + "area": 30.09, + "type": "Other local room heater - unfanned", + "fuel_type": "Grid Supplied Electricity", + "activities": [ + { + "id": 1077, + "area": 30.09 + } + ], + "heat_source": "Direct or storage electric heater", + "cooling_sseer": 0, + "heating_sseff": 0.8, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 101.261, + "cooling_gen_seer": 0, + "heating_gen_seff": 1, + "kwh_m2_auxiliary": 28.4481, + "mj_m2_cooling_dem": 72.0834, + "mj_m2_heating_dem": 291.63 + } + ], + "analysis_type": "ACTUAL", + "area_exterior": 509.17, + "building_alpha": 4.09978, + "building_w_m2k": 0.617996, + "q50_infiltration": 25, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 1.61017, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 38.9976, + "kwh_m2_heating": 4.49883, + "kwh_m2_lighting": 94.9991, + "kwh_m2_supplied": 146.993, + "kwh_m2_auxiliary": 6.88654, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 19.5261, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 0, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 951.34, + "weather": "NEW", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + }, + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + }, + { + "id": 1077, + "area": 30.09 + } + ], + "building_w_k": 106.722, + "hvac_systems": [ + { + "area": 353.64, + "type": "No Heating or Cooling", + "fuel_type": "Oil", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 0, + "heating_sseff": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 0, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 2.98759, + "mj_m2_cooling_dem": 22.3547, + "mj_m2_heating_dem": 24.8966 + }, + { + "area": 567.61, + "type": "Split or multi-split system", + "fuel_type": "Grid Supplied Electricity", + "activities": [ + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + } + ], + "heat_source": "Heat pump: air source", + "cooling_sseer": 3.6, + "heating_sseff": 2.43, + "kwh_m2_cooling": 23.8278, + "kwh_m2_heating": 0.00251615, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 3.77382, + "mj_m2_cooling_dem": 308.809, + "mj_m2_heating_dem": 0.0220112 + }, + { + "area": 30.09, + "type": "Other local room heater - unfanned", + "fuel_type": "Oil", + "activities": [ + { + "id": 1077, + "area": 30.09 + } + ], + "heat_source": "Direct or storage electric heater", + "cooling_sseer": 0, + "heating_sseff": 0.819, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 35.9561, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 7.58617, + "mj_m2_cooling_dem": 78.2393, + "mj_m2_heating_dem": 106.013 + } + ], + "analysis_type": "NOTIONAL", + "area_exterior": 509.17, + "building_alpha": 12.5855, + "building_w_m2k": 0.2096, + "q50_infiltration": 3, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 1.45546, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 2.59272, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 14.2167, + "kwh_m2_heating": 1.13875, + "kwh_m2_lighting": 41.9026, + "kwh_m2_supplied": 59.7228, + "kwh_m2_auxiliary": 3.60214, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 19.5261, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 0, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 951.34, + "weather": "NEW", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + }, + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + }, + { + "id": 1077, + "area": 30.09 + } + ], + "building_w_k": 193.204, + "hvac_systems": [ + { + "area": 353.64, + "type": "No Heating or Cooling", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 0, + "heating_sseff": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 0, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 0, + "mj_m2_cooling_dem": 13.1255, + "mj_m2_heating_dem": 71.1616 + }, + { + "area": 567.61, + "type": "Split or multi-split system", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 2.25, + "heating_sseff": 0.73, + "kwh_m2_cooling": 49.5997, + "kwh_m2_heating": 6.49072, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 2.47934, + "mj_m2_cooling_dem": 401.756, + "mj_m2_heating_dem": 17.0576 + }, + { + "area": 30.09, + "type": "Other local room heater - unfanned", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1077, + "area": 30.09 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 2.25, + "heating_sseff": 0.73, + "kwh_m2_cooling": 25.4056, + "kwh_m2_heating": 84.553, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 12.1545, + "mj_m2_cooling_dem": 205.785, + "mj_m2_heating_dem": 222.205 + } + ], + "analysis_type": "REFERENCE", + "area_exterior": 509.17, + "building_alpha": 10, + "building_w_m2k": 0.379449, + "q50_infiltration": 10, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 2.7961, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 30.3968, + "kwh_m2_heating": 6.54699, + "kwh_m2_lighting": 78.7393, + "kwh_m2_supplied": 110.999, + "kwh_m2_auxiliary": 1.86372, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 19.5261, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 9.34308, + "kwh_m2_district_heating": 0 + } + } + ] + }, + "existing_stock_benchmark": 100, + "related_certificate_number": "0000-0000-0000-0000-0001", + "current_energy_efficiency_band": "D" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-8.0.0/cepc-rr.json b/backend/epc_api/json_samples/CEPC-8.0.0/cepc-rr.json new file mode 100644 index 00000000..065f54bb --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-8.0.0/cepc-rr.json @@ -0,0 +1,60 @@ +{ + "uprn": 12457, + "status": "cancelled", + "postcode": "SW1A 2AA", + "post_town": "Fulchester", + "issue_date": "2020-05-14", + "report_type": 4, + "schema_type": "CEPC-8.0.0", + "uprn_source": "Energy Assessor", + "valid_until": "2021-05-03", + "long_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Consider installing an air source heat pump.", + "recommendation_code": "EPC-R5" + } + ], + "language_code": 1, + "other_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Consider installing PV.", + "recommendation_code": "EPC-R4" + } + ], + "property_type": "B1 Offices and Workshop businesses", + "short_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Consider replacing T8 lamps with retrofit T5 conversion kit.", + "recommendation_code": "ECP-L5" + }, + { + "co2_impact": "LOW", + "recommendation": "Introduce HF (high frequency) ballasts for fluorescent tubes: Reduced number of fittings required.", + "recommendation_code": "EPC-L7" + } + ], + "address_line_1": "Some Unit", + "address_line_2": "2 Lonely Street", + "address_line_3": "Some Area", + "address_line_4": "Some County", + "medium_payback": [ + { + "co2_impact": "MEDIUM", + "recommendation": "Add optimum start/stop to the heating system.", + "recommendation_code": "EPC-H7" + } + ], + "assessment_type": "CEPC-RR", + "inspection_date": "2020-05-04", + "calculation_tool": "CEPC Compute v0.2", + "formatted_report": "ZGVmYXVsdA==", + "registration_date": "2020-05-05", + "technical_information": { + "floor_area": 10, + "building_environment": "Natural Ventilation Only" + }, + "related_certificate_number": "0000-0000-0000-0000-0001" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-8.0.0/cepc.json b/backend/epc_api/json_samples/CEPC-8.0.0/cepc.json new file mode 100644 index 00000000..ec747ee7 --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-8.0.0/cepc.json @@ -0,0 +1,334 @@ +{ + "ber": 76.29, + "ser": 45.61, + "ter": 31.05, + "tyr": 90.98, + "uprn": 12457, + "status": "entered", + "postcode": "NE0 0AA", + "post_town": "Big Rock", + "energy_use": { + "energy_consumption_current": 451.27 + }, + "issue_date": "2021-03-19", + "methodology": "SBEM", + "report_type": 3, + "schema_type": "CEPC-8.0.0", + "uprn_source": "Energy Assessor", + "valid_until": "2031-03-18", + "asset_rating": 84, + "language_code": 1, + "output_engine": "EPCgen, v5.6.b.0", + "property_type": "A1/A2 Retail and Financial/Professional services", + "address_line_1": "60 Maple Syrup Road", + "address_line_2": "Candy Mountain", + "assessment_type": "CEPC", + "inspection_date": "2021-03-19", + "inspection_type": "Physical", + "ac_questionnaire": { + "ac_present": "No", + "ac_rated_output": { + "ac_kw_rating": 100, + "ac_rating_unknown_flag": 0 + }, + "ac_estimated_output": 3, + "ac_inspection_commissioned": 4 + }, + "calculation_tool": "G-ISBEM Ltd, G-ISBEM, v24.0, SBEM, v5.6.b.0", + "is_heritage_site": "N", + "transaction_type": 1, + "registration_date": "2021-03-19", + "building_complexity": "Level 3", + "new_build_benchmark": 34, + "technical_information": { + "floor_area": 951, + "building_level": 3, + "main_heating_fuel": "Grid Supplied Electricity", + "renewable_sources": "Renewable sources test", + "special_energy_uses": "Test sp", + "building_environment": "Air Conditioning", + "other_fuel_description": "Other fuel test" + }, + "summary_of_performance": { + "building_data": [ + { + "area": 951.34, + "weather": "NEW", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + }, + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + }, + { + "id": 1077, + "area": 30.09 + } + ], + "building_w_k": 193.204, + "hvac_systems": [ + { + "area": 353.64, + "type": "No Heating or Cooling", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 0, + "heating_sseff": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 0, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 0, + "mj_m2_cooling_dem": 13.1255, + "mj_m2_heating_dem": 71.1616 + }, + { + "area": 567.61, + "type": "Split or multi-split system", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 2.25, + "heating_sseff": 0.73, + "kwh_m2_cooling": 49.5997, + "kwh_m2_heating": 6.49072, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 2.47934, + "mj_m2_cooling_dem": 401.756, + "mj_m2_heating_dem": 17.0576 + }, + { + "area": 30.09, + "type": "Other local room heater - unfanned", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1077, + "area": 30.09 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 2.25, + "heating_sseff": 0.73, + "kwh_m2_cooling": 25.4056, + "kwh_m2_heating": 84.553, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 12.1545, + "mj_m2_cooling_dem": 205.785, + "mj_m2_heating_dem": 222.205 + } + ], + "analysis_type": "REFERENCE", + "area_exterior": 509.17, + "building_alpha": 10, + "building_w_m2k": 0.379449, + "q50_infiltration": 10, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 2.7961, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 30.3968, + "kwh_m2_heating": 6.54699, + "kwh_m2_lighting": 78.7393, + "kwh_m2_supplied": 110.999, + "kwh_m2_auxiliary": 1.86372, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 19.5261, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 9.34308, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 951.34, + "weather": "NEW", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + }, + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + }, + { + "id": 1077, + "area": 30.09 + } + ], + "building_w_k": 193.204, + "hvac_systems": [ + { + "area": 353.64, + "type": "No Heating or Cooling", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1067, + "area": 81.32 + }, + { + "id": 1070, + "area": 13.9 + }, + { + "id": 1074, + "area": 258.42 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 0, + "heating_sseff": 0, + "kwh_m2_cooling": 0, + "kwh_m2_heating": 0, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 0, + "mj_m2_cooling_dem": 13.1255, + "mj_m2_heating_dem": 71.1616 + }, + { + "area": 567.61, + "type": "Split or multi-split system", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1078, + "area": 76.99 + }, + { + "id": 1071, + "area": 490.62 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 2.25, + "heating_sseff": 0.73, + "kwh_m2_cooling": 49.5997, + "kwh_m2_heating": 6.49072, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 2.47934, + "mj_m2_cooling_dem": 401.756, + "mj_m2_heating_dem": 17.0576 + }, + { + "area": 30.09, + "type": "Other local room heater - unfanned", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1077, + "area": 30.09 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 2.25, + "heating_sseff": 0.73, + "kwh_m2_cooling": 25.4056, + "kwh_m2_heating": 84.553, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 12.1545, + "mj_m2_cooling_dem": 205.785, + "mj_m2_heating_dem": 222.205 + } + ], + "analysis_type": "ACTUAL", + "area_exterior": 509.17, + "building_alpha": 10, + "building_w_m2k": 0.379449, + "q50_infiltration": 10, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 2.7961, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 30.3968, + "kwh_m2_heating": 6.54699, + "kwh_m2_lighting": 78.7393, + "kwh_m2_supplied": 110.999, + "kwh_m2_auxiliary": 1.86372, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 19.5261, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 9.34308, + "kwh_m2_district_heating": 0 + } + } + ] + }, + "existing_stock_benchmark": 100, + "current_energy_efficiency_band": "D" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-8.0.0/dec+rr.json b/backend/epc_api/json_samples/CEPC-8.0.0/dec+rr.json new file mode 100644 index 00000000..83cfac0c --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-8.0.0/dec+rr.json @@ -0,0 +1,131 @@ +{ + "uprn": 12457, + "status": "entered", + "postcode": "A00 0AA", + "post_town": "Floatering", + "dec_status": 0, + "issue_date": "2021-10-12", + "methodology": "ORCalc", + "reason_type": 1, + "report_type": 1, + "schema_type": "CEPC-8.0.0", + "uprn_source": "Energy Assessor", + "valid_until": "2022-01-31", + "language_code": 1, + "output_engine": "ORGen v4.0.4", + "property_type": "Fitness And Health Centre; Swimming Pool Centre", + "address_line_1": "Swim & Fitness Centre", + "address_line_2": "Swimming Lane", + "assessment_type": "DEC", + "inspection_date": "2021-09-02", + "this_assessment": { + "heating_co2": 156, + "energy_rating": 42, + "nominated_date": "2021-09-01", + "renewables_co2": 13, + "electricity_co2": 70 + }, + "ac_questionnaire": { + "ac_present": "Yes", + "ac_rated_output": { + "ac_kw_rating": 30 + }, + "ac_inspection_commissioned": 1 + }, + "calculation_tool": "CLG, ORCalc, v4.0.4", + "or_building_data": { + "hvac_system": "Radiators", + "internal_environment": "Heating and Mechanical Ventilation", + "assessment_period_alignment": "End Of Main Heating Fuel Period" + }, + "or_previous_data": { + "asset_rating": 45 + }, + "building_category": "H7; H6;", + "or_benchmark_data": { + "benchmarks": [ + { + "name": "Gymnasium", + "tufa": 110.382, + "benchmark": "Fitness And Health Centre", + "floor_area": 110.382, + "area_metric": "Gross floor area measured as RICS Gross Internal Area (GIA)", + "benchmark_id": 1, + "occupancy_level": "Standard Occupancy" + }, + { + "name": "Swimming pool", + "tufa": 1358.936, + "benchmark": "Swimming Pool Centre", + "floor_area": 1358.936, + "area_metric": "Gross floor area measured as RICS Gross Internal Area (GIA)", + "benchmark_id": 2, + "occupancy_level": "Standard Occupancy" + } + ], + "main_benchmark": "Swimming Pool Centre" + }, + "registration_date": "2021-10-12", + "location_description": "Swimming pool with gumnasium.", + "or_usable_floor_area": { + "ufa_1": { + "name": "Basement Plant", + "floor_area": 118.16 + }, + "ufa_2": { + "name": "Basement void around pool", + "floor_area": 179.673 + }, + "ufa_3": { + "name": "Ground Plant", + "floor_area": 146.223 + }, + "ufa_4": { + "name": "First Floor Plant", + "floor_area": 49.807 + }, + "total_ufa": 493.863 + }, + "or_energy_consumption": { + "gas": { + "end_date": "2021-08-31", + "estimate": 0, + "start_date": "2020-09-01", + "consumption": 805167 + }, + "electricity": { + "end_date": "2021-08-31", + "estimate": 0, + "start_date": "2020-09-01", + "consumption": 126161 + } + }, + "technical_information": { + "floor_area": 1469.318, + "main_heating_fuel": "Natural Gas", + "building_environment": "Heating and Mechanical Ventilation", + "separately_metered_electric_heating": 0 + }, + "or_assessment_end_date": "2021-08-31", + "renewable_energy_source": [ + { + "name": "CHP", + "end_date": "2021-08-31", + "generation": 24589, + "start_date": "2020-09-01", + "energy_type": 0 + } + ], + "or_assessment_start_date": "2020-08-31", + "dec_annual_energy_summary": { + "typical_thermal_use": 1196.24, + "renewables_electrical": 16.3, + "typical_electrical_use": 238.61, + "renewables_fuel_thermal": 0, + "annual_energy_use_electrical": 86.1, + "annual_energy_use_fuel_thermal": 548.82 + }, + "related_certificate_number": "0000-0000-0000-0000-0001", + "dec_related_party_disclosure": 1, + "current_energy_efficiency_band": "B" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-8.0.0/dec-rr.json b/backend/epc_api/json_samples/CEPC-8.0.0/dec-rr.json new file mode 100644 index 00000000..94d8b78a --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-8.0.0/dec-rr.json @@ -0,0 +1,76 @@ +{ + "uprn": 12457, + "status": "entered", + "postcode": "SW1A 2AA", + "post_town": "Fulchester", + "issue_date": "2020-05-04", + "report_type": 2, + "schema_type": "CEPC-8.0.0", + "uprn_source": "Energy Assessor", + "valid_until": "2028-05-03", + "long_payback": [ + { + "co2_impact": "LOW", + "recommendation": "Consider replacing or improving glazing", + "recommendation_code": "ECP-F4" + } + ], + "language_code": 1, + "other_payback": [ + { + "co2_impact": "HIGH", + "recommendation": "Add a big wind turbine", + "recommendation_code": "ECP-H2" + } + ], + "property_type": "University campus", + "short_payback": [ + { + "co2_impact": "MEDIUM", + "recommendation": "Consider thinking about maybe possibly getting a solar panel but only one.", + "recommendation_code": "ECP-L5" + }, + { + "co2_impact": "LOW", + "recommendation": "Consider introducing variable speed drives (VSD) for fans, pumps and compressors.", + "recommendation_code": "EPC-L7" + } + ], + "site_services": { + "service_1": { + "quantity": 751445, + "description": "Electricity" + }, + "service_2": { + "quantity": 72956, + "description": "Gas" + }, + "service_3": { + "quantity": 0, + "description": "Not used" + } + }, + "address_line_1": "Some Unit", + "address_line_2": "2 Lonely Street", + "address_line_3": "Some Area", + "address_line_4": "Some County", + "medium_payback": [ + { + "co2_impact": "LOW", + "recommendation": "Engage experts to propose specific measures to reduce hot waterwastage and plan to carry this out.", + "recommendation_code": "ECP-C1" + } + ], + "assessment_type": "DEC-RR", + "inspection_date": "2020-05-04", + "inspection_type": "Physical", + "calculation_tool": "DCLG, ORCalc, v3.6.2", + "formatted_report": "ZGVmYXVsdA==", + "registration_date": "2020-05-04", + "technical_information": { + "floor_area": 10, + "renewable_sources": "Renewable source", + "special_energy_uses": "Special discount", + "building_environment": "Air Conditioning" + } +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/CEPC-8.0.0/dec.json b/backend/epc_api/json_samples/CEPC-8.0.0/dec.json new file mode 100644 index 00000000..898e34cb --- /dev/null +++ b/backend/epc_api/json_samples/CEPC-8.0.0/dec.json @@ -0,0 +1,299 @@ +{ + "uprn": 12457, + "status": "entered", + "postcode": "SW1A 2AA", + "post_town": "Whitbury", + "dec_status": 1, + "issue_date": "2020-05-14", + "reason_type": 6, + "report_type": 1, + "schema_type": "CEPC-8.0.0", + "uprn_source": "Energy Assessor", + "valid_until": "2026-05-04", + "language_code": 1, + "output_engine": "MWW-91.1.1", + "property_type": "B1 Offices and Workshop businesses", + "address_line_1": "Some Unit", + "address_line_2": "2 Lonely Street", + "address_line_3": "Some Area", + "address_line_4": "Some County", + "assessment_type": "DEC", + "inspection_date": "2020-05-04", + "this_assessment": { + "heating_co2": 3, + "energy_rating": 1, + "nominated_date": "2020-01-01", + "renewables_co2": 0, + "electricity_co2": 7 + }, + "ac_questionnaire": { + "ac_present": "Yes", + "ac_rated_output": { + "ac_kw_rating": 1 + }, + "ac_estimated_output": 1, + "ac_inspection_commissioned": 1 + }, + "calculation_tool": "DCLG, ORCalc, v3.6.3", + "is_heritage_site": "N", + "or_previous_data": { + "asset_rating": 100 + }, + "year1_assessment": { + "heating_co2": 5, + "energy_rating": 24, + "nominated_date": "2019-01-01", + "renewables_co2": 1, + "electricity_co2": 10 + }, + "year2_assessment": { + "heating_co2": 10, + "energy_rating": 40, + "nominated_date": "2018-01-01", + "renewables_co2": 2, + "electricity_co2": 15 + }, + "building_category": "C1", + "or_benchmark_data": { + "benchmarks": [ + { + "name": "Library", + "tufa": 1840, + "floor_area": 15, + "benchmark_id": 1, + "occupancy_level": "level" + } + ] + }, + "registration_date": "2020-05-04", + "building_complexity": "Level 3", + "or_energy_consumption": { + "gas": { + "end_date": "2007-12-18", + "estimate": 0, + "start_date": "2007-01-18", + "consumption": 310400 + }, + "electricity": { + "end_date": "2008-01-31", + "estimate": 1, + "start_date": "2007-01-31", + "consumption": 422480 + } + }, + "technical_information": { + "floor_area": 99, + "main_heating_fuel": "Natural Gas", + "special_energy_uses": "special", + "building_environment": "Heating and Natural Ventilation", + "other_fuel_description": "other" + }, + "or_assessment_end_date": "2020-05-01", + "summary_of_performance": { + "building_data": [ + { + "area": 402.6, + "weather": "LON", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "building_w_k": 411.86, + "hvac_systems": [ + { + "area": 402.6, + "type": "Fan coil systems", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 1.963, + "heating_sseff": 0.827, + "kwh_m2_cooling": 25.3865, + "kwh_m2_heating": 41.0355, + "cooling_gen_seer": 2.5, + "heating_gen_seff": 0.89, + "kwh_m2_auxiliary": 39.0832, + "mj_m2_cooling_dem": 179.401, + "mj_m2_heating_dem": 122.171 + } + ], + "analysis_type": "ACTUAL", + "area_exterior": 1058.32, + "building_alpha": 18.3412, + "building_w_m2k": 0.389164, + "q50_infiltration": 10, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 2.77834, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 3.07665, + "kwh_m2_ses": 0.801605, + "kwh_m2_coal": 0, + "kwh_m2_wind": 3.02777, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 25.3865, + "kwh_m2_heating": 41.0355, + "kwh_m2_lighting": 54.0787, + "kwh_m2_supplied": 121.327, + "kwh_m2_auxiliary": 39.0832, + "kwh_m2_displaced": 6.10442, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 42.185, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 41.0355, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 402.6, + "weather": "LON", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "building_w_k": 362.524, + "hvac_systems": [ + { + "area": 402.6, + "type": "Fan coil systems", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 3.6, + "heating_sseff": 0.819, + "kwh_m2_cooling": 7.46769, + "kwh_m2_heating": 18.1581, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 14.0716, + "mj_m2_cooling_dem": 96.7814, + "mj_m2_heating_dem": 53.5375 + } + ], + "analysis_type": "NOTIONAL", + "area_exterior": 1058.32, + "building_alpha": 11.2489, + "building_w_m2k": 0.342547, + "q50_infiltration": 3, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 3.33761, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 3.33761, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 7.46769, + "kwh_m2_heating": 18.1582, + "kwh_m2_lighting": 14.4489, + "kwh_m2_supplied": 35.9883, + "kwh_m2_auxiliary": 14.0716, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 42.185, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 18.1582, + "kwh_m2_district_heating": 0 + } + }, + { + "area": 402.6, + "weather": "LON", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "building_w_k": 718.761, + "hvac_systems": [ + { + "area": 402.6, + "type": "Fan coil systems", + "fuel_type": "Natural Gas", + "activities": [ + { + "id": 1005, + "area": 402.6 + } + ], + "heat_source": "LTHW boiler", + "cooling_sseer": 2.25, + "heating_sseff": 0.73, + "kwh_m2_cooling": 25.6538, + "kwh_m2_heating": 71.9516, + "cooling_gen_seer": 0, + "heating_gen_seff": 0, + "kwh_m2_auxiliary": 2.16062, + "mj_m2_cooling_dem": 207.795, + "mj_m2_heating_dem": 189.088 + } + ], + "analysis_type": "REFERENCE", + "area_exterior": 1058.32, + "building_alpha": 10, + "building_w_m2k": 0.679153, + "q50_infiltration": 10, + "global_performance": { + "kwh_m2_chp": 0, + "kwh_m2_dhw": 6.41192, + "kwh_m2_lpg": 0, + "kwh_m2_oil": 0, + "kwh_m2_pvs": 0, + "kwh_m2_ses": 0, + "kwh_m2_coal": 0, + "kwh_m2_wind": 0, + "kwh_m2_biogas": 0, + "kwh_m2_biomass": 0, + "kwh_m2_cooling": 25.6538, + "kwh_m2_heating": 71.9516, + "kwh_m2_lighting": 45.54, + "kwh_m2_supplied": 73.3544, + "kwh_m2_auxiliary": 2.16062, + "kwh_m2_displaced": 0, + "kwh_m2_dual_fuel": 0, + "kwh_m2_equipment": 42.185, + "kwh_m2_smokeless": 0, + "kwh_m2_anthracite": 0, + "kwh_m2_waste_heat": 0, + "kwh_m2_natural_gas": 78.3634, + "kwh_m2_district_heating": 0 + } + } + ] + }, + "or_assessment_start_date": "2020-05-01", + "dec_annual_energy_summary": { + "typical_thermal_use": 1, + "renewables_electrical": 1, + "typical_electrical_use": 1, + "renewables_fuel_thermal": 1, + "annual_energy_use_electrical": 1, + "annual_energy_use_fuel_thermal": 1 + }, + "dec_related_party_disclosure": 4, + "current_energy_efficiency_band": "A" +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/RdSAP-Schema-17.0/epc.json b/backend/epc_api/json_samples/RdSAP-Schema-17.0/epc.json new file mode 100644 index 00000000..e1d48ffc --- /dev/null +++ b/backend/epc_api/json_samples/RdSAP-Schema-17.0/epc.json @@ -0,0 +1,352 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": { + "value": "(another dwelling above)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "walls": [ + { + "description": { + "value": "System built, with internal insulation", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": { + "value": "(another dwelling below)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 2, + "window": { + "description": { + "value": "Fully double glazed", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "lighting": { + "description": { + "value": "Low energy lighting in 57% of fixed outlets", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "postcode": "PT5 4RZ", + "hot_water": { + "description": { + "value": "Electric immersion, off-peak", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 2 + }, + "post_town": "POSTTOWN", + "built_form": 2, + "door_count": 2, + "glazed_area": 1, + "glazing_gap": "16+", + "region_code": 3, + "report_type": 2, + "sap_heating": { + "cylinder_size": 2, + "water_heating_code": 903, + "water_heating_fuel": 29, + "instantaneous_wwhrs": { + "rooms_with_bath_and_or_shower": 1, + "rooms_with_mixer_shower_no_bath": 0, + "rooms_with_bath_and_mixer_shower": 0 + }, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 29, + "heat_emitter_type": 0, + "emitter_temperature": "NA", + "main_heating_number": 1, + "main_heating_control": 2401, + "main_heating_category": 7, + "main_heating_fraction": 1, + "sap_main_heating_code": 402, + "main_heating_data_source": 2 + } + ], + "immersion_heating_type": 1, + "cylinder_insulation_type": 0, + "has_fixed_air_conditioning": "false" + }, + "sap_version": 9.92, + "schema_type": "RdSAP-Schema-17.0", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": { + "value": "Electric storage heaters", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1 + } + ], + "dwelling_type": { + "value": "Mid-floor flat", + "language": "1" + }, + "language_code": 1, + "property_type": 2, + "address_line_1": "42, Moria Mines Lane", + "assessment_type": "RdSAP", + "completion_date": "2016-01-12", + "inspection_date": "2016-01-12", + "extensions_count": 0, + "measurement_type": 1, + "sap_flat_details": { + "level": 2, + "top_storey": "N", + "flat_location": 1, + "heat_loss_corridor": 0 + }, + "total_floor_area": 55, + "transaction_type": 8, + "conservatory_type": 1, + "heated_room_count": 1, + "pvc_window_frames": "true", + "registration_date": "2016-01-12", + "sap_energy_source": { + "mains_gas": "N", + "meter_type": 1, + "photovoltaic_supply": { + "none_or_no_details": { + "pv_connection": 0, + "percent_roof_area": 0 + } + }, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 2 + }, + "secondary_heating": { + "description": { + "value": "Portable electric heaters (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 11 + ], + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "wall_thickness": 240, + "floor_heat_loss": 6, + "roof_construction": 3, + "wall_construction": 8, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.4, + "quantity": "metres" + }, + "total_floor_area": { + "value": 54.6, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 7.3, + "quantity": "metres" + }, + "heat_loss_perimeter": { + "value": 23.3, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 3, + "construction_age_band": "D", + "party_wall_construction": 0, + "wall_thickness_measured": "Y", + "roof_insulation_location": "ND", + "roof_insulation_thickness": "ND", + "wall_insulation_thickness": "50mm" + } + ], + "low_energy_lighting": 57, + "solar_water_heating": "N", + "habitable_room_count": 3, + "heating_cost_current": { + "value": 214, + "currency": "GBP" + }, + "insulated_door_count": 0, + "co2_emissions_current": 3.9, + "energy_rating_average": 60, + "energy_rating_current": 66, + "lighting_cost_current": { + "value": 61, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": { + "value": "Manual charge control", + "language": "1" + }, + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + } + ], + "multiple_glazing_type": 3, + "open_fireplaces_count": 0, + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 216, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 396, + "currency": "GBP" + }, + "mechanical_ventilation": 0, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 158, + "currency": "GBP" + }, + "indicative_cost": "£15 - £30", + "improvement_type": "C", + "improvement_details": { + "improvement_number": 1 + }, + "improvement_category": 5, + "energy_performance_rating": 74, + "environmental_impact_rating": 60 + }, + { + "sequence": 2, + "typical_saving": { + "value": 14, + "currency": "GBP" + }, + "indicative_cost": "£15", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 5, + "energy_performance_rating": 74, + "environmental_impact_rating": 60 + }, + { + "sequence": 3, + "typical_saving": { + "value": 64, + "currency": "GBP" + }, + "indicative_cost": "£1,200 - £1,800", + "improvement_type": "L2", + "improvement_details": { + "improvement_number": 60 + }, + "improvement_category": 5, + "energy_performance_rating": 78, + "environmental_impact_rating": 64 + }, + { + "sequence": 4, + "typical_saving": { + "value": 22, + "currency": "GBP" + }, + "indicative_cost": "£1,000", + "improvement_type": "X", + "improvement_details": { + "improvement_number": 48 + }, + "improvement_category": 5, + "energy_performance_rating": 79, + "environmental_impact_rating": 66 + } + ], + "co2_emissions_potential": 2.5, + "energy_rating_potential": 79, + "lighting_cost_potential": { + "value": 42, + "currency": "GBP" + }, + "schema_version_original": "LIG-17.0", + "alternative_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 141, + "currency": "GBP" + }, + "improvement_type": "J2", + "improvement_details": { + "improvement_number": 54 + }, + "improvement_category": 6, + "energy_performance_rating": 81, + "environmental_impact_rating": 96 + }, + { + "sequence": 2, + "typical_saving": { + "value": 118, + "currency": "GBP" + }, + "improvement_type": "Z1", + "improvement_details": { + "improvement_number": 51 + }, + "improvement_category": 6, + "energy_performance_rating": 80, + "environmental_impact_rating": 83 + } + ], + "hot_water_cost_potential": { + "value": 154, + "currency": "GBP" + }, + "renewable_heat_incentive": { + "water_heating": 4818, + "space_heating_existing_dwelling": 2415 + }, + "energy_consumption_current": 427, + "has_fixed_air_conditioning": "false", + "multiple_glazed_proportion": 100, + "calculation_software_version": "9.0.0", + "energy_consumption_potential": 267, + "environmental_impact_current": 48, + "fixed_lighting_outlets_count": 7, + "current_energy_efficiency_band": "D", + "environmental_impact_potential": 66, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 72, + "low_energy_fixed_lighting_outlets_count": 4 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/RdSAP-Schema-17.1/epc.json b/backend/epc_api/json_samples/RdSAP-Schema-17.1/epc.json new file mode 100644 index 00000000..35db05fd --- /dev/null +++ b/backend/epc_api/json_samples/RdSAP-Schema-17.1/epc.json @@ -0,0 +1,472 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": { + "value": "Pitched, 100 mm loft insulation", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + { + "description": { + "value": "Pitched, insulated (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "walls": [ + { + "description": { + "value": "Cavity wall, filled cavity", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + { + "description": { + "value": "Cavity wall, as built, insulated (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": { + "value": "Solid, no insulation (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 1, + "window": { + "description": { + "value": "Fully double glazed", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "lighting": { + "description": { + "value": "Low energy lighting in 23% of fixed outlets", + "language": "1" + }, + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + }, + "postcode": "PT42 5HL", + "hot_water": { + "description": { + "value": "From main system", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "post_town": "POSTTOWN", + "built_form": 1, + "door_count": 4, + "glazed_area": 1, + "glazing_gap": "16+", + "region_code": 17, + "report_type": 2, + "sap_heating": { + "cylinder_size": 2, + "water_heating_code": 901, + "water_heating_fuel": 28, + "cylinder_thermostat": "Y", + "instantaneous_wwhrs": { + "rooms_with_bath_and_or_shower": 1, + "rooms_with_mixer_shower_no_bath": 0, + "rooms_with_bath_and_mixer_shower": 1 + }, + "secondary_fuel_type": 29, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 28, + "boiler_flue_type": 1, + "fan_flue_present": "N", + "heat_emitter_type": 1, + "emitter_temperature": "NA", + "main_heating_number": 1, + "main_heating_control": 2104, + "main_heating_category": 2, + "main_heating_fraction": 1, + "mcs_installed_heat_pump": "false", + "main_heating_data_source": 1, + "main_heating_index_number": 9049 + } + ], + "immersion_heating_type": "NA", + "secondary_heating_type": 691, + "cylinder_insulation_type": 1, + "has_fixed_air_conditioning": "false", + "cylinder_insulation_thickness": 12 + }, + "sap_version": 9.92, + "schema_type": "RdSAP-Schema-17.1", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": { + "value": "Boiler and radiators, oil", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + } + ], + "dwelling_type": { + "value": "Detached house", + "language": "1" + }, + "language_code": 1, + "property_type": 0, + "address_line_1": "15, Hedge Lane", + "address_line_2": "Lower Moria", + "assessment_type": "RdSAP", + "completion_date": "2018-05-29", + "inspection_date": "2018-05-29", + "extensions_count": 1, + "measurement_type": 2, + "total_floor_area": 101, + "transaction_type": 1, + "conservatory_type": 1, + "heated_room_count": 7, + "pvc_window_frames": "true", + "registration_date": "2018-05-27", + "sap_energy_source": { + "mains_gas": "N", + "meter_type": 2, + "photovoltaic_supply": { + "none_or_no_details": { + "pv_connection": 0, + "percent_roof_area": 0 + } + }, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 2 + }, + "secondary_heating": { + "description": { + "value": "Room heaters, electric", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 11 + ], + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "wall_thickness": 270, + "floor_heat_loss": 7, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.4, + "quantity": "metres" + }, + "floor_insulation": 1, + "total_floor_area": { + "value": 48.45, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 0, + "quantity": "metres" + }, + "floor_construction": 1, + "heat_loss_perimeter": { + "value": 22.3, + "quantity": "metres" + } + }, + { + "floor": 1, + "room_height": { + "value": 2.4, + "quantity": "metres" + }, + "total_floor_area": { + "value": 48.45, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 0, + "quantity": "metres" + }, + "heat_loss_perimeter": { + "value": 28.4, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 2, + "construction_age_band": "G", + "party_wall_construction": "NA", + "wall_thickness_measured": "Y", + "roof_insulation_location": 2, + "roof_insulation_thickness": "100mm" + }, + { + "identifier": "Extension 1", + "wall_dry_lined": "N", + "wall_thickness": 260, + "floor_heat_loss": 7, + "roof_construction": 5, + "wall_construction": 4, + "building_part_number": 2, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.4, + "quantity": "metres" + }, + "floor_insulation": 1, + "total_floor_area": { + "value": 21.84, + "quantity": "square metres" + }, + "party_wall_length": 0, + "floor_construction": 1, + "heat_loss_perimeter": { + "value": 16.6, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 4, + "construction_age_band": "H", + "party_wall_construction": "NA", + "wall_thickness_measured": "Y", + "roof_insulation_location": 4, + "roof_insulation_thickness": 0, + "wall_insulation_thickness": "NI" + } + ], + "low_energy_lighting": 23, + "solar_water_heating": "N", + "habitable_room_count": 7, + "heating_cost_current": { + "value": 659, + "currency": "GBP" + }, + "insulated_door_count": 0, + "co2_emissions_current": 5.8, + "energy_rating_average": 60, + "energy_rating_current": 53, + "lighting_cost_current": { + "value": 115, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": { + "value": "Programmer and room thermostat", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + } + ], + "multiple_glazing_type": 3, + "open_fireplaces_count": 0, + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 470, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 161, + "currency": "GBP" + }, + "mechanical_ventilation": 0, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 25, + "currency": "GBP" + }, + "indicative_cost": "£100 - £350", + "improvement_type": "A", + "improvement_details": { + "improvement_number": 5 + }, + "improvement_category": 5, + "energy_performance_rating": 54, + "environmental_impact_rating": 47 + }, + { + "sequence": 2, + "typical_saving": { + "value": 87, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "W2", + "improvement_details": { + "improvement_number": 58 + }, + "improvement_category": 5, + "energy_performance_rating": 58, + "environmental_impact_rating": 52 + }, + { + "sequence": 3, + "typical_saving": { + "value": 16, + "currency": "GBP" + }, + "indicative_cost": "£15 - £30", + "improvement_type": "C", + "improvement_details": { + "improvement_number": 3 + }, + "improvement_category": 5, + "energy_performance_rating": 59, + "environmental_impact_rating": 53 + }, + { + "sequence": 4, + "typical_saving": { + "value": 42, + "currency": "GBP" + }, + "indicative_cost": "£50", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 5, + "energy_performance_rating": 61, + "environmental_impact_rating": 54 + }, + { + "sequence": 5, + "typical_saving": { + "value": 38, + "currency": "GBP" + }, + "indicative_cost": "£350 - £450", + "improvement_type": "G", + "improvement_details": { + "improvement_number": 13 + }, + "improvement_category": 5, + "energy_performance_rating": 62, + "environmental_impact_rating": 56 + }, + { + "sequence": 6, + "typical_saving": { + "value": 48, + "currency": "GBP" + }, + "indicative_cost": "£2,200 - £3,000", + "improvement_type": "I", + "improvement_details": { + "improvement_number": 20 + }, + "improvement_category": 5, + "energy_performance_rating": 65, + "environmental_impact_rating": 59 + }, + { + "sequence": 7, + "typical_saving": { + "value": 41, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 68, + "environmental_impact_rating": 62 + }, + { + "sequence": 8, + "typical_saving": { + "value": 27, + "currency": "GBP" + }, + "indicative_cost": "£2,000", + "improvement_type": "X", + "improvement_details": { + "improvement_number": 48 + }, + "improvement_category": 5, + "energy_performance_rating": 69, + "environmental_impact_rating": 64 + }, + { + "sequence": 9, + "typical_saving": { + "value": 297, + "currency": "GBP" + }, + "indicative_cost": "£5,000 - £8,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 78, + "environmental_impact_rating": 72 + } + ], + "co2_emissions_potential": 2.7, + "energy_rating_potential": 78, + "lighting_cost_potential": { + "value": 65, + "currency": "GBP" + }, + "schema_version_original": "LIG-17.1", + "hot_water_cost_potential": { + "value": 77, + "currency": "GBP" + }, + "renewable_heat_incentive": { + "water_heating": 3301, + "impact_of_loft_insulation": -565, + "space_heating_existing_dwelling": 11351 + }, + "energy_consumption_current": 234, + "has_fixed_air_conditioning": "false", + "multiple_glazed_proportion": 100, + "calculation_software_version": "v92.0.1.1", + "energy_consumption_potential": 95, + "environmental_impact_current": 46, + "fixed_lighting_outlets_count": 13, + "current_energy_efficiency_band": "E", + "environmental_impact_potential": 72, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 57, + "low_energy_fixed_lighting_outlets_count": 3 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/RdSAP-Schema-18.0/epc.json b/backend/epc_api/json_samples/RdSAP-Schema-18.0/epc.json new file mode 100644 index 00000000..44761b86 --- /dev/null +++ b/backend/epc_api/json_samples/RdSAP-Schema-18.0/epc.json @@ -0,0 +1,413 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": { + "value": "Pitched, 100 mm loft insulation", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + { + "description": { + "value": "Flat, insulated", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + { + "description": { + "value": "Roof room(s), insulated (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "walls": [ + { + "description": { + "value": "Solid brick, as built, no insulation (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1 + }, + { + "description": { + "value": "Cavity wall, as built, insulated (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": { + "value": "Solid, no insulation (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 1, + "window": { + "description": { + "value": "Fully double glazed", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "lighting": { + "description": { + "value": "Low energy lighting in 67% of fixed outlets", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "postcode": "PT11 4RF", + "hot_water": { + "description": { + "value": "From main system", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "POSTTOWN", + "built_form": 4, + "door_count": 2, + "glazed_area": 1, + "glazing_gap": 12, + "region_code": 1, + "report_type": 2, + "sap_heating": { + "cylinder_size": 1, + "water_heating_code": 901, + "water_heating_fuel": 26, + "instantaneous_wwhrs": { + "rooms_with_bath_and_or_shower": 1, + "rooms_with_mixer_shower_no_bath": 0, + "rooms_with_bath_and_mixer_shower": 0 + }, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 26, + "boiler_flue_type": 2, + "heat_emitter_type": 1, + "emitter_temperature": 0, + "main_heating_number": 1, + "main_heating_control": 2106, + "main_heating_category": 2, + "main_heating_fraction": 1, + "central_heating_pump_age": 0, + "main_heating_data_source": 1, + "main_heating_index_number": 16137 + } + ], + "immersion_heating_type": "NA", + "has_fixed_air_conditioning": "false" + }, + "sap_version": 9.92, + "schema_type": "RdSAP-Schema-18.0", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": { + "value": "Boiler and radiators, mains gas", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "dwelling_type": { + "value": "Mid-terrace house", + "language": "1" + }, + "language_code": 1, + "property_type": 0, + "address_line_1": "1, Bagshot Lane", + "address_line_2": "Village", + "assessment_type": "RdSAP", + "completion_date": "2017-03-19", + "inspection_date": "2017-03-19", + "extensions_count": 1, + "measurement_type": 1, + "total_floor_area": 93, + "transaction_type": 5, + "conservatory_type": 1, + "heated_room_count": 5, + "pvc_window_frames": "true", + "registration_date": "2017-03-19", + "sap_energy_source": { + "mains_gas": "Y", + "meter_type": 1, + "photovoltaic_supply": { + "none_or_no_details": { + "pv_connection": 0, + "percent_roof_area": 0 + } + }, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 2 + }, + "secondary_heating": { + "description": { + "value": "None", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 11 + ], + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "wall_thickness": 330, + "floor_heat_loss": 7, + "sap_room_in_roof": { + "floor_area": { + "value": 9, + "quantity": "square metres" + }, + "insulation": "AB", + "roof_room_connected": "N", + "construction_age_band": "G" + }, + "roof_construction": 4, + "wall_construction": 3, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.4, + "quantity": "metres" + }, + "floor_insulation": 1, + "total_floor_area": { + "value": 29.12, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 11.2, + "quantity": "metres" + }, + "floor_construction": 1, + "heat_loss_perimeter": { + "value": 5.2, + "quantity": "metres" + } + }, + { + "floor": 1, + "room_height": { + "value": 2.4, + "quantity": "metres" + }, + "total_floor_area": { + "value": 29.12, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 11.2, + "quantity": "metres" + }, + "heat_loss_perimeter": { + "value": 10.4, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 4, + "construction_age_band": "C", + "party_wall_construction": 0, + "wall_thickness_measured": "Y", + "roof_insulation_location": 2, + "roof_insulation_thickness": "100mm", + "wall_insulation_thickness": "NI" + }, + { + "identifier": "Extension", + "wall_dry_lined": "N", + "wall_thickness": 290, + "floor_heat_loss": 7, + "roof_construction": 1, + "wall_construction": 4, + "building_part_number": 2, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.4, + "quantity": "metres" + }, + "floor_insulation": 1, + "total_floor_area": { + "value": 15.6, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 6, + "quantity": "metres" + }, + "floor_construction": 1, + "heat_loss_perimeter": { + "value": 5.2, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 4, + "construction_age_band": "G", + "party_wall_construction": 0, + "wall_thickness_measured": "Y", + "roof_insulation_location": 6, + "wall_insulation_thickness": "NI", + "flat_roof_insulation_thickness": "NI" + } + ], + "low_energy_lighting": 67, + "solar_water_heating": "N", + "habitable_room_count": 5, + "heating_cost_current": { + "value": 619, + "currency": "GBP" + }, + "insulated_door_count": 0, + "co2_emissions_current": 3.4, + "energy_rating_average": 60, + "energy_rating_current": 69, + "lighting_cost_current": { + "value": 81, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": { + "value": "Programmer, room thermostat and TRVs", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "multiple_glazing_type": 3, + "open_fireplaces_count": 0, + "has_hot_water_cylinder": "false", + "heating_cost_potential": { + "value": 534, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 100, + "currency": "GBP" + }, + "mechanical_ventilation": 0, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 88, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £14,000", + "improvement_type": "Q", + "improvement_details": { + "improvement_number": 7 + }, + "improvement_category": 5, + "energy_performance_rating": 72, + "environmental_impact_rating": 71 + }, + { + "sequence": 2, + "typical_saving": { + "value": 18, + "currency": "GBP" + }, + "indicative_cost": "£15", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 5, + "energy_performance_rating": 73, + "environmental_impact_rating": 71 + }, + { + "sequence": 3, + "typical_saving": { + "value": 33, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 74, + "environmental_impact_rating": 73 + }, + { + "sequence": 4, + "typical_saving": { + "value": 302, + "currency": "GBP" + }, + "indicative_cost": "£5,000 - £8,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 85, + "environmental_impact_rating": 83 + } + ], + "co2_emissions_potential": 1.7, + "energy_rating_potential": 85, + "lighting_cost_potential": { + "value": 61, + "currency": "GBP" + }, + "schema_version_original": "LIG-17.0", + "hot_water_cost_potential": { + "value": 68, + "currency": "GBP" + }, + "renewable_heat_incentive": { + "water_heating": 2087, + "impact_of_loft_insulation": -214, + "impact_of_solid_wall_insulation": -1864, + "space_heating_existing_dwelling": 10483 + }, + "energy_consumption_current": 230, + "has_fixed_air_conditioning": "false", + "multiple_glazed_proportion": 100, + "calculation_software_version": "2.0.0.0", + "energy_consumption_potential": 115, + "environmental_impact_current": 66, + "fixed_lighting_outlets_count": 9, + "current_energy_efficiency_band": "C", + "environmental_impact_potential": 83, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "B", + "co2_emissions_current_per_floor_area": 41, + "low_energy_fixed_lighting_outlets_count": 6 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/RdSAP-Schema-19.0/epc.json b/backend/epc_api/json_samples/RdSAP-Schema-19.0/epc.json new file mode 100644 index 00000000..ce4e44b4 --- /dev/null +++ b/backend/epc_api/json_samples/RdSAP-Schema-19.0/epc.json @@ -0,0 +1,386 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": { + "value": "Pitched, 150 mm loft insulation", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + { + "description": { + "value": "Pitched, insulated (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + } + ], + "walls": [ + { + "description": { + "value": "Cavity wall, filled cavity", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + { + "description": { + "value": "Cavity wall, as built, insulated (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": { + "value": "Solid, no insulation (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 3, + "window": { + "description": { + "value": "Fully double glazed", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "lighting": { + "description": { + "value": "Low energy lighting in 87% of fixed outlets", + "language": "1" + }, + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "postcode": "A1 1AA", + "hot_water": { + "description": { + "value": "From main system", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Town", + "built_form": 2, + "door_count": 1, + "glazed_area": 1, + "region_code": 19, + "report_type": 2, + "sap_heating": { + "cylinder_size": 1, + "water_heating_code": 901, + "water_heating_fuel": 26, + "instantaneous_wwhrs": { + "rooms_with_bath_and_or_shower": 1, + "rooms_with_mixer_shower_no_bath": 0, + "rooms_with_bath_and_mixer_shower": 0 + }, + "secondary_fuel_type": 9, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 26, + "boiler_flue_type": 2, + "heat_emitter_type": 1, + "emitter_temperature": 0, + "main_heating_number": 1, + "main_heating_control": 2106, + "main_heating_category": 2, + "main_heating_fraction": 1, + "central_heating_pump_age": 0, + "main_heating_data_source": 1, + "main_heating_index_number": 15274 + } + ], + "immersion_heating_type": "NA", + "secondary_heating_type": 631, + "has_fixed_air_conditioning": "false" + }, + "sap_version": 9.94, + "schema_type": "RdSAP-Schema-19.0", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": { + "value": "Boiler and radiators, mains gas", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "dwelling_type": { + "value": "Semi-detached house", + "language": "1" + }, + "language_code": 1, + "property_type": 0, + "address_line_1": "15, Address Lane", + "address_line_2": "New Town", + "assessment_type": "RdSAP", + "completion_date": "2020-06-04", + "inspection_date": "2020-06-03", + "extensions_count": 1, + "measurement_type": 1, + "total_floor_area": 94, + "transaction_type": 8, + "conservatory_type": 2, + "heated_room_count": 5, + "pvc_window_frames": "false", + "registration_date": "2020-06-04", + "sap_energy_source": { + "mains_gas": "Y", + "meter_type": 3, + "photovoltaic_supply": { + "none_or_no_details": { + "pv_connection": 0, + "percent_roof_area": 0 + } + }, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 2 + }, + "secondary_heating": { + "description": { + "value": "Room heaters, dual fuel (mineral and wood)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 11, + 9 + ], + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "wall_thickness": 300, + "floor_heat_loss": 7, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.47, + "quantity": "metres" + }, + "floor_insulation": 1, + "total_floor_area": { + "value": 39.91, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 8.81, + "quantity": "metres" + }, + "floor_construction": 1, + "heat_loss_perimeter": { + "value": 13.65, + "quantity": "metres" + } + }, + { + "floor": 1, + "room_height": { + "value": 2.36, + "quantity": "metres" + }, + "total_floor_area": { + "value": 39.91, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 8.81, + "quantity": "metres" + }, + "heat_loss_perimeter": { + "value": 17.87, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 2, + "construction_age_band": "D", + "party_wall_construction": 1, + "wall_thickness_measured": "Y", + "roof_insulation_location": 2, + "roof_insulation_thickness": "150mm", + "wall_insulation_thickness": "NI", + "floor_insulation_thickness": "NI" + }, + { + "identifier": "Extension", + "wall_dry_lined": "N", + "wall_thickness": 300, + "floor_heat_loss": 7, + "roof_construction": 5, + "wall_construction": 4, + "building_part_number": 2, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.34, + "quantity": "metres" + }, + "floor_insulation": 1, + "total_floor_area": { + "value": 13.88, + "quantity": "square metres" + }, + "party_wall_length": 0, + "floor_construction": 1, + "heat_loss_perimeter": { + "value": 10.8, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 4, + "construction_age_band": "G", + "party_wall_construction": "NA", + "wall_thickness_measured": "Y", + "roof_insulation_location": 4, + "roof_insulation_thickness": "ND", + "wall_insulation_thickness": "NI", + "floor_insulation_thickness": "NI" + } + ], + "low_energy_lighting": 87, + "solar_water_heating": "N", + "habitable_room_count": 5, + "heating_cost_current": { + "value": 666, + "currency": "GBP" + }, + "insulated_door_count": 0, + "co2_emissions_current": 3.8, + "energy_rating_average": 60, + "energy_rating_current": 66, + "lighting_cost_current": { + "value": 81, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": { + "value": "Programmer, room thermostat and TRVs", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "multiple_glazing_type": 3, + "open_fireplaces_count": 0, + "has_hot_water_cylinder": "false", + "heating_cost_potential": { + "value": 615, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 107, + "currency": "GBP" + }, + "mechanical_ventilation": 0, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 51, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "W2", + "improvement_details": { + "improvement_number": 58 + }, + "improvement_category": 5, + "energy_performance_rating": 68, + "environmental_impact_rating": 65 + }, + { + "sequence": 2, + "typical_saving": { + "value": 33, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 70, + "environmental_impact_rating": 67 + }, + { + "sequence": 3, + "typical_saving": { + "value": 316, + "currency": "GBP" + }, + "indicative_cost": "£3,500 - £5,500", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 79, + "environmental_impact_rating": 75 + } + ], + "co2_emissions_potential": 2.4, + "energy_rating_potential": 79, + "lighting_cost_potential": { + "value": 81, + "currency": "GBP" + }, + "schema_version_original": "LIG-19.0", + "hot_water_cost_potential": { + "value": 74, + "currency": "GBP" + }, + "renewable_heat_incentive": { + "water_heating": 2207, + "impact_of_loft_insulation": -394, + "space_heating_existing_dwelling": 9825 + }, + "energy_consumption_current": 222, + "has_fixed_air_conditioning": "false", + "multiple_glazed_proportion": 100, + "calculation_software_version": "2.1.1.0", + "energy_consumption_potential": 137, + "environmental_impact_current": 62, + "fixed_lighting_outlets_count": 15, + "windows_transmission_details": { + "u_value": 3.1, + "data_source": 2, + "solar_transmittance": 0.76 + }, + "current_energy_efficiency_band": "D", + "environmental_impact_potential": 75, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 41, + "low_energy_fixed_lighting_outlets_count": 13 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/RdSAP-Schema-20.0.0/epc.json b/backend/epc_api/json_samples/RdSAP-Schema-20.0.0/epc.json new file mode 100644 index 00000000..bcb3618f --- /dev/null +++ b/backend/epc_api/json_samples/RdSAP-Schema-20.0.0/epc.json @@ -0,0 +1,340 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Pitched, 25 mm loft insulation", + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + }, + { + "description": "Pitched, 250 mm loft insulation", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "walls": [ + { + "description": "Solid brick, as built, no insulation (assumed)", + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1 + }, + { + "description": "Cavity wall, as built, insulated (assumed)", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": "Suspended, no insulation (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + { + "description": "Solid, insulated (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 1, + "window": { + "description": "Fully double glazed", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "addendum": { + "stone_walls": "true", + "system_build": "true", + "addendum_numbers": [ + 1, + 8 + ] + }, + "lighting": { + "description": "Low energy lighting in 50% of fixed outlets", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "postcode": "A0 0AA", + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Whitbury", + "built_form": 2, + "door_count": 2, + "glazed_area": 1, + "region_code": 1, + "report_type": 2, + "sap_heating": { + "cylinder_size": 1, + "water_heating_code": 901, + "water_heating_fuel": 26, + "instantaneous_wwhrs": { + "rooms_with_bath_and_or_shower": 1, + "rooms_with_mixer_shower_no_bath": 0, + "rooms_with_bath_and_mixer_shower": 0 + }, + "secondary_fuel_type": 25, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 26, + "boiler_flue_type": 2, + "fan_flue_present": "N", + "heat_emitter_type": 1, + "emitter_temperature": 0, + "main_heating_number": 1, + "main_heating_control": 2106, + "main_heating_category": 2, + "main_heating_fraction": 1, + "sap_main_heating_code": 101, + "central_heating_pump_age": 0, + "main_heating_data_source": 1, + "main_heating_index_number": 17507 + } + ], + "immersion_heating_type": "NA", + "has_fixed_air_conditioning": "false" + }, + "sap_version": 9.8, + "sap_windows": [ + { + "orientation": 1, + "window_area": 200.1, + "window_type": 2, + "glazing_type": 1, + "window_location": 0 + }, + { + "orientation": 2, + "window_area": 180.2, + "window_type": 1, + "glazing_type": 2, + "window_location": 1 + } + ], + "schema_type": "RdSAP-Schema-20.0.0", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": "Boiler and radiators, anthracite", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1 + }, + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "property_type": 0, + "address_line_1": "1 Some Street", + "assessment_type": "RdSAP", + "completion_date": "2020-05-04", + "inspection_date": "2020-05-04", + "extensions_count": 0, + "measurement_type": 1, + "sap_flat_details": { + "level": 1, + "top_storey": "N", + "storey_count": 3, + "flat_location": 1, + "heat_loss_corridor": 2, + "unheated_corridor_length": 10 + }, + "total_floor_area": 55, + "transaction_type": 1, + "conservatory_type": 1, + "heated_room_count": 5, + "registration_date": "2020-05-04", + "sap_energy_source": { + "mains_gas": "Y", + "meter_type": 2, + "photovoltaic_supply": { + "none_or_no_details": { + "pv_connection": 0, + "percent_roof_area": 50 + } + }, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 2 + }, + "secondary_heating": { + "description": "Room heaters, electric", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 11 + ], + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "floor_heat_loss": 7, + "sap_room_in_roof": { + "floor_area": 100, + "insulation": "AB", + "roof_room_connected": "N", + "construction_age_band": "B" + }, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.45, + "quantity": "metres" + }, + "floor_insulation": 1, + "total_floor_area": { + "value": 45.82, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 7.9, + "quantity": "metres" + }, + "floor_construction": 1, + "heat_loss_perimeter": { + "value": 19.5, + "quantity": "metres" + } + }, + { + "floor": 1, + "room_height": { + "value": 2.59, + "quantity": "metres" + }, + "total_floor_area": { + "value": 45.82, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 7.9, + "quantity": "metres" + }, + "heat_loss_perimeter": { + "value": 19.5, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 2, + "construction_age_band": "K", + "party_wall_construction": 0, + "wall_thickness_measured": "N", + "roof_insulation_location": 2, + "roof_insulation_thickness": "200mm", + "wall_insulation_thickness": "NI", + "floor_insulation_thickness": "NI" + } + ], + "low_energy_lighting": 100, + "solar_water_heating": "N", + "habitable_room_count": 5, + "heating_cost_current": 365.98, + "insulated_door_count": 2, + "co2_emissions_current": 2.4, + "energy_rating_average": 60, + "energy_rating_current": 50, + "lighting_cost_current": 123.45, + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + { + "description": "Time and temperature zone control", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "multiple_glazing_type": 2, + "open_fireplaces_count": 0, + "heating_cost_potential": 250.34, + "hot_water_cost_current": 200.4, + "insulated_door_u_value": 3, + "mechanical_ventilation": 0, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": 360, + "indicative_cost": "£100 - £350", + "improvement_type": "Z3", + "improvement_details": { + "improvement_number": 5 + }, + "improvement_category": 6, + "energy_performance_rating": 50, + "environmental_impact_rating": 50 + }, + { + "sequence": 2, + "typical_saving": 99, + "indicative_cost": 2000, + "improvement_type": "Z2", + "improvement_details": { + "improvement_number": 1 + }, + "improvement_category": 2, + "energy_performance_rating": 60, + "environmental_impact_rating": 64 + }, + { + "sequence": 3, + "typical_saving": 99, + "indicative_cost": 1000, + "improvement_type": "Z2", + "improvement_details": { + "improvement_texts": { + "improvement_summary": "An improvement summary", + "improvement_description": "An improvement desc" + } + }, + "improvement_category": 2, + "energy_performance_rating": 60, + "environmental_impact_rating": 64 + } + ], + "co2_emissions_potential": 1.4, + "energy_rating_potential": 72, + "lighting_cost_potential": 84.23, + "schema_version_original": "SAP-19.0", + "hot_water_cost_potential": 180.43, + "renewable_heat_incentive": { + "water_heating": 2285, + "impact_of_loft_insulation": -2114, + "impact_of_cavity_insulation": -122, + "impact_of_solid_wall_insulation": -3560, + "space_heating_existing_dwelling": 13120 + }, + "energy_consumption_current": 230, + "multiple_glazed_proportion": 100, + "calculation_software_version": "13.05r16", + "energy_consumption_potential": 88, + "environmental_impact_current": 52, + "fixed_lighting_outlets_count": 16, + "windows_transmission_details": { + "u_value": 2, + "data_source": 2, + "solar_transmittance": 0.72 + }, + "multiple_glazed_proportion_nr": "NR", + "current_energy_efficiency_band": "E", + "environmental_impact_potential": 74, + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 20, + "low_energy_fixed_lighting_outlets_count": 16 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/RdSAP-Schema-21.0.0/epc.json b/backend/epc_api/json_samples/RdSAP-Schema-21.0.0/epc.json new file mode 100644 index 00000000..3f9793b0 --- /dev/null +++ b/backend/epc_api/json_samples/RdSAP-Schema-21.0.0/epc.json @@ -0,0 +1,403 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Pitched, 25 mm loft insulation", + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + }, + { + "description": "Pitched, 250 mm loft insulation", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "walls": [ + { + "description": "Solid brick, as built, no insulation (assumed)", + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1 + }, + { + "description": "Cavity wall, as built, insulated (assumed)", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": "Suspended, no insulation (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + { + "description": "Solid, insulated (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 1, + "window": { + "description": "Fully double glazed", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "addendum": { + "stone_walls": "true", + "system_build": "true", + "addendum_numbers": [ + 1, + 8 + ] + }, + "lighting": { + "description": "Low energy lighting in 50% of fixed outlets", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "postcode": "A0 0AA", + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Whitbury", + "built_form": 2, + "door_count": 3, + "region_code": 1, + "report_type": 2, + "sap_heating": { + "cylinder_size": 1, + "shower_outlets": { + "shower_outlet": { + "shower_wwhrs": 1, + "shower_outlet_type": 1 + } + }, + "water_heating_code": 901, + "water_heating_fuel": 26, + "instantaneous_wwhrs": { + "wwhrs_index_number1": 1, + "wwhrs_index_number2": 2 + }, + "secondary_fuel_type": 25, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 26, + "boiler_flue_type": 2, + "fan_flue_present": "N", + "heat_emitter_type": 1, + "emitter_temperature": 0, + "main_heating_number": 1, + "boiler_ignition_type": 1, + "main_heating_control": 2106, + "main_heating_category": 2, + "main_heating_fraction": 1, + "sap_main_heating_code": 101, + "central_heating_pump_age": 0, + "main_heating_data_source": 1, + "main_heating_index_number": 17507 + } + ], + "immersion_heating_type": "NA", + "has_fixed_air_conditioning": "false" + }, + "sap_version": 10.2, + "sap_windows": [ + { + "pvc_frame": "false", + "glazing_gap": 6, + "orientation": 1, + "window_type": 2, + "frame_factor": 1.0, + "glazing_type": 14, + "window_width": 1.2, + "window_height": 2.0, + "draught_proofed": "true", + "window_location": 0, + "window_wall_type": 6, + "permanent_shutters_present": "N", + "window_transmission_details": { + "u_value": 1.0, + "data_source": 2, + "solar_transmittance": 1.0 + }, + "permanent_shutters_insulated": "N" + }, + { + "pvc_frame": "false", + "glazing_gap": 6, + "orientation": 1, + "window_type": 2, + "frame_factor": 1.0, + "glazing_type": 1, + "window_width": 1.2, + "window_height": 2.0, + "draught_proofed": "true", + "window_location": 1, + "window_wall_type": 6, + "permanent_shutters_present": "N", + "window_transmission_details": { + "u_value": 1.0, + "data_source": 2, + "solar_transmittance": 1.0 + }, + "permanent_shutters_insulated": "N" + } + ], + "schema_type": "RdSAP-Schema-21.0.0", + "uprn_source": "Energy Assessor", + "country_code": "ENG", + "main_heating": [ + { + "description": "Boiler and radiators, anthracite", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1 + }, + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "pressure_test": 6, + "property_type": 0, + "address_line_1": "1 Some Street", + "assessment_type": "RdSAP", + "completion_date": "2023-12-01", + "inspection_date": "2023-12-01", + "wet_rooms_count": 0, + "extensions_count": 0, + "measurement_type": 1, + "sap_flat_details": { + "level": 1, + "top_storey": "N", + "storey_count": 3, + "flat_location": 1, + "heat_loss_corridor": 2, + "unheated_corridor_length": 10 + }, + "total_floor_area": 55, + "transaction_type": 16, + "conservatory_type": 1, + "heated_room_count": 5, + "registration_date": "2023-12-01", + "sap_energy_source": { + "mains_gas": "Y", + "meter_type": 2, + "pv_batteries": { + "pv_battery": { + "battery_capacity": 5 + } + }, + "pv_connection": 0, + "pv_battery_count": 1, + "photovoltaic_supply": { + "none_or_no_details": { + "percent_roof_area": 0 + } + }, + "wind_turbines_count": 0, + "wind_turbine_details": { + "hub_height": 0, + "rotor_diameter": 0 + }, + "gas_smart_meter_present": "false", + "is_dwelling_export_capable": "false", + "wind_turbines_terrain_type": 4, + "electricity_smart_meter_present": "true" + }, + "secondary_heating": { + "description": "Room heaters, electric", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "floor_heat_loss": 7, + "sap_room_in_roof": { + "floor_area": 100, + "construction_age_band": "B" + }, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.45, + "quantity": "metres" + }, + "floor_insulation": 1, + "total_floor_area": { + "value": 45.82, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 7.9, + "quantity": "metres" + }, + "floor_construction": 1, + "heat_loss_perimeter": { + "value": 19.5, + "quantity": "metres" + } + }, + { + "floor": 1, + "room_height": { + "value": 2.59, + "quantity": "metres" + }, + "total_floor_area": { + "value": 45.82, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 7.9, + "quantity": "metres" + }, + "heat_loss_perimeter": { + "value": 19.5, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 2, + "construction_age_band": "M", + "sap_alternative_wall_1": { + "wall_area": 10.4, + "wall_dry_lined": "N", + "wall_construction": 4, + "wall_insulation_type": 2, + "wall_thickness_measured": "N" + }, + "sap_alternative_wall_2": { + "wall_area": 10.8, + "wall_dry_lined": "N", + "wall_construction": 4, + "wall_insulation_type": 2, + "wall_thickness_measured": "N" + }, + "party_wall_construction": 0, + "wall_thickness_measured": "N", + "roof_insulation_location": 2, + "roof_insulation_thickness": "200mm", + "wall_insulation_thickness": "NI", + "floor_insulation_thickness": "NI" + } + ], + "open_chimneys_count": 1, + "solar_water_heating": "N", + "habitable_room_count": 5, + "heating_cost_current": 365.98, + "insulated_door_count": 2, + "co2_emissions_current": 2.4, + "energy_rating_average": 60, + "energy_rating_current": 50, + "lighting_cost_current": 123.45, + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + { + "description": "Time and temperature zone control", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": 250.34, + "hot_water_cost_current": 200.4, + "insulated_door_u_value": 3, + "mechanical_ventilation": 6, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": 360, + "indicative_cost": "£100 - £350", + "improvement_type": "Z3", + "improvement_details": { + "improvement_number": 5 + }, + "improvement_category": 6, + "energy_performance_rating": 50, + "environmental_impact_rating": 50 + }, + { + "sequence": 2, + "typical_saving": 99, + "indicative_cost": 2000, + "improvement_type": "Z2", + "improvement_details": { + "improvement_number": 1 + }, + "improvement_category": 2, + "energy_performance_rating": 60, + "environmental_impact_rating": 64 + }, + { + "sequence": 3, + "typical_saving": 99, + "indicative_cost": 1000, + "improvement_type": "Z2", + "improvement_details": { + "improvement_texts": { + "improvement_description": "Improvement desc" + } + }, + "improvement_category": 2, + "energy_performance_rating": 60, + "environmental_impact_rating": 64 + } + ], + "co2_emissions_potential": 1.4, + "energy_rating_potential": 72, + "lighting_cost_potential": 84.23, + "schema_version_original": "SAP-19.0", + "hot_water_cost_potential": 180.43, + "renewable_heat_incentive": { + "water_heating": 2285, + "impact_of_loft_insulation": -2114, + "impact_of_cavity_insulation": -122, + "impact_of_solid_wall_insulation": -3560, + "space_heating_existing_dwelling": 13120 + }, + "draughtproofed_door_count": 1, + "mechanical_vent_duct_type": 3, + "energy_consumption_current": 230, + "has_fixed_air_conditioning": "false", + "multiple_glazed_proportion": 100, + "calculation_software_version": "13.05r16", + "energy_consumption_potential": 88, + "environmental_impact_current": 52, + "windows_transmission_details": { + "u_value": 2, + "data_source": 2, + "solar_transmittance": 0.72 + }, + "cfl_fixed_lighting_bulbs_count": 5, + "current_energy_efficiency_band": "E", + "environmental_impact_potential": 74, + "led_fixed_lighting_bulbs_count": 10, + "mechanical_vent_duct_placement": 2, + "mechanical_vent_duct_insulation": 2, + "potential_energy_efficiency_band": "C", + "pressure_test_certificate_number": 0, + "mechanical_ventilation_index_number": 12, + "co2_emissions_current_per_floor_area": 20, + "low_energy_fixed_lighting_bulbs_count": 16, + "mechanical_vent_duct_insulation_level": 2, + "mechanical_vent_measured_installation": "false", + "incandescent_fixed_lighting_bulbs_count": 5 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/RdSAP-Schema-21.0.1/epc.json b/backend/epc_api/json_samples/RdSAP-Schema-21.0.1/epc.json new file mode 100644 index 00000000..166e60a0 --- /dev/null +++ b/backend/epc_api/json_samples/RdSAP-Schema-21.0.1/epc.json @@ -0,0 +1,446 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": { + "value": "Pitched, 25 mm loft insulation", + "language": "1" + }, + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + }, + { + "description": { + "value": "Pitched, 250 mm loft insulation", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "walls": [ + { + "description": { + "value": "Solid brick, as built, no insulation (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1 + }, + { + "description": { + "value": "Cavity wall, as built, insulated (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": { + "value": "Suspended, no insulation (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + { + "description": { + "value": "Solid, insulated (assumed)", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 1, + "window": { + "description": { + "value": "Fully double glazed", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "addendum": { + "stone_walls": "true", + "system_build": "true", + "addendum_numbers": [ + 1, + 13 + ] + }, + "lighting": { + "description": { + "value": "Low energy lighting in 50% of fixed outlets", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "postcode": "A0 0AA", + "hot_water": { + "description": { + "value": "From main system", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Whitbury", + "built_form": 2, + "door_count": 3, + "region_code": 1, + "report_type": 2, + "sap_heating": { + "cylinder_size": 1, + "shower_outlets": { + "shower_outlet": { + "shower_wwhrs": 1, + "shower_outlet_type": 1 + } + }, + "water_heating_code": 901, + "water_heating_fuel": 26, + "instantaneous_wwhrs": { + "wwhrs_index_number1": 1, + "wwhrs_index_number2": 2 + }, + "secondary_fuel_type": 25, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 26, + "boiler_flue_type": 2, + "fan_flue_present": "N", + "heat_emitter_type": 1, + "emitter_temperature": 0, + "main_heating_number": 1, + "boiler_ignition_type": 1, + "main_heating_control": 2106, + "main_heating_category": 2, + "main_heating_fraction": 1, + "sap_main_heating_code": 101, + "central_heating_pump_age": 0, + "main_heating_data_source": 1, + "main_heating_index_number": 17507 + } + ], + "immersion_heating_type": "NA", + "has_fixed_air_conditioning": "false" + }, + "sap_version": 10.2, + "sap_windows": [ + { + "pvc_frame": "false", + "glazing_gap": 6, + "orientation": 1, + "window_type": 2, + "frame_factor": 1.0, + "glazing_type": 14, + "window_width": 1.2, + "window_height": 2.0, + "draught_proofed": "true", + "window_location": 0, + "window_wall_type": 6, + "permanent_shutters_present": "N", + "window_transmission_details": { + "u_value": 1.0, + "data_source": 2, + "solar_transmittance": 1.0 + }, + "permanent_shutters_insulated": "N" + }, + { + "pvc_frame": "false", + "glazing_gap": 6, + "orientation": 1, + "window_type": 2, + "frame_factor": 1.0, + "glazing_type": 1, + "window_width": 1.2, + "window_height": 2.0, + "draught_proofed": "true", + "window_location": 1, + "window_wall_type": 6, + "permanent_shutters_present": "N", + "window_transmission_details": { + "u_value": 1.0, + "data_source": 2, + "solar_transmittance": 1.0 + }, + "permanent_shutters_insulated": "N" + } + ], + "schema_type": "RdSAP-Schema-21.0.1", + "uprn_source": "Energy Assessor", + "country_code": "ENG", + "main_heating": [ + { + "description": { + "value": "Boiler and radiators, anthracite", + "language": "1" + }, + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1 + }, + { + "description": { + "value": "Boiler and radiators, mains gas", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "pressure_test": 6, + "property_type": 0, + "address_line_1": "1 Some Street", + "assessment_type": "RdSAP", + "completion_date": "2025-04-04", + "inspection_date": "2025-04-04", + "wet_rooms_count": 0, + "extensions_count": 0, + "measurement_type": 1, + "sap_flat_details": { + "level": 1, + "top_storey": "N", + "storey_count": 3, + "flat_location": 1, + "heat_loss_corridor": 2, + "unheated_corridor_length": { + "value": 10, + "quantity": "metres" + } + }, + "total_floor_area": 55, + "transaction_type": 16, + "conservatory_type": 1, + "heated_room_count": 5, + "registration_date": "2025-04-04", + "sap_energy_source": { + "mains_gas": "Y", + "meter_type": 2, + "pv_batteries": { + "pv_battery": { + "battery_capacity": 5 + } + }, + "pv_connection": 0, + "pv_battery_count": 1, + "photovoltaic_supply": { + "none_or_no_details": { + "percent_roof_area": 0 + } + }, + "wind_turbines_count": 0, + "wind_turbine_details": { + "hub_height": 0, + "rotor_diameter": 0 + }, + "gas_smart_meter_present": "false", + "is_dwelling_export_capable": "false", + "wind_turbines_terrain_type": 4, + "electricity_smart_meter_present": "true" + }, + "secondary_heating": { + "description": { + "value": "Room heaters, electric", + "language": "1" + }, + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "floor_heat_loss": 7, + "sap_room_in_roof": { + "floor_area": 100, + "construction_age_band": "B" + }, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": { + "value": 2.45, + "quantity": "metres" + }, + "floor_insulation": 1, + "total_floor_area": { + "value": 45.82, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 7.9, + "quantity": "metres" + }, + "floor_construction": 1, + "heat_loss_perimeter": { + "value": 19.5, + "quantity": "metres" + } + }, + { + "floor": 1, + "room_height": { + "value": 2.59, + "quantity": "metres" + }, + "total_floor_area": { + "value": 45.82, + "quantity": "square metres" + }, + "party_wall_length": { + "value": 7.9, + "quantity": "metres" + }, + "heat_loss_perimeter": { + "value": 19.5, + "quantity": "metres" + } + } + ], + "wall_insulation_type": 2, + "construction_age_band": "M", + "sap_alternative_wall_1": { + "wall_area": 10.4, + "wall_dry_lined": "N", + "wall_construction": 4, + "wall_insulation_type": 2, + "wall_thickness_measured": "N" + }, + "sap_alternative_wall_2": { + "wall_area": 10.8, + "wall_dry_lined": "N", + "wall_construction": 4, + "wall_insulation_type": 2, + "wall_thickness_measured": "N" + }, + "party_wall_construction": 0, + "wall_thickness_measured": "N", + "roof_insulation_location": 2, + "roof_insulation_thickness": "200mm", + "wall_insulation_thickness": "NI", + "floor_insulation_thickness": "NI" + } + ], + "open_chimneys_count": 1, + "solar_water_heating": "N", + "habitable_room_count": 5, + "heating_cost_current": 365.98, + "insulated_door_count": 2, + "co2_emissions_current": 2.4, + "energy_rating_average": 60, + "energy_rating_current": 50, + "lighting_cost_current": 123.45, + "main_heating_controls": [ + { + "description": { + "value": "Programmer, room thermostat and TRVs", + "language": "1" + }, + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + { + "description": { + "value": "Time and temperature zone control", + "language": "1" + }, + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": 250.34, + "hot_water_cost_current": 200.4, + "insulated_door_u_value": 3, + "mechanical_ventilation": 6, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": 139, + "indicative_cost": "£220 - £250", + "improvement_type": "G", + "improvement_details": { + "improvement_number": 66 + }, + "improvement_category": 5, + "energy_performance_rating": 70, + "environmental_impact_rating": 70 + }, + { + "sequence": 2, + "typical_saving": 49, + "indicative_cost": "£4,000 - £7,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 72, + "environmental_impact_rating": 73 + }, + { + "sequence": 3, + "typical_saving": 286, + "indicative_cost": "£8,000 - £10,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 83, + "environmental_impact_rating": 75 + } + ], + "co2_emissions_potential": 1.4, + "energy_rating_potential": 72, + "lighting_cost_potential": 84.23, + "schema_version_original": "SAP-19.0", + "hot_water_cost_potential": 180.43, + "renewable_heat_incentive": { + "water_heating": 2285, + "impact_of_loft_insulation": -2114, + "impact_of_cavity_insulation": -122, + "impact_of_solid_wall_insulation": -3560, + "space_heating_existing_dwelling": 13120 + }, + "draughtproofed_door_count": 1, + "mechanical_vent_duct_type": 3, + "energy_consumption_current": 230, + "has_fixed_air_conditioning": "false", + "multiple_glazed_proportion": 100, + "calculation_software_version": "13.05r16", + "energy_consumption_potential": 88, + "environmental_impact_current": 52, + "windows_transmission_details": { + "u_value": 2, + "data_source": 2, + "solar_transmittance": 0.72 + }, + "cfl_fixed_lighting_bulbs_count": 5, + "current_energy_efficiency_band": "E", + "environmental_impact_potential": 74, + "led_fixed_lighting_bulbs_count": 10, + "mechanical_vent_duct_placement": 2, + "mechanical_vent_duct_insulation": 2, + "potential_energy_efficiency_band": "C", + "pressure_test_certificate_number": 0, + "mechanical_ventilation_index_number": 12, + "co2_emissions_current_per_floor_area": 20, + "low_energy_fixed_lighting_bulbs_count": 16, + "mechanical_vent_duct_insulation_level": 2, + "mechanical_vent_measured_installation": "false", + "incandescent_fixed_lighting_bulbs_count": 0 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-16.0/rdsap.json b/backend/epc_api/json_samples/SAP-Schema-16.0/rdsap.json new file mode 100644 index 00000000..f1caacf4 --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-16.0/rdsap.json @@ -0,0 +1,299 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Pitched, 300+ mm loft insulation", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Cavity wall, filled cavity", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + { + "description": "Cavity wall, as built, insulated (assumed)", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": "Solid, no insulation (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "windows": [ + { + "description": "Fully double glazed", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "lighting": { + "description": "Low energy lighting in 67% of fixed outlets", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "postcode": "AA1 1AA", + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Town", + "built_form": 1, + "door_count": 2, + "glazed_area": 1, + "region_code": 12, + "report_type": 2, + "sap_heating": { + "wwhrs": { + "rooms_with_bath_and_or_shower": 2, + "rooms_with_mixer_shower_no_bath": 0, + "rooms_with_bath_and_mixer_shower": 0 + }, + "cylinder_size": 1, + "water_heating_code": 901, + "water_heating_fuel": 26, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 26, + "boiler_flue_type": 2, + "fan_flue_present": "Y", + "heat_emitter_type": 1, + "boiler_index_number": 10265, + "main_heating_number": 1, + "main_heating_control": 2106, + "main_heating_category": 2, + "main_heating_fraction": 1, + "main_heating_data_source": 1 + } + ], + "has_fixed_air_conditioning": "false" + }, + "sap_version": 9.91, + "schema_type": "SAP-Schema-16.0", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "dwelling_type": "Detached bungalow", + "language_code": 1, + "property_type": 1, + "address_line_1": "11, Street Road", + "schema_version": "LIG-16.0", + "assessment_type": "RdSAP", + "completion_date": "2012-09-30", + "inspection_date": "2012-09-27", + "extensions_count": 1, + "measurement_type": 1, + "total_floor_area": 107, + "transaction_type": 1, + "conservatory_type": 1, + "heated_room_count": 5, + "registration_date": "2012-09-30", + "restricted_access": 0, + "sap_energy_source": { + "main_gas": "Y", + "meter_type": 2, + "photovoltaic_supply": { + "percent_roof_area": 0 + }, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 2 + }, + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 11 + ], + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "wall_thickness": 300, + "floor_heat_loss": 7, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": 2.33, + "floor_insulation": 1, + "total_floor_area": 97.96, + "floor_construction": 1, + "heat_loss_perimeter": 37 + } + ], + "wall_insulation_type": 2, + "construction_age_band": "E", + "wall_thickness_measured": "Y", + "roof_insulation_location": 2, + "roof_insulation_thickness": "300mm+" + }, + { + "identifier": "Extension", + "wall_dry_lined": "N", + "floor_heat_loss": 7, + "roof_construction": 5, + "wall_construction": 4, + "building_part_number": 2, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": 3.08, + "floor_insulation": 1, + "total_floor_area": 8.63, + "floor_construction": 1, + "heat_loss_perimeter": 7.42 + } + ], + "wall_insulation_type": 4, + "construction_age_band": "K", + "wall_thickness_measured": "N", + "roof_insulation_location": 4, + "roof_insulation_thickness": "NI" + } + ], + "low_energy_lighting": 67, + "solar_water_heating": "N", + "bedf_revision_number": 329, + "habitable_room_count": 5, + "heating_cost_current": { + "value": 494, + "currency": "GBP" + }, + "insulated_door_count": 0, + "co2_emissions_current": 2.9, + "energy_rating_average": 60, + "energy_rating_current": 73, + "lighting_cost_current": { + "value": 73, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "multiple_glazing_type": 2, + "open_fireplaces_count": 0, + "has_hot_water_cylinder": "false", + "heating_cost_potential": { + "value": 428, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 90, + "currency": "GBP" + }, + "mechanical_ventilation": 0, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 68, + "currency": "GBP" + }, + "indicative_cost": "£800 - £1,200", + "improvement_type": "W", + "improvement_details": { + "improvement_number": 47 + }, + "improvement_category": 5, + "energy_performance_rating": 76, + "environmental_impact_rating": 76 + }, + { + "sequence": 2, + "typical_saving": { + "value": 16, + "currency": "GBP" + }, + "indicative_cost": "£25", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 5, + "energy_performance_rating": 76, + "environmental_impact_rating": 76 + }, + { + "sequence": 3, + "typical_saving": { + "value": 26, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 77, + "environmental_impact_rating": 78 + }, + { + "sequence": 4, + "typical_saving": { + "value": 238, + "currency": "GBP" + }, + "indicative_cost": "£9,000 - £14,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 86, + "environmental_impact_rating": 86 + } + ], + "co2_emissions_potential": 1.4, + "energy_rating_potential": 86, + "lighting_cost_potential": { + "value": 55, + "currency": "GBP" + }, + "hot_water_cost_potential": { + "value": 64, + "currency": "GBP" + }, + "renewable_heat_incentive": { + "water_heating": 2264, + "space_heating_existing_dwelling": 9324 + }, + "seller_commission_report": "Y", + "energy_consumption_current": 144, + "has_fixed_air_conditioning": "false", + "multiple_glazed_proportion": 100, + "calculation_software_version": 8.0, + "energy_consumption_potential": 64, + "environmental_impact_current": 72, + "fixed_lighting_outlets_count": 15, + "current_energy_efficiency_band": "C", + "environmental_impact_potential": 86, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "B", + "co2_emissions_current_per_floor_area": 28, + "low_energy_fixed_lighting_outlets_count": 10 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-16.0/sap.json b/backend/epc_api/json_samples/SAP-Schema-16.0/sap.json new file mode 100644 index 00000000..3fdf06bc --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-16.0/sap.json @@ -0,0 +1,348 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "(other premises above)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.34 W/m²K", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.25 W/m²K", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "status": "entered", + "windows": { + "description": "Fully double glazed", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "lighting": { + "description": "Low energy lighting in 57% of fixed outlets", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "postcode": "AA1 1AA", + "data_type": 2, + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Town", + "built_form": 1, + "living_area": 31.53, + "orientation": 0, + "region_code": 17, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "has_solar_panel": "false", + "water_fuel_type": 1, + "water_heating_code": 901, + "hot_water_store_size": 145, + "main_heating_details": [ + { + "main_fuel_type": 1, + "heat_emitter_type": 1, + "boiler_index_number": 9206, + "is_flue_fan_present": "true", + "main_heating_number": 1, + "main_heating_control": 2106, + "is_interlocked_system": "true", + "main_heating_category": 2, + "main_heating_fraction": 1, + "main_heating_data_source": 1, + "has_delayed_start_thermostat": "false", + "load_or_weather_compensation": 0, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "true", + "has_cylinder_thermostat": "true", + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1, + "is_cylinder_in_heated_space": "true", + "is_hot_water_separately_timed": "true", + "is_primary_pipework_insulated": "true", + "hot_water_store_insulation_type": 1, + "hot_water_store_heat_loss_source": 3, + "hot_water_store_insulation_thickness": 50 + }, + "sap_version": 9.9, + "schema_type": "SAP-Schema-16.0", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "air_tightness": { + "description": "Air permeability 2.7 m³/h.m² (as tested)", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "dwelling_type": "Mid-floor flat", + "language_code": 1, + "property_type": 2, + "address_line_1": "28, Place Drive", + "schema_version": "LIG-16.0", + "assessment_date": "2012-09-29", + "assessment_type": "SAP", + "completion_date": "2012-09-29", + "inspection_date": "2012-09-29", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 1, + "air_permeability": 2.72, + "open_flues_count": 0, + "ventilation_type": 1, + "extract_fans_count": 3, + "open_fireplaces_count": 0, + "sheltered_sides_count": 2, + "flueless_gas_fires_count": 0 + }, + "sap_data_version": 9.81, + "sap_flat_details": { + "level": 2 + }, + "total_floor_area": 80, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2012-09-29", + "restricted_access": 0, + "sap_energy_source": { + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 1, + "fixed_lighting_outlets_count": 7, + "low_energy_fixed_lighting_outlets_count": 4, + "low_energy_fixed_lighting_outlets_percentage": 57 + }, + "sap_opening_types": [ + { + "name": 1, + "type": 2, + "u_value": 2, + "data_source": 2, + "description": "Door", + "glazing_type": 6 + }, + { + "name": 2, + "type": 4, + "u_value": 1.8, + "data_source": 2, + "description": "Window", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 11 + ], + "sap_building_parts": [ + { + "sap_walls": [ + { + "name": "Wall 1", + "u_value": 0.35, + "wall_type": 2, + "description": "Wall 5 render", + "total_wall_area": 58.29, + "is_curtain_walling": "false" + }, + { + "name": "Wall 2", + "u_value": 0.27, + "wall_type": 2, + "description": "Wall 2 common area", + "total_wall_area": 9.28, + "is_curtain_walling": "false" + }, + { + "name": "Wall 3", + "u_value": 0.35, + "wall_type": 2, + "description": "Wall 3 lift shaft", + "total_wall_area": 8.9, + "is_curtain_walling": "false" + } + ], + "identifier": "Main Dwelling", + "overshading": 2, + "sap_openings": [ + { + "name": 1, + "type": 1, + "width": 0.91, + "height": 2.1, + "location": "Wall 2", + "orientation": 0 + }, + { + "name": 2, + "type": 2, + "width": 1.15, + "height": 1.4, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 3, + "type": 2, + "width": 0.9, + "height": 1.4, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 4, + "type": 2, + "width": 1.3, + "height": 1.4, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 5, + "type": 2, + "width": 1.3, + "height": 1.4, + "location": "Wall 1", + "orientation": 5 + }, + { + "name": 6, + "type": 2, + "width": 1.15, + "height": 1.4, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 7, + "type": 2, + "width": 0.55, + "height": 1.05, + "location": "Wall 1", + "orientation": 4 + }, + { + "name": 8, + "type": 2, + "width": 1.15, + "height": 1.4, + "location": "Wall 1", + "orientation": 4 + }, + { + "name": 9, + "type": 2, + "width": 1.15, + "height": 1.4, + "location": "Wall 1", + "orientation": 4 + }, + { + "name": 10, + "type": 2, + "width": 1.3, + "height": 1.05, + "location": "Wall 1", + "orientation": 4 + } + ], + "construction_year": 2011, + "sap_thermal_bridges": { + "thermal_bridge_code": 4, + "user_defined_y_value": 0.08, + "calculation_reference": "SAP 2005 record" + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 1, + "u_value": 0.25, + "floor_type": 4, + "description": "Floor 2", + "storey_height": 2.32, + "heat_loss_area": 5.19, + "total_floor_area": 79.9 + } + ], + "thermal_mass_parameter": 250 + } + ], + "bedf_revision_number": 329, + "heating_cost_current": 213, + "co2_emissions_current": 1.3, + "energy_rating_average": 60, + "energy_rating_current": 82, + "lighting_cost_current": 66, + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": 215, + "hot_water_cost_current": 94, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": 18, + "indicative_cost": "£8", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 1, + "energy_performance_rating": 83, + "environmental_impact_rating": 87 + } + ], + "co2_emissions_potential": 1.3, + "energy_rating_potential": 83, + "lighting_cost_potential": 46, + "hot_water_cost_potential": 94, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 1780, + "water_heating": 2306 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 87, + "has_fixed_air_conditioning": "false", + "calculation_software_version": 5.4, + "energy_consumption_potential": 82, + "environmental_impact_current": 86, + "current_energy_efficiency_band": "B", + "environmental_impact_potential": 87, + "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/backend/epc_api/json_samples/SAP-Schema-16.1/rdsap.json b/backend/epc_api/json_samples/SAP-Schema-16.1/rdsap.json new file mode 100644 index 00000000..e6a3bb0a --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-16.1/rdsap.json @@ -0,0 +1,400 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Pitched, 300+ mm loft insulation", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Cavity wall, filled cavity", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + { + "description": "System built, as built, no insulation (assumed)", + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1 + }, + { + "description": "Solid brick, as built, no insulation (assumed)", + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 1 + } + ], + "floors": [ + { + "description": "Suspended, no insulation (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 2, + "windows": [ + { + "description": "Fully double glazed", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + } + ], + "addendum": { + "system_build": "true" + }, + "lighting": { + "description": "Low energy lighting in 36% of fixed outlets", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "postcode": "AA1 1AA", + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Town", + "built_form": 4, + "door_count": 2, + "glazed_area": 1, + "region_code": 14, + "report_type": 2, + "sap_heating": { + "wwhrs": { + "rooms_with_bath_and_or_shower": 1, + "rooms_with_mixer_shower_no_bath": 0, + "rooms_with_bath_and_mixer_shower": 0 + }, + "cylinder_size": 2, + "water_heating_code": 901, + "water_heating_fuel": 26, + "cylinder_thermostat": "Y", + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 26, + "boiler_flue_type": 2, + "fan_flue_present": "Y", + "heat_emitter_type": 1, + "main_heating_number": 1, + "main_heating_control": 2103, + "main_heating_category": 2, + "main_heating_fraction": 1, + "sap_main_heating_code": 101, + "main_heating_data_source": 2 + } + ], + "cylinder_insulation_type": 1, + "has_fixed_air_conditioning": "false", + "cylinder_insulation_thickness": 38 + }, + "sap_version": 9.91, + "schema_type": "SAP-Schema-16.1", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "property_type": 0, + "address_line_1": "15, What the Dickens Road", + "schema_version": "LIG-16.1", + "assessment_type": "RdSAP", + "completion_date": "2013-01-13", + "inspection_date": "2013-01-09", + "extensions_count": 1, + "measurement_type": 1, + "total_floor_area": 72, + "transaction_type": 8, + "conservatory_type": 1, + "heated_room_count": 5, + "registration_date": "2013-01-13", + "restricted_access": 0, + "sap_energy_source": { + "main_gas": "Y", + "meter_type": 2, + "photovoltaic_supply": { + "percent_roof_area": 0 + }, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 1 + }, + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 9 + ], + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "wall_thickness": 300, + "floor_heat_loss": 7, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 1, + "sap_alternative_wall": { + "wall_area": 18.9, + "wall_dry_lined": "N", + "wall_construction": 3, + "wall_insulation_type": 4, + "wall_thickness_measured": "N" + }, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": 2.43, + "floor_insulation": 1, + "total_floor_area": 34.2, + "floor_construction": 2, + "heat_loss_perimeter": 14.9 + }, + { + "floor": 1, + "room_height": 2.47, + "total_floor_area": 34.2, + "heat_loss_perimeter": 9.84 + } + ], + "wall_insulation_type": 2, + "construction_age_band": "C", + "wall_thickness_measured": "Y", + "roof_insulation_location": 2, + "roof_insulation_thickness": "300mm+" + }, + { + "identifier": "Extension 1", + "wall_dry_lined": "N", + "wall_thickness": 200, + "floor_heat_loss": 7, + "roof_construction": 1, + "wall_construction": 8, + "building_part_number": 2, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": 2.26, + "floor_insulation": 0, + "total_floor_area": 3.5, + "floor_construction": 0, + "heat_loss_perimeter": 5.7 + } + ], + "wall_insulation_type": 4, + "construction_age_band": "E", + "wall_thickness_measured": "Y", + "roof_insulation_location": 4, + "roof_insulation_thickness": "NI" + } + ], + "low_energy_lighting": 36, + "solar_water_heating": "N", + "bedf_revision_number": 333, + "habitable_room_count": 5, + "heating_cost_current": { + "value": 546, + "currency": "GBP" + }, + "insulated_door_count": 0, + "co2_emissions_current": 3.4, + "energy_rating_average": 60, + "energy_rating_current": 61, + "lighting_cost_current": { + "value": 69, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Room thermostat only", + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + } + ], + "multiple_glazing_type": 3, + "open_fireplaces_count": 0, + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 378, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 127, + "currency": "GBP" + }, + "mechanical_ventilation": 0, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 66, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £14,000", + "improvement_type": "Q", + "improvement_details": { + "improvement_number": 7 + }, + "improvement_category": 5, + "energy_performance_rating": 65, + "environmental_impact_rating": 63 + }, + { + "sequence": 2, + "typical_saving": { + "value": 36, + "currency": "GBP" + }, + "indicative_cost": "£800 - £1,200", + "improvement_type": "W", + "improvement_details": { + "improvement_number": 47 + }, + "improvement_category": 5, + "energy_performance_rating": 67, + "environmental_impact_rating": 66 + }, + { + "sequence": 3, + "typical_saving": { + "value": 23, + "currency": "GBP" + }, + "indicative_cost": "£35", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 5, + "energy_performance_rating": 68, + "environmental_impact_rating": 67 + }, + { + "sequence": 4, + "typical_saving": { + "value": 21, + "currency": "GBP" + }, + "indicative_cost": "£350 - £450", + "improvement_type": "G", + "improvement_details": { + "improvement_number": 15 + }, + "improvement_category": 5, + "energy_performance_rating": 69, + "environmental_impact_rating": 68 + }, + { + "sequence": 5, + "typical_saving": { + "value": 75, + "currency": "GBP" + }, + "indicative_cost": "£2,200 - £3,000", + "improvement_type": "I", + "improvement_details": { + "improvement_number": 20 + }, + "improvement_category": 5, + "energy_performance_rating": 73, + "environmental_impact_rating": 73 + }, + { + "sequence": 6, + "typical_saving": { + "value": 34, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 74, + "environmental_impact_rating": 76 + }, + { + "sequence": 7, + "typical_saving": { + "value": 247, + "currency": "GBP" + }, + "indicative_cost": "£9,000 - £14,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 85, + "environmental_impact_rating": 86 + } + ], + "co2_emissions_potential": 1.0, + "energy_rating_potential": 85, + "lighting_cost_potential": { + "value": 42, + "currency": "GBP" + }, + "alternative_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 57, + "currency": "GBP" + }, + "improvement_type": "Z1", + "improvement_details": { + "improvement_number": 51 + }, + "improvement_category": 6, + "energy_performance_rating": 72, + "environmental_impact_rating": 74 + }, + { + "sequence": 2, + "typical_saving": { + "value": 85, + "currency": "GBP" + }, + "improvement_type": "Z3", + "improvement_details": { + "improvement_number": 53 + }, + "improvement_category": 6, + "energy_performance_rating": 73, + "environmental_impact_rating": 72 + } + ], + "hot_water_cost_potential": { + "value": 68, + "currency": "GBP" + }, + "renewable_heat_incentive": { + "water_heating": 2530, + "space_heating_existing_dwelling": 8564 + }, + "seller_commission_report": "Y", + "energy_consumption_current": 244, + "has_fixed_air_conditioning": "false", + "multiple_glazed_proportion": 100, + "calculation_software_version": "6.2.0.6", + "energy_consumption_potential": 66, + "environmental_impact_current": 59, + "fixed_lighting_outlets_count": 11, + "current_energy_efficiency_band": "D", + "environmental_impact_potential": 86, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "B", + "co2_emissions_current_per_floor_area": 47, + "low_energy_fixed_lighting_outlets_count": 4 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-16.1/sap.json b/backend/epc_api/json_samples/SAP-Schema-16.1/sap.json new file mode 100644 index 00000000..ac083fe4 --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-16.1/sap.json @@ -0,0 +1,365 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Average thermal transmittance 0.15 W/m²K", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.30 W/m²K", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.18 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "status": "entered", + "windows": { + "description": "Fully double glazed", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "lighting": { + "description": "Low energy lighting in 33% of fixed outlets", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "postcode": "AA1 1AA", + "data_type": 2, + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Town", + "built_form": 4, + "living_area": 12.04, + "orientation": 0, + "region_code": 15, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "has_solar_panel": "false", + "water_fuel_type": 1, + "water_heating_code": 901, + "main_heating_details": [ + { + "main_fuel_type": 1, + "heat_emitter_type": 1, + "boiler_index_number": 9901, + "is_flue_fan_present": "true", + "main_heating_number": 1, + "main_heating_control": 2106, + "is_interlocked_system": "true", + "main_heating_category": 2, + "main_heating_fraction": 1, + "main_heating_data_source": 1, + "has_delayed_start_thermostat": "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.9, + "schema_type": "SAP-Schema-16.1", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "air_tightness": { + "description": "Air permeability 7.7 m³/h.m² (as tested)", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + }, + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "property_type": 0, + "address_line_1": "28, Place Drive", + "schema_version": "LIG-16.0", + "assessment_date": "2013-01-12", + "assessment_type": "SAP", + "completion_date": "2013-01-12", + "inspection_date": "2013-01-12", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 1, + "air_permeability": 7.7, + "open_flues_count": 0, + "ventilation_type": 1, + "extract_fans_count": 3, + "open_fireplaces_count": 0, + "sheltered_sides_count": 2, + "flueless_gas_fires_count": 0 + }, + "total_floor_area": 59, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2013-01-12", + "restricted_access": 0, + "sap_energy_source": { + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 2, + "fixed_lighting_outlets_count": 9, + "low_energy_fixed_lighting_outlets_count": 3, + "low_energy_fixed_lighting_outlets_percentage": 33 + }, + "sap_opening_types": [ + { + "name": 1, + "type": 1, + "u_value": 1.57, + "data_source": 2, + "glazing_type": 1 + }, + { + "name": 2, + "type": 4, + "u_value": 1.9, + "frame_type": 2, + "data_source": 3, + "glazing_gap": 3, + "frame_factor": 0.7, + "glazing_type": 6, + "isargonfilled": "false", + "solar_transmittance": 0.63 + }, + { + "name": 4, + "type": 2, + "u_value": 1.9, + "data_source": 2, + "glazing_type": 6 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 9 + ], + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof 1", + "u_value": 0.15, + "roof_type": 2, + "description": "Roof 1", + "total_roof_area": 29.25 + } + ], + "sap_walls": [ + { + "name": "Wall 1", + "u_value": 0.3, + "wall_type": 2, + "description": "Wall 1", + "total_wall_area": 38.69, + "is_curtain_walling": "false" + }, + { + "name": "Wall 2", + "u_value": 0.3, + "wall_type": 2, + "description": "High step", + "total_wall_area": 2.25, + "is_curtain_walling": "false" + }, + { + "name": "Wall 3", + "u_value": 0.3, + "wall_type": 2, + "description": "low step", + "total_wall_area": 2.25, + "is_curtain_walling": "false" + } + ], + "identifier": "Main Dwelling", + "overshading": 2, + "sap_openings": [ + { + "name": 1, + "type": 1, + "width": 0.93, + "height": 2.1, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 2, + "type": 2, + "width": 1.77, + "height": 1.35, + "location": "Wall 1", + "orientation": 1 + }, + { + "name": 3, + "type": 2, + "width": 1.2, + "height": 1.05, + "location": "Wall 1", + "orientation": 1 + }, + { + "name": 4, + "type": 4, + "width": 0.93, + "height": 2.1, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 5, + "type": 2, + "width": 1.2, + "height": 1.05, + "location": "Wall 1", + "orientation": 5 + }, + { + "name": 6, + "type": 2, + "width": 1.77, + "height": 1.05, + "location": "Wall 1", + "orientation": 5 + } + ], + "construction_year": 2012, + "sap_thermal_bridges": { + "thermal_bridge_code": 4, + "user_defined_y_value": 0.08, + "calculation_reference": "ACDs" + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.18, + "floor_type": 2, + "description": "Floor 1", + "storey_height": 2.37, + "heat_loss_area": 29.25, + "total_floor_area": 29.25 + }, + { + "storey": 1, + "u_value": 0, + "floor_type": 3, + "storey_height": 2.59, + "heat_loss_area": 0, + "total_floor_area": 29.25 + } + ], + "thermal_mass_parameter": 250 + } + ], + "bedf_revision_number": 333, + "heating_cost_current": 236, + "co2_emissions_current": 1.3, + "energy_rating_average": 60, + "energy_rating_current": 79, + "lighting_cost_current": 66, + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "has_hot_water_cylinder": "false", + "heating_cost_potential": 240, + "hot_water_cost_current": 76, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": 23, + "indicative_cost": "£15", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 1, + "energy_performance_rating": 80, + "environmental_impact_rating": 84 + }, + { + "sequence": 2, + "typical_saving": 25, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 3, + "energy_performance_rating": 81, + "environmental_impact_rating": 86 + }, + { + "sequence": 3, + "typical_saving": 226, + "indicative_cost": "£11,000 - £20,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 3, + "energy_performance_rating": 94, + "environmental_impact_rating": 98 + }, + { + "sequence": 4, + "typical_saving": 19, + "indicative_cost": "£1,500 - £4,000", + "improvement_type": "V", + "improvement_details": { + "improvement_number": 44 + }, + "improvement_category": 3, + "energy_performance_rating": 95, + "environmental_impact_rating": 99 + } + ], + "co2_emissions_potential": 1.2, + "energy_rating_potential": 80, + "lighting_cost_potential": 39, + "hot_water_cost_potential": 76, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 1867, + "water_heating": 1839 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 119, + "has_fixed_air_conditioning": "false", + "calculation_software_version": 5.4, + "energy_consumption_potential": 110, + "environmental_impact_current": 83, + "current_energy_efficiency_band": "C", + "environmental_impact_potential": 84, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 22 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-16.2/rdsap.json b/backend/epc_api/json_samples/SAP-Schema-16.2/rdsap.json new file mode 100644 index 00000000..cea3d9c2 --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-16.2/rdsap.json @@ -0,0 +1,931 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Pitched, 75 mm loft insulation", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + } + ], + "walls": [ + { + "description": "Cavity wall, as built, no insulation (assumed)", + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + }, + { + "description": "Cavity wall, as built, insulated (assumed)", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": "Suspended, no insulation (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + { + "description": "To unheated space, limited insulation (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 1, + "windows": [ + { + "description": "Partial double glazing", + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + } + ], + "addendum": { + "cavity_fill_recommended": "true" + }, + "lighting": { + "description": "Low energy lighting in 13% of fixed outlets", + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + }, + "postcode": "AA1 1AA", + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Town", + "built_form": 1, + "door_count": 4, + "glazed_area": 4, + "region_code": 3, + "report_type": 2, + "sap_heating": { + "wwhrs": { + "rooms_with_bath_and_or_shower": 3, + "rooms_with_mixer_shower_no_bath": 0, + "rooms_with_bath_and_mixer_shower": 3 + }, + "cylinder_size": 4, + "water_heating_code": 901, + "water_heating_fuel": 26, + "cylinder_thermostat": "Y", + "secondary_fuel_type": 33, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 26, + "boiler_flue_type": 2, + "fan_flue_present": "N", + "heat_emitter_type": 1, + "main_heating_number": 1, + "main_heating_control": 2106, + "main_heating_category": 2, + "main_heating_fraction": 0.5, + "sap_main_heating_code": 101, + "main_heating_data_source": 2 + }, + { + "has_fghrs": "N", + "main_fuel_type": 26, + "boiler_flue_type": 2, + "fan_flue_present": "Y", + "heat_emitter_type": 1, + "main_heating_number": 2, + "main_heating_control": 2106, + "main_heating_category": 2, + "main_heating_fraction": 0.5, + "sap_main_heating_code": 101, + "main_heating_data_source": 2 + } + ], + "secondary_heating_type": 631, + "cylinder_insulation_type": 1, + "has_fixed_air_conditioning": "false", + "cylinder_insulation_thickness": 50 + }, + "sap_version": 9.91, + "sap_windows": [ + { + "u_value": 3.1, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 2, + "solar_transmittance": 0.76 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 2, + "solar_transmittance": 0.76 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 2, + "solar_transmittance": 0.76 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 2, + "solar_transmittance": 0.76 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 1, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 2, + "solar_transmittance": 0.76 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 1, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 0, + "solar_transmittance": 0.76 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 3, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 2, + "solar_transmittance": 0.76 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 3, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 2, + "solar_transmittance": 0.76 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 3, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 2, + "solar_transmittance": 0.76 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 3, + "window_area": 1, + "window_type": 1, + "glazing_type": 3, + "window_location": 2, + "solar_transmittance": 0.76 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 2, + "window_type": 1, + "glazing_type": 5, + "window_location": 2, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 2, + "window_type": 1, + "glazing_type": 5, + "window_location": 2, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 2, + "window_type": 1, + "glazing_type": 5, + "window_location": 2, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 2, + "window_type": 1, + "glazing_type": 5, + "window_location": 2, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 2, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 4, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 4, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 4, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 3, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 7, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 5, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 5, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 3, + "window_area": 1, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 3.1, + "data_source": 2, + "orientation": 5, + "window_area": 2, + "window_type": 1, + "glazing_type": 3, + "window_location": 0, + "solar_transmittance": 0.76 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 3, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 3, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 3, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 8, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 4.8, + "data_source": 2, + "orientation": 5, + "window_area": 3, + "window_type": 1, + "glazing_type": 5, + "window_location": 0, + "solar_transmittance": 0.85 + }, + { + "u_value": 2, + "data_source": 2, + "orientation": 3, + "window_area": 2, + "window_type": 1, + "glazing_type": 2, + "window_location": 0, + "solar_transmittance": 0.72 + }, + { + "u_value": 2, + "data_source": 2, + "orientation": 3, + "window_area": 3, + "window_type": 1, + "glazing_type": 2, + "window_location": 0, + "solar_transmittance": 0.72 + }, + { + "u_value": 2, + "data_source": 2, + "orientation": 3, + "window_area": 3, + "window_type": 1, + "glazing_type": 2, + "window_location": 0, + "solar_transmittance": 0.72 + }, + { + "u_value": 2, + "data_source": 2, + "orientation": 7, + "window_area": 6, + "window_type": 1, + "glazing_type": 2, + "window_location": 0, + "solar_transmittance": 0.72 + }, + { + "u_value": 2, + "data_source": 2, + "orientation": 7, + "window_area": 8, + "window_type": 1, + "glazing_type": 2, + "window_location": 0, + "solar_transmittance": 0.72 + }, + { + "u_value": 2, + "data_source": 2, + "orientation": 7, + "window_area": 8, + "window_type": 1, + "glazing_type": 2, + "window_location": 0, + "solar_transmittance": 0.72 + }, + { + "u_value": 2, + "data_source": 2, + "orientation": 5, + "window_area": 9, + "window_type": 1, + "glazing_type": 2, + "window_location": 0, + "solar_transmittance": 0.72 + } + ], + "schema_type": "SAP-Schema-16.2", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "dwelling_type": "Detached house", + "language_code": 1, + "property_type": 0, + "address_line_1": "11, Some Close", + "address_line_2": "Long Itchington", + "schema_version": "LIG-16.1", + "assessment_type": "RdSAP", + "completion_date": "2013-07-12", + "inspection_date": "2013-06-27", + "extensions_count": 2, + "measurement_type": 1, + "total_floor_area": 1563, + "transaction_type": 5, + "conservatory_type": 2, + "heated_room_count": 15, + "registration_date": "2013-07-12", + "restricted_access": 0, + "sap_energy_source": { + "main_gas": "Y", + "meter_type": 1, + "photovoltaic_supply": { + "percent_roof_area": 0 + }, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 3 + }, + "secondary_heating": { + "description": "Room heaters, coal", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 9 + ], + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "wall_thickness": 320, + "floor_heat_loss": 7, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": 2.52, + "floor_insulation": 1, + "total_floor_area": 668.41, + "floor_construction": 2, + "heat_loss_perimeter": 96.43 + }, + { + "floor": 1, + "room_height": 2.87, + "total_floor_area": 691.43, + "heat_loss_perimeter": 106.57 + } + ], + "wall_insulation_type": 4, + "construction_age_band": "C", + "wall_thickness_measured": "Y", + "roof_insulation_location": 2, + "roof_insulation_thickness": "75mm" + }, + { + "identifier": "Extension 1", + "wall_dry_lined": "N", + "wall_thickness": 500, + "floor_heat_loss": 7, + "roof_construction": 5, + "wall_construction": 4, + "building_part_number": 2, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": 2.54, + "floor_insulation": 1, + "total_floor_area": 82.03, + "floor_construction": 1, + "heat_loss_perimeter": 34.27 + } + ], + "wall_insulation_type": 4, + "construction_age_band": "H", + "wall_thickness_measured": "Y", + "roof_insulation_location": 2, + "roof_insulation_thickness": "75mm" + }, + { + "identifier": "Extension 2", + "wall_dry_lined": "N", + "wall_thickness": 280, + "floor_heat_loss": 2, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 3, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": 3.21, + "floor_insulation": 1, + "total_floor_area": 121.31, + "floor_construction": 2, + "heat_loss_perimeter": 37.71 + } + ], + "wall_insulation_type": 4, + "construction_age_band": "H", + "wall_thickness_measured": "Y", + "roof_insulation_location": 2, + "roof_insulation_thickness": "75mm" + } + ], + "low_energy_lighting": 13, + "solar_water_heating": "N", + "bedf_revision_number": 340, + "habitable_room_count": 15, + "heating_cost_current": { + "value": 13144, + "currency": "GBP" + }, + "insulated_door_count": 0, + "co2_emissions_current": 78, + "energy_rating_average": 60, + "energy_rating_current": 52, + "lighting_cost_current": { + "value": 635, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "multiple_glazing_type": "ND", + "open_fireplaces_count": 0, + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 8582, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 188, + "currency": "GBP" + }, + "mechanical_ventilation": 2, + "percent_draughtproofed": 0, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 637.67, + "currency": "GBP" + }, + "indicative_cost": "£100 - £350", + "improvement_type": "A", + "improvement_details": { + "improvement_number": 5 + }, + "improvement_category": 5, + "energy_performance_rating": 55, + "environmental_impact_rating": 42 + }, + { + "sequence": 2, + "typical_saving": { + "value": 1224.21, + "currency": "GBP" + }, + "indicative_cost": "£500 - £1,500", + "improvement_type": "B", + "improvement_details": { + "improvement_number": 6 + }, + "improvement_category": 5, + "energy_performance_rating": 59, + "environmental_impact_rating": 46 + }, + { + "sequence": 3, + "typical_saving": { + "value": 476.28, + "currency": "GBP" + }, + "indicative_cost": "£800 - £1,200", + "improvement_type": "W", + "improvement_details": { + "improvement_number": 47 + }, + "improvement_category": 5, + "energy_performance_rating": 60, + "environmental_impact_rating": 48 + }, + { + "sequence": 4, + "typical_saving": { + "value": 787.42, + "currency": "GBP" + }, + "indicative_cost": "£80 - £120", + "improvement_type": "D", + "improvement_details": { + "improvement_number": 10 + }, + "improvement_category": 5, + "energy_performance_rating": 63, + "environmental_impact_rating": 51 + }, + { + "sequence": 5, + "typical_saving": { + "value": 234.75, + "currency": "GBP" + }, + "indicative_cost": "£305", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 5, + "energy_performance_rating": 64, + "environmental_impact_rating": 51 + }, + { + "sequence": 6, + "typical_saving": { + "value": 1219.36, + "currency": "GBP" + }, + "indicative_cost": "£2,200 - £3,000", + "improvement_type": "I", + "improvement_details": { + "improvement_number": 20 + }, + "improvement_category": 5, + "energy_performance_rating": 68, + "environmental_impact_rating": 56 + }, + { + "sequence": 7, + "typical_saving": { + "value": 310.6, + "currency": "GBP" + }, + "indicative_cost": "£3,300 - £6,500", + "improvement_type": "O", + "improvement_details": { + "improvement_number": 8 + }, + "improvement_category": 5, + "energy_performance_rating": 69, + "environmental_impact_rating": 58 + } + ], + "co2_emissions_potential": 51, + "energy_rating_potential": 69, + "lighting_cost_potential": { + "value": 344, + "currency": "GBP" + }, + "hot_water_cost_potential": { + "value": 151, + "currency": "GBP" + }, + "renewable_heat_incentive": { + "water_heating": 3640, + "impact_of_loft_insulation": -12585, + "impact_of_cavity_insulation": -21982, + "space_heating_existing_dwelling": 207769 + }, + "seller_commission_report": "Y", + "energy_consumption_current": 239, + "has_fixed_air_conditioning": "false", + "calculation_software_version": "1.4.1.0", + "energy_consumption_potential": 153, + "environmental_impact_current": 40, + "fixed_lighting_outlets_count": 70, + "current_energy_efficiency_band": "E", + "environmental_impact_potential": 58, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 50, + "low_energy_fixed_lighting_outlets_count": 9 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-16.2/sap.json b/backend/epc_api/json_samples/SAP-Schema-16.2/sap.json new file mode 100644 index 00000000..b6db5a2b --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-16.2/sap.json @@ -0,0 +1,2112 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Average thermal transmittance 0.14 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.17 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.13 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "status": "entered", + "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": "AA1 1AA", + "data_type": 2, + "hot_water": { + "description": "From main system, plus solar", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 5 + }, + "post_town": "Town", + "built_form": 1, + "living_area": 44.4, + "orientation": 0, + "region_code": 16, + "report_type": 3, + "sap_heating": { + "has_solar_panel": "true", + "water_fuel_type": 39, + "solar_store_volume": 100, + "water_heating_code": 901, + "secondary_fuel_type": 20, + "hot_water_store_size": 300, + "main_heating_details": [ + { + "main_fuel_type": 39, + "heat_emitter_type": 2, + "main_heating_code": 201, + "main_heating_number": 1, + "main_heating_control": 2207, + "main_heating_category": 4, + "main_heating_fraction": 1, + "main_heating_data_source": 3, + "has_delayed_start_thermostat": "false", + "load_or_weather_compensation": 0, + "underfloor_heat_emitter_type": 2, + "is_main_heating_hetas_approved": "false", + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "true", + "has_solar_powered_pump": "false", + "secondary_heating_code": 633, + "has_cylinder_thermostat": "true", + "solar_panel_aperture_area": 5.26, + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 10, + "solar_panel_collector_type": 3, + "is_cylinder_in_heated_space": "true", + "solar_panel_collector_pitch": 3, + "is_hot_water_separately_timed": "true", + "is_primary_pipework_insulated": "true", + "secondary_heating_data_source": 3, + "hot_water_store_insulation_type": 1, + "hot_water_store_heat_loss_source": 3, + "is_solar_store_combined_cylinder": "true", + "solar_panel_collector_data_source": 2, + "solar_panel_collector_orientation": 3, + "solar_panel_collector_overshading": 1, + "is_heat_pump_assisted_by_immersion": "false", + "is_secondary_heating_hetas_approved": "false", + "hot_water_store_insulation_thickness": 80, + "solar_panel_collector_heat_loss_rate": 3, + "solar_panel_collector_zero_loss_efficiency": 60 + }, + "sap_version": 9.9, + "schema_type": "SAP-Schema-16.2", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": "Ground source heat pump, underfloor, electric", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 5 + } + ], + "air_tightness": { + "description": "Air permeability 6.4 m³/h.m² (as tested)", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "dwelling_type": "Detached house", + "language_code": 1, + "property_type": 0, + "address_line_1": "17, Street Terrace", + "schema_version": "LIG-16.0", + "assessment_date": "2013-02-06", + "assessment_type": "SAP", + "completion_date": "2013-02-06", + "inspection_date": "2013-02-06", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 1, + "air_permeability": 6.373, + "open_flues_count": 0, + "ventilation_type": 1, + "extract_fans_count": 9, + "open_fireplaces_count": 0, + "sheltered_sides_count": 0, + "flueless_gas_fires_count": 0 + }, + "total_floor_area": 709, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2013-02-06", + "restricted_access": 0, + "sap_energy_source": { + "pv_arrays": [ + { + "pitch": 3, + "peak_power": 3.6, + "orientation": 5, + "overshading": 1 + } + ], + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 3, + "fixed_lighting_outlets_count": 40, + "low_energy_fixed_lighting_outlets_count": 40, + "low_energy_fixed_lighting_outlets_percentage": 100 + }, + "sap_opening_types": [ + { + "name": 1, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D7", + "glazing_type": 6 + }, + { + "name": 2, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D12", + "glazing_type": 6 + }, + { + "name": 3, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W27", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 4, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W28A", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 5, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W29A", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 6, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W30", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 7, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W31", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 8, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W32", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 9, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W25", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 10, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W26", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 11, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D3", + "glazing_type": 6 + }, + { + "name": 12, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D11", + "glazing_type": 6 + }, + { + "name": 13, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W34", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 14, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W33", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 15, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W20", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 16, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W21", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 17, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W35", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 18, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W36", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 19, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W37", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 20, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W22", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 21, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W23", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 22, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W24", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 23, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W24A", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 24, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W38", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 25, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W39", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 26, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W40", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 27, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W41", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 28, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W42", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 29, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W1A", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 30, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W2A", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 31, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W1B", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 32, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W2B", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 33, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W18", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 34, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W19", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 35, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D4", + "glazing_type": 6 + }, + { + "name": 36, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D6", + "glazing_type": 6 + }, + { + "name": 37, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D5", + "glazing_type": 6 + }, + { + "name": 38, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D9", + "glazing_type": 6 + }, + { + "name": 39, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D10", + "glazing_type": 6 + }, + { + "name": 40, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W17", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 41, + "type": 5, + "u_value": 1.4, + "data_source": 2, + "description": "W14", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 42, + "type": 5, + "u_value": 1.4, + "data_source": 2, + "description": "W16", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 43, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D1", + "glazing_type": 6 + }, + { + "name": 44, + "type": 2, + "u_value": 1.4, + "data_source": 2, + "description": "D2", + "glazing_type": 6 + }, + { + "name": 45, + "type": 1, + "u_value": 1.4, + "data_source": 2, + "description": "D8", + "glazing_type": 1 + }, + { + "name": 46, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W9", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 47, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W29", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 48, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W28", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 49, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W13", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 50, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W9A", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 51, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W15", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 52, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WF", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 53, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WG", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 54, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WH", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 55, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WI", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 56, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WJ", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 57, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W30A", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 58, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W31A", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 59, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WLL", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 60, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WMM", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 61, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WAA", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 62, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WBB", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 63, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WCC", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 64, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WDD", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 65, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WO", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 66, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WP", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 67, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WQ", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 68, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W1", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 69, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W10", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 70, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W2", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 71, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W3", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 72, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W4", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 73, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W5", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 74, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W6", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 75, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W7", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 76, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W11", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 77, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "W12", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 78, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WA", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 79, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WB", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 80, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WC", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 81, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WD", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 82, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WE", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 83, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WK", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 84, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WL", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 85, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WM", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 86, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WN", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 87, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WFF", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 88, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WGG", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 89, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WHH", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 90, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WII", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 91, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WJJ", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 92, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WKK", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 93, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WR", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 94, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WS", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 95, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WT", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 96, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WU", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 97, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WV", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 98, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WW", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 99, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WX", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 100, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WY", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + }, + { + "name": 101, + "type": 4, + "u_value": 1.4, + "data_source": 2, + "description": "WZ", + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + } + ], + "secondary_heating": { + "description": "Room heaters, wood logs", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 4, + 7, + 10, + 11 + ], + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof 1", + "u_value": 0.129, + "roof_type": 2, + "description": "Roof 1 ZINC FLAT", + "total_roof_area": 145 + }, + { + "name": "Roof 2", + "u_value": 0.139, + "roof_type": 2, + "description": "Roof 2 THATCH ROOF", + "total_roof_area": 93.03 + }, + { + "name": "Roof 3", + "u_value": 0.19, + "roof_type": 2, + "description": "Roof 3 DORMER", + "total_roof_area": 4.8 + }, + { + "name": "Roof 4", + "u_value": 0.151, + "roof_type": 2, + "description": "Roof 4 SLATE", + "total_roof_area": 157.54 + } + ], + "sap_walls": [ + { + "name": "Wall 1", + "u_value": 0.166, + "wall_type": 2, + "description": "Wall 1 BRICK & FLINT", + "total_wall_area": 407.31, + "is_curtain_walling": "false" + }, + { + "name": "Wall 2", + "u_value": 0.168, + "wall_type": 1, + "description": "Wall 2 CONCRETE", + "total_wall_area": 122.42, + "is_curtain_walling": "false" + }, + { + "name": "Wall 3", + "u_value": 0.181, + "wall_type": 2, + "description": "Wall 3 INT WALL", + "total_wall_area": 17.33, + "is_curtain_walling": "false" + }, + { + "name": "Wall 4", + "u_value": 0.158, + "wall_type": 2, + "description": "Wall 4 TF", + "total_wall_area": 236.58, + "is_curtain_walling": "false" + } + ], + "identifier": "Main Dwelling", + "overshading": 1, + "sap_openings": [ + { + "name": 1, + "type": 1, + "width": 0.91, + "height": 2.1, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 2, + "type": 2, + "width": 0.91, + "height": 2.1, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 3, + "type": 3, + "width": 3.99, + "height": 0.78, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 4, + "type": 4, + "width": 3.33, + "height": 0.97, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 5, + "type": 5, + "width": 3.17, + "height": 0.97, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 6, + "type": 6, + "width": 1.28, + "height": 0.97, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 7, + "type": 7, + "width": 2.31, + "height": 0.97, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 8, + "type": 8, + "width": 2.31, + "height": 0.97, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 9, + "type": 9, + "width": 5.86, + "height": 1.36, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 10, + "type": 10, + "width": 3.95, + "height": 1.36, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 11, + "type": 11, + "width": 1.68, + "height": 2.75, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 12, + "type": 12, + "width": 1.99, + "height": 2.2, + "location": "Wall 4", + "orientation": 0 + }, + { + "name": 13, + "type": 13, + "width": 1.24, + "height": 0.95, + "location": "Wall 1", + "orientation": 8 + }, + { + "name": 14, + "type": 14, + "width": 1.99, + "height": 0.95, + "location": "Wall 1", + "orientation": 2 + }, + { + "name": 15, + "type": 15, + "width": 2.92, + "height": 2.09, + "location": "Wall 4", + "orientation": 2 + }, + { + "name": 16, + "type": 16, + "width": 1.38, + "height": 2.09, + "location": "Wall 4", + "orientation": 4 + }, + { + "name": 17, + "type": 17, + "width": 1.36, + "height": 2.4, + "location": "Wall 4", + "orientation": 1 + }, + { + "name": 18, + "type": 18, + "width": 2.09, + "height": 2.4, + "location": "Wall 4", + "orientation": 3 + }, + { + "name": 19, + "type": 19, + "width": 1.88, + "height": 2.4, + "location": "Wall 4", + "orientation": 3 + }, + { + "name": 20, + "type": 20, + "width": 0.68, + "height": 0.99, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 21, + "type": 21, + "width": 0.68, + "height": 0.99, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 22, + "type": 22, + "width": 0.68, + "height": 0.99, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 23, + "type": 23, + "width": 0.68, + "height": 0.99, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 24, + "type": 24, + "width": 0.54, + "height": 0.99, + "location": "Wall 1", + "orientation": 5 + }, + { + "name": 25, + "type": 25, + "width": 0.54, + "height": 0.99, + "location": "Wall 1", + "orientation": 5 + }, + { + "name": 26, + "type": 26, + "width": 0.54, + "height": 0.99, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 27, + "type": 27, + "width": 0.54, + "height": 0.99, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 28, + "type": 28, + "width": 0.54, + "height": 0.99, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 29, + "type": 29, + "width": 1.45, + "height": 1.42, + "location": "Wall 4", + "orientation": 3 + }, + { + "name": 30, + "type": 30, + "width": 1.68, + "height": 1.42, + "location": "Wall 4", + "orientation": 3 + }, + { + "name": 31, + "type": 31, + "width": 1.45, + "height": 1.42, + "location": "Wall 4", + "orientation": 5 + }, + { + "name": 32, + "type": 32, + "width": 1.68, + "height": 1.42, + "location": "Wall 4", + "orientation": 1 + }, + { + "name": 33, + "type": 33, + "width": 1.35, + "height": 2.09, + "location": "Wall 4", + "orientation": 2 + }, + { + "name": 34, + "type": 34, + "width": 1.35, + "height": 2.09, + "location": "Wall 4", + "orientation": 2 + }, + { + "name": 35, + "type": 35, + "width": 3.84, + "height": 2.8, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 36, + "type": 36, + "width": 4.74, + "height": 2.8, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 37, + "type": 37, + "width": 2.81, + "height": 2.8, + "location": "Wall 4", + "orientation": 0 + }, + { + "name": 38, + "type": 38, + "width": 6.45, + "height": 2.4, + "location": "Wall 4", + "orientation": 0 + }, + { + "name": 39, + "type": 39, + "width": 3.84, + "height": 2.4, + "location": "Wall 4", + "orientation": 0 + }, + { + "name": 40, + "type": 40, + "width": 1.4, + "height": 2.76, + "location": "Wall 1", + "orientation": 2 + }, + { + "name": 41, + "type": 41, + "width": 0.6, + "height": 0.89, + "location": "Roof 2", + "orientation": 8 + }, + { + "name": 42, + "type": 42, + "width": 7.25, + "height": 0.89, + "location": "Roof 2", + "orientation": 4 + }, + { + "name": 43, + "type": 43, + "width": 1.81, + "height": 2.1, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 44, + "type": 44, + "width": 2.49, + "height": 2.1, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 45, + "type": 45, + "width": 3.08, + "height": 2.62, + "location": "Wall 1", + "orientation": 0 + }, + { + "name": 46, + "type": 46, + "width": 1.68, + "height": 1.36, + "location": "Wall 1", + "orientation": 2 + }, + { + "name": 47, + "type": 47, + "width": 1.18, + "height": 2.44, + "location": "Wall 4", + "orientation": 3 + }, + { + "name": 48, + "type": 48, + "width": 1.18, + "height": 1.23, + "location": "Wall 4", + "orientation": 3 + }, + { + "name": 49, + "type": 49, + "width": 4.27, + "height": 2.85, + "location": "Wall 1", + "orientation": 2 + }, + { + "name": 50, + "type": 50, + "width": 1.68, + "height": 4.15, + "location": "Wall 1", + "orientation": 2 + }, + { + "name": 51, + "type": 51, + "width": 1.74, + "height": 2.62, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 52, + "type": 52, + "width": 2.36, + "height": 0.38, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 53, + "type": 53, + "width": 1.5, + "height": 0.38, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 54, + "type": 54, + "width": 0.7, + "height": 0.38, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 55, + "type": 55, + "width": 0.92, + "height": 0.38, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 56, + "type": 56, + "width": 0.9, + "height": 0.38, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 57, + "type": 57, + "width": 1.18, + "height": 2.98, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 58, + "type": 58, + "width": 1.18, + "height": 2.98, + "location": "Wall 1", + "orientation": 3 + }, + { + "name": 59, + "type": 59, + "width": 0.62, + "height": 0.38, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 60, + "type": 60, + "width": 1.69, + "height": 0.38, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 61, + "type": 61, + "width": 2.38, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 62, + "type": 62, + "width": 1.13, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 63, + "type": 63, + "width": 0.73, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 64, + "type": 64, + "width": 1.94, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 65, + "type": 65, + "width": 1.39, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 66, + "type": 66, + "width": 1.59, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 67, + "type": 67, + "width": 1.65, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 68, + "type": 68, + "width": 0.46, + "height": 0.54, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 69, + "type": 69, + "width": 0.46, + "height": 0.54, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 70, + "type": 70, + "width": 1.14, + "height": 1.06, + "location": "Wall 1", + "orientation": 8 + }, + { + "name": 71, + "type": 71, + "width": 1.14, + "height": 1.06, + "location": "Wall 1", + "orientation": 8 + }, + { + "name": 72, + "type": 72, + "width": 1.14, + "height": 1.06, + "location": "Wall 1", + "orientation": 8 + }, + { + "name": 73, + "type": 73, + "width": 1.14, + "height": 1.06, + "location": "Wall 1", + "orientation": 8 + }, + { + "name": 74, + "type": 74, + "width": 1.14, + "height": 1.06, + "location": "Wall 1", + "orientation": 4 + }, + { + "name": 75, + "type": 75, + "width": 1.14, + "height": 1.06, + "location": "Wall 1", + "orientation": 4 + }, + { + "name": 76, + "type": 76, + "width": 2, + "height": 1.09, + "location": "Wall 4", + "orientation": 8 + }, + { + "name": 77, + "type": 77, + "width": 2, + "height": 1.09, + "location": "Wall 4", + "orientation": 8 + }, + { + "name": 78, + "type": 78, + "width": 0.76, + "height": 0.38, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 79, + "type": 79, + "width": 0.76, + "height": 0.38, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 80, + "type": 80, + "width": 0.76, + "height": 0.38, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 81, + "type": 81, + "width": 2.57, + "height": 0.38, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 82, + "type": 82, + "width": 2.57, + "height": 0.38, + "location": "Wall 4", + "orientation": 6 + }, + { + "name": 83, + "type": 83, + "width": 0.88, + "height": 0.38, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 84, + "type": 84, + "width": 0.88, + "height": 0.38, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 85, + "type": 85, + "width": 0.88, + "height": 0.38, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 86, + "type": 86, + "width": 0.88, + "height": 0.38, + "location": "Wall 1", + "orientation": 6 + }, + { + "name": 87, + "type": 87, + "width": 1.28, + "height": 0.38, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 88, + "type": 88, + "width": 1.28, + "height": 0.38, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 89, + "type": 89, + "width": 1.28, + "height": 0.38, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 90, + "type": 90, + "width": 1.35, + "height": 0.38, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 91, + "type": 91, + "width": 1.35, + "height": 0.38, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 92, + "type": 92, + "width": 1.35, + "height": 0.38, + "location": "Wall 4", + "orientation": 7 + }, + { + "name": 93, + "type": 93, + "width": 0.55, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 94, + "type": 94, + "width": 0.55, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 95, + "type": 95, + "width": 0.55, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 96, + "type": 96, + "width": 0.55, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 97, + "type": 97, + "width": 0.55, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 98, + "type": 98, + "width": 0.92, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 99, + "type": 99, + "width": 0.92, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 100, + "type": 100, + "width": 1.23, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + }, + { + "name": 101, + "type": 101, + "width": 1.23, + "height": 0.38, + "location": "Wall 1", + "orientation": 7 + } + ], + "construction_year": 2010, + "sap_thermal_bridges": { + "thermal_bridge_code": 1 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.13, + "floor_type": 1, + "description": "Floor 1", + "storey_height": 2.65, + "heat_loss_area": 341.2, + "total_floor_area": 127.88 + }, + { + "storey": 1, + "u_value": 0, + "floor_type": 3, + "storey_height": 2.88, + "heat_loss_area": 0, + "total_floor_area": 213.32 + }, + { + "storey": 2, + "u_value": 0, + "floor_type": 3, + "storey_height": 3.07, + "heat_loss_area": 0, + "total_floor_area": 347.69 + }, + { + "storey": 3, + "u_value": 0, + "floor_type": 3, + "storey_height": 2.3, + "heat_loss_area": 0, + "total_floor_area": 20.45 + } + ], + "thermal_mass_parameter": 250 + } + ], + "bedf_revision_number": 333, + "heating_cost_current": 2132, + "co2_emissions_current": 6.5, + "energy_rating_average": 60, + "energy_rating_current": 85, + "lighting_cost_current": 154, + "main_heating_controls": [ + { + "description": "Time and temperature zone control", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": 2132, + "hot_water_cost_current": 105, + "co2_emissions_potential": 6.5, + "energy_rating_potential": 85, + "lighting_cost_potential": 154, + "hot_water_cost_potential": 105, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 41938, + "water_heating": 2876 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 63, + "has_fixed_air_conditioning": "false", + "calculation_software_version": 5.4, + "energy_consumption_potential": 63, + "environmental_impact_current": 88, + "current_energy_efficiency_band": "B", + "environmental_impact_potential": 88, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "B", + "co2_emissions_current_per_floor_area": 9 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-16.3/rdsap.json b/backend/epc_api/json_samples/SAP-Schema-16.3/rdsap.json new file mode 100644 index 00000000..caa7b681 --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-16.3/rdsap.json @@ -0,0 +1,371 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Pitched, 200 mm loft insulation", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "walls": [ + { + "description": "Cavity wall, as built, insulated (assumed)", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "floors": [ + { + "description": "Suspended, no insulation (assumed)", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + } + ], + "status": "entered", + "tenure": 2, + "windows": [ + { + "description": "Fully double glazed", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 3 + } + ], + "lighting": { + "description": "Low energy lighting in 71% of fixed outlets", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "postcode": "AA1 1AA", + "hot_water": { + "description": "Electric immersion, off-peak", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1 + }, + "post_town": "Town", + "built_form": 2, + "door_count": 2, + "glazed_area": 1, + "region_code": 6, + "report_type": 2, + "sap_heating": { + "wwhrs": { + "rooms_with_bath_and_or_shower": 1, + "rooms_with_mixer_shower_no_bath": 0, + "rooms_with_bath_and_mixer_shower": 0 + }, + "cylinder_size": 4, + "water_heating_code": 903, + "water_heating_fuel": 29, + "secondary_fuel_type": 29, + "main_heating_details": [ + { + "has_fghrs": "N", + "main_fuel_type": 29, + "heat_emitter_type": 0, + "main_heating_number": 1, + "main_heating_control": 2401, + "main_heating_category": 7, + "main_heating_fraction": 1, + "sap_main_heating_code": 401, + "main_heating_data_source": 2 + } + ], + "immersion_heating_type": 1, + "secondary_heating_type": 691, + "cylinder_insulation_type": 2, + "has_fixed_air_conditioning": "false", + "cylinder_insulation_thickness": 25 + }, + "sap_version": 9.91, + "schema_type": "SAP-Schema-16.3", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": "Electric storage heaters", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 1 + } + ], + "dwelling_type": "Semi-detached house", + "language_code": 1, + "property_type": 0, + "address_line_1": "11, Some Close", + "address_line_2": "Long Itchington", + "schema_version": "LIG-16.1", + "assessment_type": "RdSAP", + "completion_date": "2014-12-06", + "inspection_date": "2014-12-05", + "extensions_count": 0, + "measurement_type": 1, + "total_floor_area": 70, + "transaction_type": 8, + "conservatory_type": 1, + "heated_room_count": 3, + "registration_date": "2014-12-06", + "restricted_access": 0, + "sap_energy_source": { + "main_gas": "N", + "meter_type": 1, + "photovoltaic_supply": { + "percent_roof_area": 0 + }, + "wind_turbines_count": 0, + "wind_turbines_terrain_type": 2 + }, + "secondary_heating": { + "description": "Room heaters, electric", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 9 + ], + "sap_building_parts": [ + { + "identifier": "Main Dwelling", + "wall_dry_lined": "N", + "wall_thickness": 270, + "floor_heat_loss": 7, + "roof_construction": 4, + "wall_construction": 4, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "floor": 0, + "room_height": 2.3, + "floor_insulation": 1, + "total_floor_area": 35.159, + "floor_construction": 3, + "heat_loss_perimeter": 16.837 + }, + { + "floor": 1, + "room_height": 2.3, + "total_floor_area": 35.159, + "heat_loss_perimeter": 16.837 + } + ], + "wall_insulation_type": 4, + "construction_age_band": "H", + "wall_thickness_measured": "Y", + "roof_insulation_location": 2, + "roof_insulation_thickness": "200mm" + } + ], + "low_energy_lighting": 71, + "solar_water_heating": "N", + "bedf_revision_number": 370, + "habitable_room_count": 3, + "heating_cost_current": { + "value": 611, + "currency": "GBP" + }, + "insulated_door_count": 0, + "co2_emissions_current": 5.9, + "energy_rating_average": 60, + "energy_rating_current": 59, + "lighting_cost_current": { + "value": 65, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Manual charge control", + "energy_efficiency_rating": 2, + "environmental_efficiency_rating": 2 + } + ], + "multiple_glazing_type": 1, + "open_fireplaces_count": 0, + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 471, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 226, + "currency": "GBP" + }, + "mechanical_ventilation": 0, + "percent_draughtproofed": 100, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 88, + "currency": "GBP" + }, + "indicative_cost": "£800 - £1,200", + "improvement_type": "W", + "improvement_details": { + "improvement_number": 47 + }, + "improvement_category": 5, + "energy_performance_rating": 63, + "environmental_impact_rating": 41 + }, + { + "sequence": 2, + "typical_saving": { + "value": 35, + "currency": "GBP" + }, + "indicative_cost": "£15 - £30", + "improvement_type": "C", + "improvement_details": { + "improvement_number": 2 + }, + "improvement_category": 5, + "energy_performance_rating": 65, + "environmental_impact_rating": 43 + }, + { + "sequence": 3, + "typical_saving": { + "value": 11, + "currency": "GBP" + }, + "indicative_cost": "£10", + "improvement_type": "E", + "improvement_details": { + "improvement_number": 35 + }, + "improvement_category": 5, + "energy_performance_rating": 65, + "environmental_impact_rating": 44 + }, + { + "sequence": 4, + "typical_saving": { + "value": 100, + "currency": "GBP" + }, + "indicative_cost": "£900 - £1,200", + "improvement_type": "L", + "improvement_details": { + "improvement_number": 25 + }, + "improvement_category": 5, + "energy_performance_rating": 69, + "environmental_impact_rating": 47 + }, + { + "sequence": 5, + "typical_saving": { + "value": 44, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 71, + "environmental_impact_rating": 52 + }, + { + "sequence": 6, + "typical_saving": { + "value": 261, + "currency": "GBP" + }, + "indicative_cost": "£9,000 - £14,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 83, + "environmental_impact_rating": 62 + }, + { + "sequence": 7, + "typical_saving": { + "value": 22, + "currency": "GBP" + }, + "indicative_cost": "£1,500 - £4,000", + "improvement_type": "V", + "improvement_details": { + "improvement_number": 44 + }, + "improvement_category": 5, + "energy_performance_rating": 84, + "environmental_impact_rating": 63 + } + ], + "co2_emissions_potential": 3.1, + "energy_rating_potential": 84, + "lighting_cost_potential": { + "value": 51, + "currency": "GBP" + }, + "alternative_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 50, + "currency": "GBP" + }, + "improvement_type": "J2", + "improvement_details": { + "improvement_number": 54 + }, + "improvement_category": 6, + "energy_performance_rating": 68, + "environmental_impact_rating": 88 + }, + { + "sequence": 2, + "typical_saving": { + "value": 178, + "currency": "GBP" + }, + "improvement_type": "Z1", + "improvement_details": { + "improvement_number": 51 + }, + "improvement_category": 6, + "energy_performance_rating": 75, + "environmental_impact_rating": 76 + }, + { + "sequence": 3, + "typical_saving": { + "value": 179, + "currency": "GBP" + }, + "improvement_type": "Z3", + "improvement_details": { + "improvement_number": 53 + }, + "improvement_category": 6, + "energy_performance_rating": 73, + "environmental_impact_rating": 72 + } + ], + "hot_water_cost_potential": { + "value": 105, + "currency": "GBP" + }, + "renewable_heat_incentive": { + "water_heating": 3424, + "space_heating_existing_dwelling": 7554 + }, + "seller_commission_report": "Y", + "energy_consumption_current": 473, + "has_fixed_air_conditioning": "false", + "multiple_glazed_proportion": 100, + "calculation_software_version": 8.3, + "energy_consumption_potential": 247, + "environmental_impact_current": 37, + "fixed_lighting_outlets_count": 7, + "current_energy_efficiency_band": "D", + "environmental_impact_potential": 63, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "B", + "co2_emissions_current_per_floor_area": 84, + "low_energy_fixed_lighting_outlets_count": 5 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-16.3/sap.json b/backend/epc_api/json_samples/SAP-Schema-16.3/sap.json new file mode 100644 index 00000000..d5005cc7 --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-16.3/sap.json @@ -0,0 +1,456 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Average thermal transmittance 0.12 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.28 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.17 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "status": "entered", + "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": "AA1 1AA", + "data_type": 2, + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Town", + "built_form": 4, + "living_area": 20.15, + "orientation": 7, + "region_code": 3, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "has_solar_panel": "false", + "water_fuel_type": 1, + "water_heating_code": 901, + "hot_water_store_size": 180, + "main_heating_details": [ + { + "burner_control": 3, + "main_fuel_type": 1, + "heat_emitter_type": 1, + "boiler_index_number": 16179, + "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, + "main_heating_data_source": 1, + "has_delayed_start_thermostat": "true", + "load_or_weather_compensation": 2, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "true", + "has_cylinder_thermostat": "true", + "hot_water_store_heat_loss": 1.63, + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1, + "is_cylinder_in_heated_space": "true", + "is_hot_water_separately_timed": "true", + "is_primary_pipework_insulated": "true", + "hot_water_store_heat_loss_source": 2 + }, + "sap_version": 9.9, + "schema_type": "SAP-Schema-16.3", + "uprn_source": "Energy Assessor", + "country_code": "EAW", + "main_heating": [ + { + "description": "Boiler and radiators, mains gas", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "air_tightness": { + "description": "Air permeability 3.9 m³/h.m² (assumed)", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "property_type": 0, + "address_line_1": "17, Street Terrace", + "schema_version": "LIG-16.0", + "assessment_date": "2014-04-04", + "assessment_type": "SAP", + "completion_date": "2014-04-04", + "inspection_date": "2014-04-04", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 1, + "air_permeability": 3.89, + "open_flues_count": 0, + "ventilation_type": 1, + "extract_fans_count": 3, + "open_fireplaces_count": 0, + "sheltered_sides_count": 2, + "flueless_gas_fires_count": 0 + }, + "design_water_use": 1, + "total_floor_area": 96, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2014-04-05", + "restricted_access": 0, + "sap_energy_source": { + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 1, + "fixed_lighting_outlets_count": 16, + "low_energy_fixed_lighting_outlets_count": 16, + "low_energy_fixed_lighting_outlets_percentage": 100 + }, + "sap_opening_types": [ + { + "name": "Doors (1)", + "type": 1, + "u_value": 1.4, + "data_source": 3, + "glazing_type": 1 + }, + { + "name": "Doors (2)", + "type": 1, + "u_value": 1.5, + "data_source": 2, + "glazing_type": 1 + }, + { + "name": "Windows (1)", + "type": 4, + "u_value": 1.5, + "data_source": 2, + "frame_factor": 0.7, + "glazing_type": 6, + "solar_transmittance": 0.63 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 9 + ], + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof (1)", + "u_value": 0.11, + "roof_type": 2, + "description": "Pitched roof insulation at ceiling level", + "kappa_value": 8.75, + "total_roof_area": 41.96 + }, + { + "name": "Roof (2)", + "u_value": 0.2, + "roof_type": 2, + "description": "Flat roof - internal insulation", + "kappa_value": 8.75, + "total_roof_area": 4.69 + } + ], + "sap_walls": [ + { + "name": "Walls (1)", + "u_value": 0.29, + "wall_type": 2, + "description": "Masonry cavity wall", + "kappa_value": 46.25, + "total_wall_area": 26.5, + "is_curtain_walling": "false" + }, + { + "name": "Walls (2)", + "u_value": 0.28, + "wall_type": 2, + "description": "Timber frame wall", + "kappa_value": 8.75, + "total_wall_area": 48, + "is_curtain_walling": "false" + }, + { + "name": "Walls (3)", + "u_value": 0.22, + "wall_type": 3, + "description": "Insulated wall to garage", + "kappa_value": 8.75, + "total_wall_area": 7.29, + "is_curtain_walling": "false" + }, + { + "name": "Party wall (1)", + "u_value": 0, + "wall_type": 4, + "kappa_value": 17.5, + "total_wall_area": 48.6 + } + ], + "identifier": "Main Dwelling", + "overshading": 2, + "sap_openings": [ + { + "name": 1, + "type": "Doors (2)", + "width": 2.69, + "height": 2.1, + "location": "Walls (2)", + "orientation": 7 + }, + { + "name": 2, + "type": "Windows (1)", + "width": 0.46, + "height": 1.88, + "location": "Walls (2)", + "orientation": 7 + }, + { + "name": 3, + "type": "Windows (1)", + "width": 0.67, + "height": 0.9, + "location": "Walls (2)", + "orientation": 3 + }, + { + "name": 4, + "type": "Windows (1)", + "width": 0.46, + "height": 1.88, + "location": "Walls (2)", + "orientation": 7 + }, + { + "name": 5, + "type": "Windows (1)", + "width": 1.45, + "height": 1.35, + "location": "Walls (2)", + "orientation": 3 + }, + { + "name": 6, + "type": "Windows (1)", + "width": 1.45, + "height": 1.35, + "location": "Walls (2)", + "orientation": 3 + }, + { + "name": 7, + "type": "Doors (1)", + "width": 1.01, + "height": 2, + "location": "Walls (3)", + "orientation": 0 + }, + { + "name": 8, + "type": "Doors (2)", + "width": 1.74, + "height": 2.1, + "location": "Walls (2)", + "orientation": 7 + }, + { + "name": 9, + "type": "Doors (2)", + "width": 1.79, + "height": 2.1, + "location": "Walls (2)", + "orientation": 3 + }, + { + "name": 10, + "type": "Doors (1)", + "width": 1.01, + "height": 2.1, + "location": "Walls (1)", + "orientation": 0 + } + ], + "construction_year": 2013, + "sap_thermal_bridges": { + "thermal_bridges": [ + { + "length": 9.8, + "psi_value": 0.06, + "psi_value_source": 2, + "thermal_bridge_type": 10 + }, + { + "length": 4.2, + "psi_value": 0.04, + "psi_value_source": 2, + "thermal_bridge_type": 19 + }, + { + "length": 2.6, + "psi_value": 0.28, + "psi_value_source": 2, + "thermal_bridge_type": 20 + }, + { + "length": 6, + "psi_value": 0.08, + "psi_value_source": 2, + "thermal_bridge_type": 22 + }, + { + "length": 33.6, + "psi_value": 0, + "psi_value_source": 2, + "thermal_bridge_type": 23 + }, + { + "length": 25.86, + "psi_value": 0.05, + "psi_value_source": 2, + "thermal_bridge_type": 4 + }, + { + "length": 12.73, + "psi_value": 0.3, + "psi_value_source": 2, + "thermal_bridge_type": 2 + }, + { + "length": 12.73, + "psi_value": 0.04, + "psi_value_source": 2, + "thermal_bridge_type": 3 + } + ], + "thermal_bridge_code": 5 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.16, + "floor_type": 2, + "kappa_value": 30, + "storey_height": 2.4, + "heat_loss_area": 11.8, + "total_floor_area": 11.72 + }, + { + "storey": 1, + "u_value": 0.17, + "floor_type": 3, + "kappa_value": 30, + "storey_height": 2.4, + "heat_loss_area": 24.68, + "total_floor_area": 41.95 + }, + { + "storey": 2, + "u_value": 0, + "floor_type": 4, + "kappa_value": 0, + "storey_height": 2.4, + "heat_loss_area": 0, + "total_floor_area": 41.95 + } + ] + } + ], + "bedf_revision_number": 333, + "heating_cost_current": 260, + "co2_emissions_current": 1.5, + "energy_rating_average": 60, + "energy_rating_current": 83, + "lighting_cost_current": 64, + "main_heating_controls": [ + { + "description": "Time and temperature zone control", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": 260, + "hot_water_cost_current": 93, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": 37, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 3, + "energy_performance_rating": 84, + "environmental_impact_rating": 88 + }, + { + "sequence": 2, + "typical_saving": 226, + "indicative_cost": "£11,000 - £20,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 3, + "energy_performance_rating": 94, + "environmental_impact_rating": 96 + } + ], + "co2_emissions_potential": 1.5, + "energy_rating_potential": 83, + "lighting_cost_potential": 64, + "hot_water_cost_potential": 93, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 3127, + "water_heating": 2230 + } + }, + "seller_commission_report": "N", + "energy_consumption_current": 85, + "has_fixed_air_conditioning": "false", + "calculation_software_version": 3.59, + "energy_consumption_potential": 85, + "environmental_impact_current": 85, + "current_energy_efficiency_band": "B", + "environmental_impact_potential": 85, + "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/backend/epc_api/json_samples/SAP-Schema-17.0/epc.json b/backend/epc_api/json_samples/SAP-Schema-17.0/epc.json new file mode 100644 index 00000000..12957001 --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-17.0/epc.json @@ -0,0 +1,375 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Average thermal transmittance 0.14 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.28 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.19 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "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": "PT34 5BG", + "data_type": 2, + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "POSTTOWN", + "built_form": 1, + "living_area": 18.13, + "orientation": 1, + "region_code": 6, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "water_fuel_type": 1, + "water_heating_code": 901, + "hot_water_store_size": 180, + "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": 10321, + "has_separate_delayed_start": "false", + "load_or_weather_compensation": 0, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "true", + "has_cylinder_thermostat": "true", + "hot_water_store_heat_loss": 1.48, + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1, + "is_cylinder_in_heated_space": "true", + "primary_pipework_insulation": 4, + "is_hot_water_separately_timed": "true", + "hot_water_store_heat_loss_source": 2 + }, + "sap_version": 9.92, + "schema_type": "SAP-Schema-17.0", + "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 4.9 m³/h.m² (as tested)", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "dwelling_type": "Detached house", + "language_code": 1, + "property_type": 0, + "address_line_1": "2, Place Park", + "address_line_2": "Central District", + "assessment_date": "2013-07-08", + "assessment_type": "SAP", + "completion_date": "2015-06-30", + "inspection_date": "2015-06-30", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 1, + "air_permeability": 4.94, + "open_flues_count": 0, + "ventilation_type": 1, + "extract_fans_count": 5, + "open_fireplaces_count": 0, + "sheltered_sides_count": 2, + "flueless_gas_fires_count": 0 + }, + "sap_data_version": 9.9, + "sap_flat_details": { + "level": 1 + }, + "total_floor_area": 139, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2015-06-30", + "sap_energy_source": { + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 1, + "fixed_lighting_outlets_count": 20, + "low_energy_fixed_lighting_outlets_count": 20, + "low_energy_fixed_lighting_outlets_percentage": 100 + }, + "sap_opening_types": [ + { + "name": "Opening Type 1", + "type": 4, + "u_value": 1.5, + "data_source": 2, + "frame_factor": 0.7, + "glazing_type": 3, + "solar_transmittance": 0.76 + }, + { + "name": "Opening Type 2", + "type": 5, + "u_value": 1.5, + "data_source": 2, + "frame_factor": 0.7, + "glazing_type": 3, + "solar_transmittance": 0.76 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 10 + ], + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof 1", + "u_value": 0.14, + "roof_type": 2, + "description": "External Roof 1", + "total_roof_area": 69.63 + } + ], + "sap_walls": [ + { + "name": "External Wall 1", + "u_value": 0.28, + "wall_type": 2, + "description": "External Wall 1", + "total_wall_area": 197.76, + "is_curtain_walling": "false" + } + ], + "identifier": "Main Dwelling", + "overshading": 2, + "sap_openings": [ + { + "name": "Opening 1", + "type": "Opening Type 1", + "width": 7.47, + "height": 1, + "location": "External Wall 1", + "orientation": 1 + }, + { + "name": "Opening 2", + "type": "Opening Type 1", + "width": 6.88, + "height": 1, + "location": "External Wall 1", + "orientation": 5 + }, + { + "name": "Opening 3", + "type": "Opening Type 1", + "width": 5.44, + "height": 1, + "location": "External Wall 1", + "orientation": 7 + }, + { + "name": "Opening 4", + "type": "Opening Type 1", + "width": 6.88, + "height": 1, + "location": "External Wall 1", + "orientation": 3 + }, + { + "name": "Opening 5", + "type": "Opening Type 2", + "pitch": 35, + "width": 1.77, + "height": 1, + "location": "Roof 1", + "orientation": 7 + }, + { + "name": "Opening 6", + "type": "Opening Type 2", + "pitch": 35, + "width": 0.59, + "height": 1, + "location": "Roof 1", + "orientation": 3 + } + ], + "construction_year": 2013, + "sap_thermal_bridges": { + "thermal_bridges": [ + { + "length": 41.2, + "psi_value": 0.32, + "psi_value_source": 4, + "thermal_bridge_type": "E5" + }, + { + "length": 41.2, + "psi_value": 0.14, + "psi_value_source": 4, + "thermal_bridge_type": "E6" + }, + { + "length": 19.2, + "psi_value": 0.18, + "psi_value_source": 4, + "thermal_bridge_type": "E16" + } + ], + "thermal_bridge_code": 5 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.19, + "floor_type": 2, + "description": "Heat Loss Floor 1", + "storey_height": 2.4, + "heat_loss_area": 69.63, + "total_floor_area": 69.63 + }, + { + "storey": 1, + "u_value": 0, + "floor_type": 3, + "storey_height": 2.4, + "heat_loss_area": 0, + "total_floor_area": 69.63 + } + ], + "thermal_mass_parameter": 100 + } + ], + "heating_cost_current": { + "value": 378, + "currency": "GBP" + }, + "co2_emissions_current": 2.2, + "energy_rating_average": 60, + "energy_rating_current": 84, + "lighting_cost_current": { + "value": 73, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Time and temperature zone control", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 379, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 114, + "currency": "GBP" + }, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 52, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 85, + "environmental_impact_rating": 86 + }, + { + "sequence": 2, + "typical_saving": { + "value": 275, + "currency": "GBP" + }, + "indicative_cost": "£5,000 - £8,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 92, + "environmental_impact_rating": 92 + } + ], + "co2_emissions_potential": 1.0, + "energy_rating_potential": 92, + "lighting_cost_potential": { + "value": 73, + "currency": "GBP" + }, + "schema_version_original": "LIG-17.0", + "hot_water_cost_potential": { + "value": 62, + "currency": "GBP" + }, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 5622, + "water_heating": 2279 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 91, + "has_fixed_air_conditioning": "false", + "multiple_glazed_percentage": 100, + "calculation_software_version": "4.03r03", + "energy_consumption_potential": 39, + "environmental_impact_current": 84, + "current_energy_efficiency_band": "B", + "environmental_impact_potential": 92, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "A", + "co2_emissions_current_per_floor_area": 16 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-17.1/epc.json b/backend/epc_api/json_samples/SAP-Schema-17.1/epc.json new file mode 100644 index 00000000..b690d220 --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-17.1/epc.json @@ -0,0 +1,562 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Average thermal transmittance 0.11 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.27 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.14 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "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": "A1 1AA", + "data_type": 2, + "hot_water": { + "description": "From main system", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "post_town": "Town", + "built_form": 1, + "living_area": 20.36, + "orientation": 1, + "region_code": 6, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "water_fuel_type": 1, + "water_heating_code": 901, + "hot_water_store_size": 180, + "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": 18042, + "has_separate_delayed_start": "true", + "load_or_weather_compensation": 0, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "true", + "has_cylinder_thermostat": "true", + "hot_water_store_heat_loss": 1.2, + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1, + "is_cylinder_in_heated_space": "true", + "primary_pipework_insulation": 4, + "is_hot_water_separately_timed": "true", + "hot_water_store_heat_loss_source": 2 + }, + "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 4.9 m³/h.m² (as tested)", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + }, + "dwelling_type": "Detached house", + "language_code": 1, + "property_type": 0, + "address_line_1": "47, Address Lane", + "address_line_2": "Long Itchington", + "assessment_date": "2020-08-17", + "assessment_type": "SAP", + "completion_date": "2020-08-17", + "inspection_date": "2020-08-17", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 1, + "air_permeability": 4.94, + "open_flues_count": 0, + "ventilation_type": 1, + "extract_fans_count": 5, + "open_fireplaces_count": 0, + "sheltered_sides_count": 1, + "flueless_gas_fires_count": 0 + }, + "design_water_use": 1, + "sap_data_version": 9.92, + "sap_flat_details": { + "level": 1 + }, + "total_floor_area": 146, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2020-08-17", + "sap_energy_source": { + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 2, + "fixed_lighting_outlets_count": 14, + "low_energy_fixed_lighting_outlets_count": 14, + "low_energy_fixed_lighting_outlets_percentage": 100 + }, + "sap_opening_types": [ + { + "name": "Opening Type 1", + "type": 2, + "u_value": 1.5, + "data_source": 2, + "glazing_type": 4 + }, + { + "name": "Opening Type 2", + "type": 4, + "u_value": 1.41, + "data_source": 2, + "frame_factor": 0.7, + "glazing_type": 4, + "solar_transmittance": 0.71 + }, + { + "name": "Opening Type 4", + "type": 4, + "u_value": 1.41, + "data_source": 2, + "frame_factor": 0.7, + "glazing_type": 4, + "solar_transmittance": 0.72 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 11 + ], + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof 1", + "u_value": 0.11, + "roof_type": 2, + "description": "400mm Mineral Wool", + "total_roof_area": 72.6 + }, + { + "name": "Roof 2", + "u_value": 0.17, + "roof_type": 2, + "description": "Flat Roof", + "total_roof_area": 1.07 + } + ], + "sap_walls": [ + { + "name": "External Wall 1", + "u_value": 0.27, + "wall_type": 2, + "description": "50mm A Platinum", + "total_wall_area": 186.21, + "is_curtain_walling": "false" + } + ], + "identifier": "Main Dwelling", + "overshading": 2, + "sap_openings": [ + { + "name": "D1", + "type": "Opening Type 1", + "width": 1.01, + "height": 2.33, + "location": "External Wall 1", + "orientation": 0 + }, + { + "name": "D2", + "type": "Opening Type 2", + "width": 2.4, + "height": 2.1, + "location": "External Wall 1", + "orientation": 6 + }, + { + "name": "D3", + "type": "Opening Type 2", + "width": 2.4, + "height": 2.1, + "location": "External Wall 1", + "orientation": 4 + }, + { + "name": "W1", + "type": "Opening Type 4", + "width": 1.14, + "height": 1.5, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "W1a", + "type": "Opening Type 4", + "width": 0.56, + "height": 1.5, + "location": "External Wall 1", + "orientation": 3 + }, + { + "name": "W1b", + "type": "Opening Type 4", + "width": 0.56, + "height": 1.5, + "location": "External Wall 1", + "orientation": 1 + }, + { + "name": "W2", + "type": "Opening Type 4", + "width": 1.14, + "height": 1.5, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "W2a", + "type": "Opening Type 4", + "width": 0.56, + "height": 1.5, + "location": "External Wall 1", + "orientation": 3 + }, + { + "name": "W2b", + "type": "Opening Type 4", + "width": 0.56, + "height": 1.5, + "location": "External Wall 1", + "orientation": 1 + }, + { + "name": "W3", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 8 + }, + { + "name": "W4", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 8 + }, + { + "name": "W5", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 8 + }, + { + "name": "W6", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 6 + }, + { + "name": "W7", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "W8", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.2, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "W9", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "W10", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 8 + }, + { + "name": "W11", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 8 + }, + { + "name": "W12", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 8 + }, + { + "name": "W13", + "type": "Opening Type 4", + "width": 0.63, + "height": 1.05, + "location": "External Wall 1", + "orientation": 4 + }, + { + "name": "W14", + "type": "Opening Type 4", + "width": 1.02, + "height": 1.35, + "location": "External Wall 1", + "orientation": 6 + } + ], + "construction_year": 2017, + "sap_thermal_bridges": { + "thermal_bridges": [ + { + "length": 21.8, + "psi_value": 0.211, + "psi_value_source": 3, + "thermal_bridge_type": "E2" + }, + { + "length": 6.12, + "psi_value": 0.049, + "psi_value_source": 3, + "thermal_bridge_type": "E2" + }, + { + "length": 20.79, + "psi_value": 0.023, + "psi_value_source": 3, + "thermal_bridge_type": "E3" + }, + { + "length": 63.76, + "psi_value": 0.028, + "psi_value_source": 3, + "thermal_bridge_type": "E4" + }, + { + "length": 38.46, + "psi_value": 0.047, + "psi_value_source": 3, + "thermal_bridge_type": "E5" + }, + { + "length": 3.48, + "psi_value": 0.14, + "psi_value_source": 4, + "thermal_bridge_type": "E6" + }, + { + "length": 34.33, + "psi_value": 0.003, + "psi_value_source": 3, + "thermal_bridge_type": "E6" + }, + { + "length": 26.68, + "psi_value": 0.094, + "psi_value_source": 3, + "thermal_bridge_type": "E10" + }, + { + "length": 9.4, + "psi_value": 0.049, + "psi_value_source": 3, + "thermal_bridge_type": "E12" + }, + { + "length": 4.41, + "psi_value": 0.08, + "psi_value_source": 4, + "thermal_bridge_type": "E14" + }, + { + "length": 34.2, + "psi_value": 0.047, + "psi_value_source": 3, + "thermal_bridge_type": "E16" + }, + { + "length": 15.36, + "psi_value": -0.097, + "psi_value_source": 3, + "thermal_bridge_type": "E17" + } + ], + "thermal_bridge_code": 5 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.14, + "floor_type": 2, + "description": "B&B", + "storey_height": 2.33, + "heat_loss_area": 73.67, + "total_floor_area": 73.67 + }, + { + "storey": 1, + "u_value": 0, + "floor_type": 3, + "storey_height": 2.56, + "heat_loss_area": 0, + "total_floor_area": 72.6 + } + ], + "thermal_mass_parameter": 134.43 + } + ], + "heating_cost_current": { + "value": 339, + "currency": "GBP" + }, + "co2_emissions_current": 2.1, + "energy_rating_average": 60, + "energy_rating_current": 85, + "lighting_cost_current": { + "value": 93, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Time and temperature zone control", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 340, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 99, + "currency": "GBP" + }, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 43, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 86, + "environmental_impact_rating": 87 + }, + { + "sequence": 2, + "typical_saving": { + "value": 340, + "currency": "GBP" + }, + "indicative_cost": "£3,500 - £5,500", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 93, + "environmental_impact_rating": 93 + } + ], + "co2_emissions_potential": 0.9, + "energy_rating_potential": 93, + "lighting_cost_potential": { + "value": 93, + "currency": "GBP" + }, + "schema_version_original": "LIG-17.0", + "hot_water_cost_potential": { + "value": 55, + "currency": "GBP" + }, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 5361, + "water_heating": 2143 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 82, + "has_fixed_air_conditioning": "false", + "multiple_glazed_percentage": 100, + "calculation_software_version": "4.12r02", + "energy_consumption_potential": 34, + "environmental_impact_current": 85, + "current_energy_efficiency_band": "B", + "environmental_impact_potential": 93, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "A", + "co2_emissions_current_per_floor_area": 14 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-18.0.0/epc.json b/backend/epc_api/json_samples/SAP-Schema-18.0.0/epc.json new file mode 100644 index 00000000..b2d27bbf --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-18.0.0/epc.json @@ -0,0 +1,510 @@ +{ + "name": "-", + "uprn": 12457, + "roofs": [ + { + "description": "Average thermal transmittance 0.10 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.10 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.09 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "status": "entered", + "tenure": "ND", + "windows": { + "description": "High performance glazing", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "addendum": { + "stone_walls": "true", + "system_build": "true" + }, + "lighting": { + "description": "Low energy lighting in all fixed outlets", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "postcode": "LS0 0AA", + "data_type": 2, + "hot_water": { + "description": "Electric immersion, standard tariff", + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 2 + }, + "post_town": "Town", + "built_form": 4, + "living_area": 38.91, + "orientation": 6, + "region_code": 3, + "report_type": 3, + "sap_heating": { + "water_fuel_type": 39, + "water_heating_code": 903, + "hot_water_store_size": 210, + "main_heating_details": [ + { + "main_fuel_type": 39, + "main_heating_code": 691, + "emitter_temperature": "NA", + "main_heating_number": 1, + "main_heating_control": 2603, + "main_heating_category": 10, + "main_heating_fraction": 1, + "main_heating_data_source": 3 + } + ], + "has_hot_water_cylinder": "true", + "immersion_heating_type": 1, + "has_cylinder_thermostat": "true", + "hot_water_store_heat_loss": 1.31, + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1, + "is_cylinder_in_heated_space": "true", + "hot_water_store_heat_loss_source": 2 + }, + "sap_version": 9.92, + "schema_type": "SAP-Schema-18.0.0", + "uprn_source": "Energy Assessor", + "country_code": "ENG", + "main_heating": [ + { + "description": "Room heaters, electric", + "energy_efficiency_rating": 1, + "environmental_efficiency_rating": 2 + } + ], + "air_tightness": { + "description": "Air permeability 0.7 m³/h.m² (as tested)", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "property_type": 0, + "address_line_1": "30 Lovely Place", + "address_line_2": "Nice Road", + "assessment_date": "2021-01-01", + "assessment_type": "SAP", + "completion_date": "2021-01-01", + "inspection_date": "2021-01-01", + "sap_ventilation": { + "psv_count": 0, + "pressure_test": 1, + "wet_rooms_count": 3, + "air_permeability": 0.69, + "open_flues_count": 0, + "ventilation_type": 8, + "extract_fans_count": 0, + "open_fireplaces_count": 0, + "sheltered_sides_count": 3, + "flueless_gas_fires_count": 0, + "mechanical_vent_duct_type": 2, + "mechanical_vent_duct_insulation": 2, + "mechanical_ventilation_data_source": 1, + "mechanical_vent_system_index_number": 500482, + "is_mechanical_vent_approved_installer_scheme": "true" + }, + "design_water_use": 1, + "sap_data_version": 9.92, + "sap_flat_details": { + "level": 1 + }, + "total_floor_area": 117, + "transaction_type": 6, + "conservatory_type": 1, + "registration_date": "2021-01-01", + "sap_energy_source": { + "pv_arrays": [ + { + "pitch": 2, + "peak_power": 0.75, + "orientation": 6, + "overshading": 1, + "pv_connection": 2 + } + ], + "electricity_tariff": 1, + "wind_turbines_count": 0, + "wind_turbine_terrain_type": 1, + "fixed_lighting_outlets_count": 20, + "low_energy_fixed_lighting_outlets_count": 20, + "low_energy_fixed_lighting_outlets_percentage": 100 + }, + "sap_opening_types": [ + { + "name": "Doors", + "type": 1, + "u_value": 0.75, + "data_source": 2, + "glazing_type": 1 + }, + { + "name": "Windows - W-001A", + "type": 4, + "u_value": 0.72, + "data_source": 2, + "frame_factor": 0.85, + "glazing_type": 12, + "solar_transmittance": 0.52 + }, + { + "name": "Windows - W-001B", + "type": 4, + "u_value": 0.73, + "data_source": 2, + "frame_factor": 0.84, + "glazing_type": 12, + "solar_transmittance": 0.52 + }, + { + "name": "W-003 Louvre system", + "type": 4, + "u_value": 1.02, + "data_source": 2, + "frame_factor": 0.01, + "glazing_type": 12, + "solar_transmittance": 0 + }, + { + "name": "Window - W-003R", + "type": 4, + "u_value": 0.82, + "data_source": 2, + "frame_factor": 0.78, + "glazing_type": 12, + "solar_transmittance": 0.53 + }, + { + "name": "Sliding door - EX002A", + "type": 4, + "u_value": 0.86, + "data_source": 2, + "frame_factor": 0.85, + "glazing_type": 12, + "solar_transmittance": 0.52 + }, + { + "name": "EX002B Louvre system", + "type": 4, + "u_value": 1, + "data_source": 2, + "frame_factor": 0.01, + "glazing_type": 12, + "solar_transmittance": 0 + }, + { + "name": "Window - EX002B", + "type": 4, + "u_value": 0.76, + "data_source": 2, + "frame_factor": 0.84, + "glazing_type": 12, + "solar_transmittance": 0.53 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lzc_energy_sources": [ + 11, + 9 + ], + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof 1", + "u_value": 0.1, + "roof_type": 2, + "description": "External Roof 1", + "total_roof_area": 38.91 + } + ], + "sap_walls": [ + { + "name": "External Wall 1", + "u_value": 0.1, + "wall_type": 2, + "description": "External Wall 1", + "total_wall_area": 77.31, + "is_curtain_walling": "false" + }, + { + "name": "Party Wall 0", + "u_value": 0, + "wall_type": 4, + "total_wall_area": 129.44 + } + ], + "identifier": "Main Dwelling", + "overshading": 2, + "sap_openings": [ + { + "name": "Opening 1", + "type": "Doors", + "width": 2.23, + "height": 1, + "location": "External Wall 1", + "orientation": 0 + }, + { + "name": "Opening 2", + "type": "Windows - W-001A", + "width": 2.3, + "height": 1, + "location": "External Wall 1", + "orientation": 6 + }, + { + "name": "Opening 3", + "type": "W-003 Louvre system", + "width": 0.63, + "height": 1, + "location": "External Wall 1", + "orientation": 6 + }, + { + "name": "Opening 4", + "type": "Window - W-003R", + "width": 2.38, + "height": 1, + "location": "External Wall 1", + "orientation": 6 + }, + { + "name": "Opening 5", + "type": "Sliding door - EX002A", + "width": 5.37, + "height": 1, + "location": "External Wall 1", + "orientation": 6 + }, + { + "name": "Opening 6", + "type": "Windows - W-001A", + "width": 2.3, + "height": 1, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "Opening 7", + "type": "Windows - W-001B", + "width": 2.06, + "height": 1, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "Opening 8", + "type": "Window - W-003R", + "width": 1.18, + "height": 1, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "Opening 9", + "type": "EX002B Louvre system", + "width": 0.95, + "height": 1, + "location": "External Wall 1", + "orientation": 2 + }, + { + "name": "Opening 10", + "type": "Window - EX002B", + "width": 4.73, + "height": 1, + "location": "External Wall 1", + "orientation": 2 + } + ], + "construction_year": 2017, + "sap_thermal_bridges": { + "thermal_bridges": [ + { + "length": 13.13, + "psi_value": 0.07, + "psi_value_source": 3, + "thermal_bridge_type": "E2" + }, + { + "length": 9.7, + "psi_value": 0.055, + "psi_value_source": 3, + "thermal_bridge_type": "E3" + }, + { + "length": 31.33, + "psi_value": 0.066, + "psi_value_source": 3, + "thermal_bridge_type": "E4" + }, + { + "length": 9.64, + "psi_value": 0.074, + "psi_value_source": 3, + "thermal_bridge_type": "E20" + }, + { + "length": 19.28, + "psi_value": 0.049, + "psi_value_source": 3, + "thermal_bridge_type": "E6" + }, + { + "length": 9.84, + "psi_value": 0.097, + "psi_value_source": 3, + "thermal_bridge_type": "E15" + }, + { + "length": 32.08, + "psi_value": 0.02, + "psi_value_source": 3, + "thermal_bridge_type": "E18" + }, + { + "length": 32.28, + "psi_value": 0, + "psi_value_source": 4, + "thermal_bridge_type": "P2" + }, + { + "length": 16.14, + "psi_value": 0.16, + "psi_value_source": 4, + "thermal_bridge_type": "P7" + }, + { + "length": 16.14, + "psi_value": 0.005, + "psi_value_source": 3, + "thermal_bridge_type": "P4" + } + ], + "thermal_bridge_code": 5 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.09, + "floor_type": 3, + "description": "Heat Loss Floor 1", + "storey_height": 2.48, + "heat_loss_area": 38.91, + "total_floor_area": 38.91 + }, + { + "storey": 1, + "u_value": 0, + "floor_type": 3, + "storey_height": 2.8, + "heat_loss_area": 0, + "total_floor_area": 38.91 + }, + { + "storey": 2, + "u_value": 0, + "floor_type": 3, + "storey_height": 2.74, + "heat_loss_area": 0, + "total_floor_area": 38.91 + } + ], + "thermal_mass_parameter": 100 + } + ], + "heating_cost_current": { + "value": 133, + "currency": "GBP" + }, + "co2_emissions_current": 1.3, + "energy_rating_average": 60, + "energy_rating_current": 88, + "lighting_cost_current": { + "value": 86, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Programmer and appliance thermostats", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 136, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 361, + "currency": "GBP" + }, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 184, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 93, + "environmental_impact_rating": 94 + } + ], + "co2_emissions_potential": 0.8, + "energy_rating_potential": 93, + "lighting_cost_potential": { + "value": 86, + "currency": "GBP" + }, + "schema_version_original": "18.0.0", + "hot_water_cost_potential": { + "value": 175, + "currency": "GBP" + }, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 413, + "water_heating": 1890 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 64, + "has_fixed_air_conditioning": "false", + "multiple_glazed_percentage": 100, + "calculation_software_version": "4.14r16", + "energy_consumption_potential": 39, + "environmental_impact_current": 89, + "current_energy_efficiency_band": "B", + "environmental_impact_potential": 94, + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "A", + "co2_emissions_current_per_floor_area": 11 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-19.0.0/epc.json b/backend/epc_api/json_samples/SAP-Schema-19.0.0/epc.json new file mode 100644 index 00000000..66e58247 --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-19.0.0/epc.json @@ -0,0 +1,610 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Average thermal transmittance 0.13 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.18 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.12 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "status": "entered", + "tenure": 1, + "windows": { + "description": "High performance glazing", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 5 + }, + "addendum": { + "stone_walls": "true" + }, + "lighting": { + "description": "Energy saving bulbs", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "postcode": "A0 0AA", + "data_type": 1, + "hot_water": { + "description": "From main system, waste water heat recovery", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 3 + }, + "post_town": "Whitbury", + "built_form": 4, + "living_area": 41.35, + "orientation": 0, + "region_code": 16, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "shower_outlets": [ + { + "shower_wwhrs": 1, + "shower_flow_rate": 7, + "shower_outlet_type": 1 + }, + { + "shower_wwhrs": 2, + "shower_flow_rate": 7, + "shower_outlet_type": 1 + } + ], + "water_fuel_type": 39, + "water_heating_code": 901, + "instantaneous_wwhrs": { + "wwhrs_index_number1": 491123 + }, + "hot_water_store_size": 600, + "main_heating_details": [ + { + "has_fghrs": "false", + "main_fuel_type": 39, + "combi_boiler_type": 4, + "heat_emitter_type": 1, + "main_heating_code": 192, + "main_heating_number": 1, + "is_condensing_boiler": "false", + "main_heating_control": 2106, + "is_interlocked_system": "false", + "main_heating_category": 2, + "main_heating_fraction": 1, + "central_heating_pump_age": 2, + "main_heating_data_source": 3, + "has_separate_delayed_start": "true", + "is_oil_pump_in_heated_space": "false", + "is_main_heating_hetas_approved": "false", + "electric_cpsu_operating_temperature": 80, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "true", + "has_cylinder_thermostat": "true", + "hot_water_store_heat_loss": 2.45, + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1, + "is_immersion_for_summer_use": "false", + "is_hot_water_separately_timed": "false", + "hot_water_store_heat_loss_source": 2, + "is_heat_pump_assisted_by_immersion": "false" + }, + "sap_version": 10.2, + "schema_type": "SAP-Schema-19.0.0", + "uprn_source": "Energy Assessor", + "country_code": "ENG", + "main_heating": [ + { + "description": "Boiler and radiators, electric", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 2 + } + ], + "sap_lighting": [ + [ + { + "lighting_power": 60, + "lighting_outlets": 1, + "lighting_efficacy": 11.2 + }, + { + "lighting_power": 14, + "lighting_outlets": 10, + "lighting_efficacy": 66.9 + }, + { + "lighting_power": 15, + "lighting_outlets": 7, + "lighting_efficacy": 69.9 + } + ] + ], + "terrain_type": 1, + "air_tightness": { + "description": "Air permeability 2.0 m³/h.m² (assumed)", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "property_type": 0, + "address_line_1": "1 Some Street", + "address_line_2": "Some Area", + "address_line_3": "Some County", + "assessment_date": "2022-05-09", + "assessment_type": "SAP", + "completion_date": "2022-05-09", + "inspection_date": "2022-05-09", + "sap_ventilation": { + "psv_count": 0, + "wall_type": 2, + "pressure_test": 2, + "wet_rooms_count": 2, + "air_permeability": 2, + "open_flues_count": 0, + "ventilation_type": 8, + "has_draught_lobby": "false", + "other_flues_count": 0, + "closed_flues_count": 0, + "extract_fans_count": 0, + "boilers_flues_count": 0, + "open_chimneys_count": 0, + "sheltered_sides_count": 2, + "blocked_chimneys_count": 0, + "flueless_gas_fires_count": 0, + "mechanical_vent_duct_type": 2, + "mechanical_vent_duct_placement": 1, + "mechanical_ventilation_data_source": 1, + "mechanical_vent_system_index_number": 500206, + "mechanical_vent_duct_insulation_level": 2, + "is_mechanical_vent_approved_installer_scheme": "true" + }, + "sap_data_version": 10.2, + "sap_flat_details": { + "level": 1, + "storeys": 1 + }, + "total_floor_area": 165, + "transaction_type": 1, + "cold_water_source": 1, + "conservatory_type": 1, + "registration_date": "2022-05-09", + "sap_energy_source": { + "wind_turbines": [ + { + "wind_turbine_hub_height": 3, + "wind_turbine_rotor_diameter": 1.7 + } + ], + "electricity_tariff": 4 + }, + "sap_opening_types": [ + { + "name": "Doors", + "type": 1, + "u_value": 1.5, + "data_source": 2, + "glazing_type": 1, + "isargonfilled": "false" + }, + { + "name": "Windows (1)", + "type": 4, + "u_value": 1.4, + "frame_type": 1, + "data_source": 3, + "glazing_gap": 3, + "frame_factor": 0.7, + "glazing_type": 11, + "isargonfilled": "true", + "solar_transmittance": 0.57 + }, + { + "name": "Windows (2)", + "type": 4, + "u_value": 1.5, + "frame_type": 1, + "data_source": 3, + "glazing_gap": 3, + "frame_factor": 0.7, + "glazing_type": 9, + "isargonfilled": "true", + "solar_transmittance": 0.64 + } + ], + "secondary_heating": { + "description": "Electric heater", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lowest_storey_area": 57.4, + "lzc_energy_sources": [ + 11 + ], + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof (1)", + "u_value": 0.13, + "roof_type": 2, + "kappa_value": 9, + "total_roof_area": 57.4 + } + ], + "sap_walls": [ + { + "name": "Walls (1)", + "u_value": 0.18, + "wall_type": 2, + "kappa_value": 60, + "total_wall_area": 111.34, + "is_curtain_walling": "false" + }, + { + "name": "Party wall", + "u_value": 0, + "wall_type": 4, + "kappa_value": 0, + "total_wall_area": 167, + "is_curtain_walling": "false" + }, + { + "name": "Internal wall (1)", + "u_value": 0, + "wall_type": 5, + "kappa_value": 0, + "total_wall_area": 320, + "is_curtain_walling": "false" + } + ], + "identifier": "Main Dwelling", + "sap_openings": [ + { + "name": 1, + "type": "Doors", + "width": 1, + "height": 2.25, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 2, + "type": "Doors", + "width": 0.8, + "height": 2.1, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 3, + "type": "Windows (2)", + "width": 1.6, + "height": 2.7, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 4, + "type": "Windows (1)", + "width": 1.1, + "height": 1.75, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 5, + "type": "Windows (1)", + "width": 1.1, + "height": 1.75, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 6, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 7, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 8, + "type": "Windows (1)", + "width": 1.1, + "height": 1.8, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 9, + "type": "Windows (1)", + "width": 1.1, + "height": 1.75, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 10, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 11, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 12, + "type": "Windows (1)", + "width": 0.6, + "height": 0.8, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 13, + "type": "Windows (1)", + "width": 0.8, + "height": 1.25, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 14, + "type": "Windows (1)", + "width": 0.8, + "height": 1.25, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 15, + "type": "Windows (1)", + "width": 1.1, + "height": 1.25, + "location": "Walls (1)", + "orientation": 7 + } + ], + "construction_year": 1750, + "sap_thermal_bridges": { + "thermal_bridges": [ + { + "length": 15.5, + "psi_value": 0.3, + "psi_value_source": 2, + "thermal_bridge_type": "E2" + }, + { + "length": 12.1, + "psi_value": 0.04, + "psi_value_source": 2, + "thermal_bridge_type": "E3" + }, + { + "length": 52.1, + "psi_value": 0.05, + "psi_value_source": 2, + "thermal_bridge_type": "E4" + }, + { + "length": 14.4, + "psi_value": 0.16, + "psi_value_source": 2, + "thermal_bridge_type": "E5" + }, + { + "length": 25.8, + "psi_value": 0.07, + "psi_value_source": 2, + "thermal_bridge_type": "E6" + }, + { + "length": 10.4, + "psi_value": 0.06, + "psi_value_source": 2, + "thermal_bridge_type": "E10" + }, + { + "length": 5.4, + "psi_value": 0.06, + "psi_value_source": 3, + "thermal_bridge_type": "E14" + }, + { + "length": 5.8, + "psi_value": 0.09, + "psi_value_source": 2, + "thermal_bridge_type": "E16" + }, + { + "length": 5.8, + "psi_value": -0.09, + "psi_value_source": 2, + "thermal_bridge_type": "E17" + }, + { + "length": 34, + "psi_value": 0.06, + "psi_value_source": 2, + "thermal_bridge_type": "E18" + }, + { + "length": 20.6, + "psi_value": 0.12, + "psi_value_source": 3, + "thermal_bridge_type": "P1" + }, + { + "length": 20.6, + "psi_value": 0, + "psi_value_source": 4, + "thermal_bridge_type": "P2" + }, + { + "length": 20.6, + "psi_value": 0.12, + "psi_value_source": 3, + "thermal_bridge_type": "P4" + } + ], + "thermal_bridge_code": 5 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.12, + "floor_type": 2, + "kappa_value": 80, + "storey_height": 2.8, + "heat_loss_area": 57.4, + "total_floor_area": 57.4 + }, + { + "storey": 1, + "u_value": 0, + "floor_type": 3, + "kappa_value": 18, + "storey_height": 3, + "heat_loss_area": 0, + "total_floor_area": 57.4, + "kappa_value_from_below": 9 + }, + { + "storey": 2, + "u_value": 0, + "floor_type": 3, + "kappa_value": 19, + "storey_height": 2.7, + "heat_loss_area": 0, + "total_floor_area": 57.4, + "kappa_value_from_below": 9 + } + ], + "construction_age_band": "A" + } + ], + "user_interface_name": "BRE SAP interface 10.2", + "windows_overshading": 2, + "heating_cost_current": { + "value": 365.98, + "currency": "GBP" + }, + "co2_emissions_current": 2.4, + "energy_rating_average": 60, + "energy_rating_current": 72, + "lighting_cost_current": { + "value": 123.45, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "has_hot_water_cylinder": "false", + "heating_cost_potential": { + "value": 250.34, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 200.4, + "currency": "GBP" + }, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 88, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 74, + "environmental_impact_rating": 94 + }, + { + "sequence": 2, + "typical_saving": { + "value": 88, + "currency": "GBP" + }, + "indicative_cost": "£9,000 - £14,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 80, + "environmental_impact_rating": 96 + } + ], + "user_interface_version": "1.0.1-alpha", + "co2_emissions_potential": 1.4, + "energy_rating_potential": 72, + "gas_smart_meter_present": "false", + "lighting_cost_potential": { + "value": 84.23, + "currency": "GBP" + }, + "schema_version_original": "SAP-Schema-19.0.0", + "hot_water_cost_potential": { + "value": 180.43, + "currency": "GBP" + }, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 13120, + "water_heating": 2285 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 59, + "has_fixed_air_conditioning": "false", + "is_dwelling_export_capable": "true", + "multiple_glazed_percentage": 100, + "calculation_software_version": "13.05r16", + "energy_consumption_potential": 53, + "environmental_impact_current": 94, + "current_energy_efficiency_band": "C", + "environmental_impact_potential": 96, + "electricity_smart_meter_present": "false", + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 5.6 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-19.1.0/epc.json b/backend/epc_api/json_samples/SAP-Schema-19.1.0/epc.json new file mode 100644 index 00000000..2e94810f --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-19.1.0/epc.json @@ -0,0 +1,613 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Average thermal transmittance 0.13 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.18 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.12 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "status": "entered", + "tenure": 1, + "windows": { + "description": "High performance glazing", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "lighting": { + "description": "Low energy lighting in 91% of fixed outlets", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "postcode": "A0 0AA", + "data_type": 1, + "hot_water": { + "description": "From main system, waste water heat recovery", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 3 + }, + "post_town": "Whitbury", + "built_form": 4, + "living_area": 41.35, + "orientation": 0, + "region_code": 16, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "shower_outlets": [ + { + "shower_wwhrs": 1, + "shower_flow_rate": 7, + "shower_outlet_type": 1 + }, + { + "shower_wwhrs": 2, + "shower_flow_rate": 7, + "shower_outlet_type": 1 + } + ], + "water_fuel_type": 39, + "water_heating_code": 901, + "instantaneous_wwhrs": { + "wwhrs_index_number1": 491123 + }, + "hot_water_store_size": 600, + "main_heating_details": [ + { + "has_fghrs": "false", + "main_fuel_type": 47, + "combi_boiler_type": 4, + "heat_emitter_type": 1, + "main_heating_code": 192, + "main_heating_number": 1, + "is_condensing_boiler": "false", + "main_heating_control": 2106, + "is_interlocked_system": "false", + "main_heating_category": 2, + "main_heating_fraction": 1, + "central_heating_pump_age": 2, + "main_heating_data_source": 3, + "has_separate_delayed_start": "true", + "is_oil_pump_in_heated_space": "false", + "is_main_heating_hetas_approved": "false", + "electric_cpsu_operating_temperature": 80, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "true", + "has_cylinder_thermostat": "true", + "hot_water_store_heat_loss": 2.45, + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1, + "is_immersion_for_summer_use": "false", + "is_hot_water_separately_timed": "false", + "sap_community_heating_systems": [ + { + "sub_network_name": "Test 1", + "community_heating_use": 3, + "heat_network_existing": "true", + "heat_network_index_number": 496402, + "heat_network_assessed_as_new": "true", + "community_heating_distribution_type": 5, + "community_heating_distribution_loss_factor": 1.26 + } + ], + "hot_water_store_heat_loss_source": 2, + "is_heat_pump_assisted_by_immersion": "false" + }, + "sap_version": 10.2, + "schema_type": "SAP-Schema-19.1.0", + "uprn_source": "Energy Assessor", + "country_code": "ENG", + "main_heating": [ + { + "description": "Boiler and radiators, electric", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 2 + } + ], + "sap_lighting": [ + [ + { + "lighting_power": 60, + "lighting_outlets": 1, + "lighting_efficacy": 11.2 + }, + { + "lighting_power": 14, + "lighting_outlets": 10, + "lighting_efficacy": 66.9 + } + ] + ], + "terrain_type": 1, + "air_tightness": { + "description": "Air permeability 2.0 m³/h.m² (assumed)", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "property_type": 0, + "address_line_1": "1 Some Street", + "address_line_2": "Some Area", + "address_line_3": "Some County", + "assessment_date": "2022-05-09", + "assessment_type": "SAP", + "completion_date": "2022-05-09", + "inspection_date": "2022-05-09", + "sap_ventilation": { + "psv_count": 0, + "wall_type": 2, + "pressure_test": 2, + "wet_rooms_count": 2, + "air_permeability": 2, + "open_flues_count": 0, + "ventilation_type": 8, + "has_draught_lobby": "false", + "other_flues_count": 0, + "closed_flues_count": 0, + "extract_fans_count": 0, + "boilers_flues_count": 0, + "open_chimneys_count": 0, + "sheltered_sides_count": 2, + "blocked_chimneys_count": 0, + "flueless_gas_fires_count": 0, + "mechanical_vent_duct_type": 2, + "mechanical_vent_duct_placement": 1, + "mechanical_ventilation_data_source": 1, + "mechanical_vent_system_index_number": 500206, + "mechanical_vent_duct_insulation_level": 2, + "is_mechanical_vent_approved_installer_scheme": "true" + }, + "sap_data_version": 10.2, + "sap_flat_details": { + "level": 1, + "storeys": 1 + }, + "total_floor_area": 165, + "transaction_type": 1, + "cold_water_source": 1, + "conservatory_type": 1, + "registration_date": "2022-05-09", + "sap_energy_source": { + "wind_turbines": [ + { + "wind_turbine_hub_height": 3, + "wind_turbine_rotor_diameter": 1.7 + }, + { + "wind_turbine_hub_height": 3, + "wind_turbine_rotor_diameter": 1.7 + } + ], + "electricity_tariff": 5 + }, + "sap_opening_types": [ + { + "name": "Doors", + "type": 1, + "u_value": 1.5, + "data_source": 2, + "glazing_type": 1, + "isargonfilled": "false" + }, + { + "name": "Windows (1)", + "type": 4, + "u_value": 1.4, + "frame_type": 1, + "data_source": 3, + "glazing_gap": 3, + "frame_factor": 0.7, + "glazing_type": 11, + "isargonfilled": "true", + "solar_transmittance": 0.57 + }, + { + "name": "Windows (2)", + "type": 4, + "u_value": 1.5, + "frame_type": 1, + "data_source": 3, + "glazing_gap": 3, + "frame_factor": 0.7, + "glazing_type": 9, + "isargonfilled": "true", + "solar_transmittance": 0.64 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lowest_storey_area": 57.4, + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof (1)", + "u_value": 0.13, + "roof_type": 2, + "kappa_value": 9, + "total_roof_area": 57.4 + } + ], + "sap_walls": [ + { + "name": "Walls (1)", + "u_value": 0.18, + "wall_type": 2, + "kappa_value": 60, + "total_wall_area": 111.34, + "is_curtain_walling": "false" + }, + { + "name": "Party wall", + "u_value": 0, + "wall_type": 4, + "kappa_value": 0, + "total_wall_area": 167, + "is_curtain_walling": "false" + }, + { + "name": "Internal wall (1)", + "u_value": 0, + "wall_type": 5, + "kappa_value": 0, + "total_wall_area": 320, + "is_curtain_walling": "false" + } + ], + "identifier": "Main Dwelling", + "sap_openings": [ + { + "name": 1, + "type": "Doors", + "width": 1, + "height": 2.25, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 2, + "type": "Doors", + "width": 0.8, + "height": 2.1, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 3, + "type": "Windows (2)", + "width": 1.6, + "height": 2.7, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 4, + "type": "Windows (1)", + "width": 1.1, + "height": 1.75, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 5, + "type": "Windows (1)", + "width": 1.1, + "height": 1.75, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 6, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 7, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 8, + "type": "Windows (1)", + "width": 1.1, + "height": 1.8, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 9, + "type": "Windows (1)", + "width": 1.1, + "height": 1.75, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 10, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 11, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 12, + "type": "Windows (1)", + "width": 0.6, + "height": 0.8, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 13, + "type": "Windows (1)", + "width": 0.8, + "height": 1.25, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 14, + "type": "Windows (1)", + "width": 0.8, + "height": 1.25, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 15, + "type": "Windows (1)", + "width": 1.1, + "height": 1.25, + "location": "Walls (1)", + "orientation": 7 + } + ], + "sap_thermal_bridges": { + "thermal_bridges": [ + { + "length": 15.5, + "psi_value": 0.3, + "psi_value_source": 2, + "thermal_bridge_type": "E2" + }, + { + "length": 12.1, + "psi_value": 0.04, + "psi_value_source": 2, + "thermal_bridge_type": "E3" + }, + { + "length": 52.1, + "psi_value": 0.05, + "psi_value_source": 2, + "thermal_bridge_type": "E4" + }, + { + "length": 14.4, + "psi_value": 0.16, + "psi_value_source": 2, + "thermal_bridge_type": "E5" + }, + { + "length": 25.8, + "psi_value": 0.07, + "psi_value_source": 2, + "thermal_bridge_type": "E6" + }, + { + "length": 10.4, + "psi_value": 0.06, + "psi_value_source": 2, + "thermal_bridge_type": "E10" + }, + { + "length": 5.4, + "psi_value": 0.06, + "psi_value_source": 3, + "thermal_bridge_type": "E14" + }, + { + "length": 5.8, + "psi_value": 0.09, + "psi_value_source": 2, + "thermal_bridge_type": "E16" + }, + { + "length": 5.8, + "psi_value": -0.09, + "psi_value_source": 2, + "thermal_bridge_type": "E17" + }, + { + "length": 34, + "psi_value": 0.06, + "psi_value_source": 2, + "thermal_bridge_type": "E18" + }, + { + "length": 20.6, + "psi_value": 0.12, + "psi_value_source": 3, + "thermal_bridge_type": "P1" + }, + { + "length": 20.6, + "psi_value": 0, + "psi_value_source": 4, + "thermal_bridge_type": "P2" + }, + { + "length": 20.6, + "psi_value": 0.12, + "psi_value_source": 3, + "thermal_bridge_type": "P4" + } + ], + "thermal_bridge_code": 5 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.12, + "floor_type": 2, + "kappa_value": 80, + "storey_height": 2.8, + "heat_loss_area": 57.4, + "total_floor_area": 57.4 + }, + { + "storey": 1, + "u_value": 0, + "floor_type": 3, + "kappa_value": 18, + "storey_height": 3, + "heat_loss_area": 0, + "total_floor_area": 57.4, + "kappa_value_from_below": 9 + }, + { + "storey": 2, + "u_value": 0, + "floor_type": 3, + "kappa_value": 19, + "storey_height": 2.7, + "heat_loss_area": 0, + "total_floor_area": 57.4, + "kappa_value_from_below": 9 + } + ], + "construction_age_band": "A" + } + ], + "user_interface_name": "BRE SAP interface 10.2", + "windows_overshading": 2, + "heating_cost_current": { + "value": 365.98, + "currency": "GBP" + }, + "co2_emissions_current": 2.4, + "energy_rating_average": 60, + "energy_rating_current": 72, + "lighting_cost_current": { + "value": 123.45, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 250.34, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 200.4, + "currency": "GBP" + }, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 88, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 74, + "environmental_impact_rating": 94 + }, + { + "sequence": 2, + "typical_saving": { + "value": 88, + "currency": "GBP" + }, + "indicative_cost": "£9,000 - £14,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 80, + "environmental_impact_rating": 96 + } + ], + "user_interface_version": "1.0.1-alpha", + "co2_emissions_potential": 1.4, + "energy_rating_potential": 72, + "gas_smart_meter_present": "false", + "lighting_cost_potential": { + "value": 84.23, + "currency": "GBP" + }, + "schema_version_original": "SAP-Schema-19.1.0", + "hot_water_cost_potential": { + "value": 180.43, + "currency": "GBP" + }, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 2666, + "water_heating": 2650 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 59, + "has_fixed_air_conditioning": "false", + "is_dwelling_export_capable": "true", + "multiple_glazed_percentage": 100, + "calculation_software_version": "13.05r16", + "energy_consumption_potential": 53, + "environmental_impact_current": 94, + "current_energy_efficiency_band": "C", + "environmental_impact_potential": 96, + "electricity_smart_meter_present": "false", + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 5.6 +} \ No newline at end of file diff --git a/backend/epc_api/json_samples/SAP-Schema-19.2.0/epc.json b/backend/epc_api/json_samples/SAP-Schema-19.2.0/epc.json new file mode 100644 index 00000000..26a1cd4d --- /dev/null +++ b/backend/epc_api/json_samples/SAP-Schema-19.2.0/epc.json @@ -0,0 +1,612 @@ +{ + "uprn": 12457, + "roofs": [ + { + "description": "Average thermal transmittance 0.13 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "walls": [ + { + "description": "Average thermal transmittance 0.18 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "floors": [ + { + "description": "Average thermal transmittance 0.12 W/m²K", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + } + ], + "status": "entered", + "tenure": 1, + "windows": { + "description": "High performance glazing", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "lighting": { + "description": "Low energy lighting in 91% of fixed outlets", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "postcode": "A0 0AA", + "data_type": 1, + "hot_water": { + "description": "From main system, waste water heat recovery", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 3 + }, + "post_town": "Whitbury", + "built_form": 4, + "living_area": 41.35, + "orientation": 0, + "region_code": 16, + "report_type": 3, + "sap_heating": { + "thermal_store": 1, + "shower_outlets": [ + { + "shower_wwhrs": 1, + "shower_flow_rate": 7, + "shower_outlet_type": 1 + }, + { + "shower_wwhrs": 2, + "shower_flow_rate": 7, + "shower_outlet_type": 1 + } + ], + "water_fuel_type": 39, + "water_heating_code": 901, + "instantaneous_wwhrs": { + "wwhrs_index_number1": 491123 + }, + "hot_water_store_size": 600, + "main_heating_details": [ + { + "has_fghrs": "false", + "main_fuel_type": 5, + "combi_boiler_type": 4, + "heat_emitter_type": 1, + "main_heating_code": 192, + "main_heating_number": 1, + "is_condensing_boiler": "false", + "main_heating_control": 2106, + "is_interlocked_system": "false", + "main_heating_category": 2, + "main_heating_fraction": 1, + "central_heating_pump_age": 2, + "main_heating_data_source": 3, + "has_separate_delayed_start": "true", + "is_oil_pump_in_heated_space": "false", + "is_main_heating_hetas_approved": "false", + "electric_cpsu_operating_temperature": 80, + "is_central_heating_pump_in_heated_space": "true" + } + ], + "has_hot_water_cylinder": "true", + "has_cylinder_thermostat": "true", + "hot_water_store_heat_loss": 2.45, + "has_fixed_air_conditioning": "false", + "secondary_heating_category": 1, + "is_immersion_for_summer_use": "false", + "is_hot_water_separately_timed": "false", + "sap_community_heating_systems": [ + { + "sub_network_name": "Test 1", + "heat_network_sleeved": 1, + "community_heating_use": 3, + "heat_network_existing": "true", + "heat_network_index_number": 496402, + "heat_network_assessed_as_new": "true", + "heat_network_community_heating": 0, + "community_heating_distribution_type": 5, + "community_heating_distribution_loss_factor": 1.26 + } + ], + "hot_water_store_heat_loss_source": 2, + "is_heat_pump_assisted_by_immersion": "false" + }, + "sap_version": 10.3, + "schema_type": "SAP-Schema-19.2.0", + "uprn_source": "Energy Assessor", + "country_code": "ENG", + "main_heating": [ + { + "description": "Boiler and radiators, electric", + "energy_efficiency_rating": 3, + "environmental_efficiency_rating": 2 + } + ], + "sap_lighting": [ + [ + { + "lighting_power": 60, + "lighting_outlets": 1, + "lighting_efficacy": 11.2 + }, + { + "lighting_power": 14, + "lighting_outlets": 10, + "lighting_efficacy": 66.9 + } + ] + ], + "terrain_type": 1, + "air_tightness": { + "description": "Air permeability 2.0 m³/h.m² (assumed)", + "energy_efficiency_rating": 5, + "environmental_efficiency_rating": 5 + }, + "dwelling_type": "Mid-terrace house", + "language_code": 1, + "property_type": 0, + "address_line_1": "1 Some Street", + "address_line_2": "Some Area", + "address_line_3": "Some County", + "assessment_date": "2022-05-09", + "assessment_type": "SAP", + "completion_date": "2022-05-09", + "inspection_date": "2022-05-09", + "sap_ventilation": { + "psv_count": 0, + "wall_type": 2, + "pressure_test": 2, + "wet_rooms_count": 2, + "air_permeability": 2, + "open_flues_count": 0, + "ventilation_type": 8, + "has_draught_lobby": "false", + "other_flues_count": 0, + "closed_flues_count": 0, + "extract_fans_count": 0, + "boilers_flues_count": 0, + "open_chimneys_count": 0, + "sheltered_sides_count": 2, + "blocked_chimneys_count": 0, + "flueless_gas_fires_count": 0, + "mechanical_vent_duct_type": 2, + "mechanical_vent_duct_placement": 1, + "mechanical_ventilation_data_source": 1, + "mechanical_vent_system_index_number": 500206, + "mechanical_vent_duct_insulation_level": 2, + "is_mechanical_vent_approved_installer_scheme": "true" + }, + "sap_data_version": 10.3, + "total_floor_area": 165, + "transaction_type": 1, + "cold_water_source": 1, + "conservatory_type": 1, + "registration_date": "2022-05-09", + "sap_energy_source": { + "wind_turbines": [ + { + "wind_turbine_hub_height": 3, + "wind_turbine_rotor_diameter": 1.7 + }, + { + "wind_turbine_hub_height": 3, + "wind_turbine_rotor_diameter": 1.7 + } + ], + "electricity_tariff": 5 + }, + "sap_opening_types": [ + { + "name": "Doors", + "type": 1, + "u_value": 1.5, + "data_source": 2, + "glazing_type": 1, + "isargonfilled": "false" + }, + { + "name": "Windows (1)", + "type": 4, + "u_value": 1.4, + "frame_type": 1, + "data_source": 3, + "glazing_gap": 3, + "frame_factor": 0.7, + "glazing_type": 11, + "isargonfilled": "true", + "solar_transmittance": 0.57 + }, + { + "name": "Windows (2)", + "type": 4, + "u_value": 1.5, + "frame_type": 1, + "data_source": 3, + "glazing_gap": 3, + "frame_factor": 0.7, + "glazing_type": 9, + "isargonfilled": "true", + "solar_transmittance": 0.64 + } + ], + "secondary_heating": { + "description": "None", + "energy_efficiency_rating": 0, + "environmental_efficiency_rating": 0 + }, + "lowest_storey_area": 57.4, + "sap_building_parts": [ + { + "sap_roofs": [ + { + "name": "Roof (1)", + "u_value": 0.13, + "roof_type": 2, + "kappa_value": 9, + "total_roof_area": 57.4 + } + ], + "sap_walls": [ + { + "name": "Walls (1)", + "u_value": 0.18, + "wall_type": 2, + "kappa_value": 60, + "total_wall_area": 111.34, + "is_curtain_walling": "false" + }, + { + "name": "Party wall", + "u_value": 0, + "wall_type": 4, + "kappa_value": 0, + "total_wall_area": 167, + "is_curtain_walling": "false" + }, + { + "name": "Internal wall (1)", + "u_value": 0, + "wall_type": 5, + "kappa_value": 0, + "total_wall_area": 320, + "is_curtain_walling": "false" + } + ], + "identifier": "Main Dwelling", + "sap_openings": [ + { + "name": 1, + "type": "Doors", + "width": 1, + "height": 2.25, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 2, + "type": "Doors", + "width": 0.8, + "height": 2.1, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 3, + "type": "Windows (2)", + "width": 1.6, + "height": 2.7, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 4, + "type": "Windows (1)", + "width": 1.1, + "height": 1.75, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 5, + "type": "Windows (1)", + "width": 1.1, + "height": 1.75, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 6, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 7, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 8, + "type": "Windows (1)", + "width": 1.1, + "height": 1.8, + "location": "Walls (1)", + "orientation": 3 + }, + { + "name": 9, + "type": "Windows (1)", + "width": 1.1, + "height": 1.75, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 10, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 11, + "type": "Windows (1)", + "width": 1.1, + "height": 1.85, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 12, + "type": "Windows (1)", + "width": 0.6, + "height": 0.8, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 13, + "type": "Windows (1)", + "width": 0.8, + "height": 1.25, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 14, + "type": "Windows (1)", + "width": 0.8, + "height": 1.25, + "location": "Walls (1)", + "orientation": 7 + }, + { + "name": 15, + "type": "Windows (1)", + "width": 1.1, + "height": 1.25, + "location": "Walls (1)", + "orientation": 7 + } + ], + "sap_thermal_bridges": { + "thermal_bridges": [ + { + "length": 15.5, + "psi_value": 0.3, + "psi_value_source": 2, + "thermal_bridge_type": "E2" + }, + { + "length": 12.1, + "psi_value": 0.04, + "psi_value_source": 2, + "thermal_bridge_type": "E3" + }, + { + "length": 52.1, + "psi_value": 0.05, + "psi_value_source": 2, + "thermal_bridge_type": "E4" + }, + { + "length": 14.4, + "psi_value": 0.16, + "psi_value_source": 2, + "thermal_bridge_type": "E5" + }, + { + "length": 25.8, + "psi_value": 0.07, + "psi_value_source": 2, + "thermal_bridge_type": "E6" + }, + { + "length": 10.4, + "psi_value": 0.06, + "psi_value_source": 2, + "thermal_bridge_type": "E10" + }, + { + "length": 5.4, + "psi_value": 0.06, + "psi_value_source": 3, + "thermal_bridge_type": "E14" + }, + { + "length": 5.8, + "psi_value": 0.09, + "psi_value_source": 2, + "thermal_bridge_type": "E16" + }, + { + "length": 5.8, + "psi_value": -0.09, + "psi_value_source": 2, + "thermal_bridge_type": "E17" + }, + { + "length": 34, + "psi_value": 0.06, + "psi_value_source": 2, + "thermal_bridge_type": "E18" + }, + { + "length": 20.6, + "psi_value": 0.12, + "psi_value_source": 3, + "thermal_bridge_type": "P1" + }, + { + "length": 20.6, + "psi_value": 0, + "psi_value_source": 4, + "thermal_bridge_type": "P2" + }, + { + "length": 20.6, + "psi_value": 0.12, + "psi_value_source": 3, + "thermal_bridge_type": "P4" + } + ], + "thermal_bridge_code": 5 + }, + "building_part_number": 1, + "sap_floor_dimensions": [ + { + "storey": 0, + "u_value": 0.12, + "floor_type": 2, + "kappa_value": 80, + "storey_height": 2.8, + "heat_loss_area": 57.4, + "total_floor_area": 57.4 + }, + { + "storey": 1, + "u_value": 0, + "floor_type": 3, + "kappa_value": 18, + "storey_height": 3, + "heat_loss_area": 0, + "total_floor_area": 57.4, + "kappa_value_from_below": 9 + }, + { + "storey": 2, + "u_value": 0, + "floor_type": 3, + "kappa_value": 19, + "storey_height": 2.7, + "heat_loss_area": 0, + "total_floor_area": 57.4, + "kappa_value_from_below": 9 + } + ], + "construction_age_band": "A" + } + ], + "user_interface_name": "BRE SAP interface 10.3", + "windows_overshading": 2, + "heating_cost_current": { + "value": 365.98, + "currency": "GBP" + }, + "co2_emissions_current": 2.4, + "energy_rating_average": 60, + "energy_rating_current": 72, + "lighting_cost_current": { + "value": 123.45, + "currency": "GBP" + }, + "main_heating_controls": [ + { + "description": "Programmer, room thermostat and TRVs", + "energy_efficiency_rating": 4, + "environmental_efficiency_rating": 4 + } + ], + "has_hot_water_cylinder": "true", + "heating_cost_potential": { + "value": 250.34, + "currency": "GBP" + }, + "hot_water_cost_current": { + "value": 200.4, + "currency": "GBP" + }, + "suggested_improvements": [ + { + "sequence": 1, + "typical_saving": { + "value": 88, + "currency": "GBP" + }, + "indicative_cost": "£4,000 - £6,000", + "improvement_type": "N", + "improvement_details": { + "improvement_number": 19 + }, + "improvement_category": 5, + "energy_performance_rating": 74, + "environmental_impact_rating": 94 + }, + { + "sequence": 2, + "typical_saving": { + "value": 88, + "currency": "GBP" + }, + "indicative_cost": "£9,000 - £14,000", + "improvement_type": "U", + "improvement_details": { + "improvement_number": 34 + }, + "improvement_category": 5, + "energy_performance_rating": 80, + "environmental_impact_rating": 96 + } + ], + "user_interface_version": "1.0.1-alpha", + "co2_emissions_potential": 1.4, + "energy_rating_potential": 72, + "gas_smart_meter_present": "false", + "lighting_cost_potential": { + "value": 84.23, + "currency": "GBP" + }, + "part_o_cooling_required": 1, + "schema_version_original": "SAP-Schema-19.2.0", + "hot_water_cost_potential": { + "value": 180.43, + "currency": "GBP" + }, + "is_in_smoke_control_area": "unknown", + "renewable_heat_incentive": { + "rhi_new_dwelling": { + "space_heating": 2666, + "water_heating": 2650 + } + }, + "seller_commission_report": "Y", + "energy_consumption_current": 59, + "has_fixed_air_conditioning": "false", + "is_dwelling_export_capable": "true", + "multiple_glazed_percentage": 100, + "calculation_software_version": "13.05r16", + "energy_consumption_potential": 53, + "environmental_impact_current": 94, + "current_energy_efficiency_band": "C", + "environmental_impact_potential": 96, + "electricity_smart_meter_present": "false", + "has_heated_separate_conservatory": "false", + "potential_energy_efficiency_band": "C", + "co2_emissions_current_per_floor_area": 5.6 +} \ No newline at end of file diff --git a/etl/bill_savings/KwhData.py b/etl/bill_savings/KwhData.py index 266f4b72..30e11698 100644 --- a/etl/bill_savings/KwhData.py +++ b/etl/bill_savings/KwhData.py @@ -203,7 +203,7 @@ class KwhData: # TODO: New is a temporary parameter, which will transform the epc descriptions to their transformed features # in anticipation of the new model - data["lodgement-date"] = pd.to_datetime(data["lodgement-date"]) + data["lodgement-date"] = pd.to_datetime(data["lodgement-date"], format="mixed", errors="coerce") data["lodgement-year"] = data["lodgement-date"].dt.year data["lodgement-month"] = data["lodgement-date"].dt.month @@ -331,8 +331,8 @@ class KwhData: def prepare_epc(self, input_properties: list[Property]): scoring_data = pd.DataFrame([self._prepare_epc(p) for p in input_properties]) - scoring_data["lodgement-year"] = pd.to_datetime(scoring_data["lodgement-date"]).dt.year - scoring_data["lodgement-month"] = pd.to_datetime(scoring_data["lodgement-date"]).dt.month + scoring_data["lodgement-year"] = pd.to_datetime(scoring_data["lodgement-date"], format="mixed").dt.year + scoring_data["lodgement-month"] = pd.to_datetime(scoring_data["lodgement-date"], format="mixed").dt.month scoring_data["id"] = scoring_data["uprn"].copy() diff --git a/etl/find_my_epc/RetrieveFindMyEpc.py b/etl/find_my_epc/RetrieveFindMyEpc.py index 392e6aaa..16b7d8b9 100644 --- a/etl/find_my_epc/RetrieveFindMyEpc.py +++ b/etl/find_my_epc/RetrieveFindMyEpc.py @@ -472,8 +472,8 @@ class RetrieveFindMyEpc: address_response = requests.get(chosen_epc, headers=self.HEADERS) epc_page_source = address_response.text address_res = BeautifulSoup(address_response.text, features="html.parser") - elif self.rrn: - epc_certificate = self.rrn + elif self.rrn or rrn: + epc_certificate = self.rrn if self.rrn else rrn chosen_epc = f"{self.BASE_ENERGY_URL}/energy-certificate/{epc_certificate}" address_response = requests.get(chosen_epc, headers=self.HEADERS) epc_page_source = address_response.text @@ -497,7 +497,7 @@ class RetrieveFindMyEpc: current_sap = int(current_rating.split(' ')[-1]) if self.sap_rating: - if current_sap != self.sap_rating: + if current_sap != self.sap_rating and not rrn: # This means we likely have the wrong data. If we are in this scenario, we return nothing return { "epc_certificate": None, @@ -734,6 +734,8 @@ class RetrieveFindMyEpc: "Step 1:": [], "Step 2:": [], 'Step 3:': [], + 'Step 4:': [], + 'Step 5:': [], "Biomass stove with boiler": [], "Replace boiler with biomass boiler": [], "Heating controls (room thermostat and thermostatic radiator valves)": [ @@ -820,6 +822,10 @@ class RetrieveFindMyEpc: "recommendations": find_epc_data.get("recommendations", []), } + lodgment_date = find_epc_data.get("Date of certificate", None) + if not pd.isnull(lodgment_date): + lodgment_date = str(datetime.strptime(str(lodgment_date), "%d %B %Y")) + # We need to add the patch information patch = { "current-energy-rating": find_epc_data.get("current_epc_rating"), @@ -827,6 +833,7 @@ class RetrieveFindMyEpc: "potential-energy-rating": find_epc_data.get("potential_epc_rating"), "potential-energy-efficiency": find_epc_data.get("potential_epc_efficiency"), **find_epc_data.get("epc_data", {}), + "lodgement-date": lodgment_date } page_source = { diff --git a/infrastructure/terraform/lambda/ecmk_to_ara/main.tf b/infrastructure/terraform/lambda/ecmk_to_ara/main.tf new file mode 100644 index 00000000..357c2f87 --- /dev/null +++ b/infrastructure/terraform/lambda/ecmk_to_ara/main.tf @@ -0,0 +1,27 @@ +data "terraform_remote_state" "shared" { + backend = "s3" + config = { + bucket = "assessment-model-terraform-state" + key = "env:/${var.stage}/terraform.tfstate" + region = "eu-west-2" + } +} + +module "lambda" { + source = "../../modules/lambda_with_sqs" + + name = "ecmk_to_ara" #"address2uprn" for example + stage = var.stage + + image_uri = local.image_uri + + # Optional: Set maximum_concurrency to limit concurrent SQS-triggered invocations (2-1000) + maximum_concurrency = var.maximum_concurrency + + batch_size = var.batch_size + + environment = { + STAGE = var.stage + LOG_LEVEL = "info" + } +} diff --git a/infrastructure/terraform/lambda/ecmk_to_ara/provider.tf b/infrastructure/terraform/lambda/ecmk_to_ara/provider.tf new file mode 100644 index 00000000..87a94150 --- /dev/null +++ b/infrastructure/terraform/lambda/ecmk_to_ara/provider.tf @@ -0,0 +1,16 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 5.0" + } + } + + backend "s3" { + bucket = "ecmk-to-ara-terraform-state" + key = "terraform.tfstate" + region = "eu-west-2" + } + + required_version = ">= 1.2.0" +} \ No newline at end of file diff --git a/infrastructure/terraform/lambda/ecmk_to_ara/variables.tf b/infrastructure/terraform/lambda/ecmk_to_ara/variables.tf new file mode 100644 index 00000000..984e3908 --- /dev/null +++ b/infrastructure/terraform/lambda/ecmk_to_ara/variables.tf @@ -0,0 +1,37 @@ +variable "lambda_name" { + type = string + description = "Logical name of the lambda (e.g. address2uprn)" +} + +variable "stage" { + description = "Deployment stage (e.g. dev, prod)" + type = string +} +variable "ecr_repo_url" { + type = string + description = "ECR repository URL (no tag, no digest)" +} + +variable "image_digest" { + type = string + description = "Image digest (sha256:...)" +} + +variable "maximum_concurrency" { + type = number + default = 2 + description = "Maximum number of concurrent Lambda invocations from SQS (2-1000). null = no limit." +} + +variable "batch_size" { + type = number + default = 1 +} + +locals { + image_uri = "${var.ecr_repo_url}@${var.image_digest}" +} + +output "resolved_image_uri" { + value = local.image_uri +} diff --git a/infrastructure/terraform/shared/main.tf b/infrastructure/terraform/shared/main.tf index 9d272eb6..47866c92 100644 --- a/infrastructure/terraform/shared/main.tf +++ b/infrastructure/terraform/shared/main.tf @@ -538,6 +538,20 @@ module "pashub_to_ara_registry" { stage = var.stage } +################################################ +# ECMK to Ara – Lambda +################################################ +module "ecmk_to_ara_state_bucket" { + source = "../modules/tf_state_bucket" + bucket_name = "ecmk-to-ara-terraform-state" +} + +module "ecmk_to_ara_registry" { + source = "../modules/container_registry" + name = "ecmk_to_ara" + stage = var.stage +} + ################################################ # Engine – Lambda ECR ################################################