diff --git a/asset_list/AssetList.py b/asset_list/AssetList.py index 72086c60..0156a2a3 100644 --- a/asset_list/AssetList.py +++ b/asset_list/AssetList.py @@ -233,7 +233,8 @@ class AssetList: "secondheat-description": "epc_secondary_heating", "transaction-type": "epc_reason", "energy-consumption-current": "epc_heat_demand", - "photo-supply": "epc_photo_supply" + "photo-supply": "epc_photo_supply", + "estimated": "estimated" } FIND_EPC_DATA_NAMES = { "heating_text": "epc_estiamted_heating_kwh", @@ -714,6 +715,22 @@ class AssetList: columns=self.rename_map ) + # We fill any standard columns that are not in the data because they were not provided by the landlord + missing_variables = [ + v for v in [ + self.STANDARD_EXISTING_PV, + self.STANDARD_HEATING_SYSTEM, + self.STANDARD_UPRN, + self.STANDARD_PROPERTY_TYPE, + self.STANDARD_YEAR_BUILT, + self.STANDARD_WALL_CONSTRUCTION, + self.STANDARD_HEATING_SYSTEM, + self.STANDARD_EXISTING_PV + ] if v not in self.standardised_asset_list.columns + ] + for v in missing_variables: + self.standardised_asset_list[v] = None + def merge_data(self, df: pd.DataFrame): """ Used to insert data into the standardised asset list, based on the domna property id @@ -963,7 +980,6 @@ class AssetList: # Extraction ###################################################### - # TODO When filterting like this, 627 properties are flagged as not needing a CIGA check and 582 are flagged # as needing a CIGA check. What is the logic we should be applying here? self.standardised_asset_list["non_intrusive_indicates_cavity_extraction"] = ( (self.standardised_asset_list["non-intrusives: Construction"] == "CAVITY") & @@ -974,6 +990,15 @@ class AssetList: ) ) + z = self.standardised_asset_list[ + self.standardised_asset_list["non-intrusives: CIGA Check Required"] == "YES" + ] + z["non-intrusives: Insulated"].value_counts() + z["non-intrusives: Material"].value_counts() + z[self.ATTRIBUTE_SAP_THRESHOLD_AND_BELOW].value_counts() + z[self.EPC_API_DATA_NAMES["current-energy-efficiency"]].max() + zz = z[z[self.EPC_API_DATA_NAMES["current-energy-efficiency"]] == 105] + ###################################################### # Solar ######################################################