patching eligibility for missing rows in cleaned_lookup

This commit is contained in:
Khalim Conn-Kowlessar 2024-01-24 12:19:44 +00:00
parent f2872def64
commit 60e3221fa3

View file

@ -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",
)