diff --git a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py index 1bb0f0c4..14b6dfcf 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -485,7 +485,7 @@ def get_epc_data( # If the survey list is missing, it means we have no yet completed any surveys and therefore should only # consider the most recent EPC - consider_penultimate_epc = data_assets["survey_list"] is None + consider_penultimate_epc = data_assets["survey_list"] is not None # We iterate through the asset list and pull what we need results = [] @@ -669,6 +669,22 @@ def app(): ) cleaned = msgpack.unpackb(cleaned, raw=False) + # Patch to handle the a missing description + cleaned["floor-description"].extend( + [ + {'original_description': 'To external air, uninsulated (assumed)', + 'clean_description': 'To external air, no insulation', 'thermal_transmittance': None, + 'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': False, + 'is_to_external_air': True, 'is_suspended': False, 'is_solid': False, 'another_property_below': False, + 'insulation_thickness': 'none'}, + {'original_description': 'To unheated space, uninsulated (assumed)', + 'clean_description': 'To unheated space, uninsulated', 'thermal_transmittance': None, + 'thermal_transmittance_unit': None, 'is_assumed': True, 'is_to_unheated_space': True, + 'is_to_external_air': False, 'is_suspended': False, 'is_solid': False, 'another_property_below': False, + 'insulation_thickness': 'average'} + ] + ) + cleaning_data = read_dataframe_from_s3_parquet( bucket_name="retrofit-data-dev", file_key="sap_change_model/cleaning_dataset.parquet", )