From 07ddf8383b1b290c4855b6e12f6dc60b74be9456 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 27 Jun 2024 17:58:50 +0100 Subject: [PATCH] extended the capturing of u-values from thermal transmittance descriptions --- etl/customers/stonewater/shdf_3_clustering.py | 1 + etl/epc_clean/epc_attributes/attribute_utils.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/etl/customers/stonewater/shdf_3_clustering.py b/etl/customers/stonewater/shdf_3_clustering.py index 8b878f26..caaf84a6 100644 --- a/etl/customers/stonewater/shdf_3_clustering.py +++ b/etl/customers/stonewater/shdf_3_clustering.py @@ -1667,6 +1667,7 @@ def compile_data_final(): 'windows-description': WindowAttributes, 'lighting-description': LightingAttributes } + for variable_to_clean in cleaned.keys(): unique_descriptions = property_attributes[variable_to_clean].unique() diff --git a/etl/epc_clean/epc_attributes/attribute_utils.py b/etl/epc_clean/epc_attributes/attribute_utils.py index 60f4653e..a5326207 100644 --- a/etl/epc_clean/epc_attributes/attribute_utils.py +++ b/etl/epc_clean/epc_attributes/attribute_utils.py @@ -2,8 +2,8 @@ import re import string from typing import Tuple, Union, Dict, List -THERMAL_TRANSMITTANCE_STR = r"average thermal transmittance (-?\d+(\.\d+)?)\s(w/m\S+k)" -THERMAL_TRANSMITTANCE_REGEX = re.compile(THERMAL_TRANSMITTANCE_STR) +THERMAL_TRANSMITTANCE_STR = r"average thermal transmittance\s*[=:-]?\s*(-?\d+(\.\d+)?)\s*[wW]/m\S*[kK]" +THERMAL_TRANSMITTANCE_REGEX = re.compile(THERMAL_TRANSMITTANCE_STR, re.IGNORECASE) DOUBLE_SPACE_PATTERN = re.compile(r"\s+")