mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
simplified fuel code
This commit is contained in:
parent
110cb8070c
commit
8f7e9e0bde
4 changed files with 55 additions and 21 deletions
|
|
@ -59,6 +59,40 @@ def app():
|
|||
Property UPRN
|
||||
"""
|
||||
|
||||
# Lambeth:
|
||||
data_folder = "/Users/khalimconn-kowlessar/Documents/hestia/Customers/Lambeth/December 10th"
|
||||
data_filename = "lambeth_sw2_leigham court estate.xlsx"
|
||||
sheet_name = "Sheet1"
|
||||
postcode_column = 'Postcode'
|
||||
address1_column = "Address"
|
||||
address1_method = None
|
||||
fulladdress_column = None
|
||||
address_cols_to_concat = ["Address"]
|
||||
missing_postcodes_method = None
|
||||
landlord_year_built = None
|
||||
landlord_os_uprn = None
|
||||
landlord_property_type = None
|
||||
landlord_built_form = None
|
||||
landlord_wall_construction = None
|
||||
landlord_roof_construction = None
|
||||
landlord_heating_system = None
|
||||
landlord_existing_pv = None
|
||||
landlord_property_id = "row_id"
|
||||
landlord_sap = None
|
||||
outcomes_filename = None
|
||||
outcomes_sheetname = None
|
||||
outcomes_postcode = None
|
||||
outcomes_houseno = None
|
||||
outcomes_id = None
|
||||
outcomes_address = None
|
||||
master_filepaths = []
|
||||
master_id_colnames = []
|
||||
master_to_asset_list_filepath = None
|
||||
phase = False
|
||||
ecosurv_landlords = None
|
||||
asset_list_header = 0
|
||||
landlord_block_reference = None
|
||||
|
||||
# Maps addresses to uprn in problematic cases
|
||||
manual_uprn_map = {}
|
||||
|
||||
|
|
|
|||
|
|
@ -1416,30 +1416,14 @@ class Property:
|
|||
if not self.is_ashp_valid(measures=["air_source_heat_pump"]):
|
||||
return self.current_energy_consumption
|
||||
|
||||
# If the property currently has an electric boiler, it will still benefit from the ASHP efficiency gain
|
||||
remap_fuel_sources = [
|
||||
"Natural Gas", "LPG", "Wood Logs", "Oil", "Electricity", "Coal", "Smokeless Fuel",
|
||||
"Natural Gas + Solar Thermal", "Anthracite", "Wood Pellets", "LPG + Solar Thermal",
|
||||
"Natural Gas (Community Scheme)"
|
||||
]
|
||||
|
||||
heating_energy_source = self.heating_energy_source
|
||||
hot_water_energy_source = self.hot_water_energy_source
|
||||
heating_consumption = self.energy_consumption_estimates["unadjusted"]["heating"]
|
||||
hotwater_consumption = self.energy_consumption_estimates["unadjusted"]["hot_water"]
|
||||
|
||||
if (heating_energy_source not in remap_fuel_sources) or (
|
||||
hot_water_energy_source not in remap_fuel_sources + ["Electricity + Solar Thermal"]
|
||||
):
|
||||
raise NotImplementedError("Have not implemented estimating electrical consumption for this fuel type")
|
||||
# Adjust the heating consumption to reflect the expected efficiency of an ASHP - broadly 3.0 COP
|
||||
heating_consumption = heating_consumption / (assumed_ashp_efficiency / 100)
|
||||
|
||||
if heating_energy_source in remap_fuel_sources:
|
||||
# Adjust the heating consumption to reflect the expected efficiency of an ASHP
|
||||
heating_consumption = heating_consumption / (assumed_ashp_efficiency / 100)
|
||||
|
||||
if hot_water_energy_source in remap_fuel_sources:
|
||||
# Adjust the hot water consumption to reflect the expected efficiency of an ASHP
|
||||
hotwater_consumption = hotwater_consumption / (assumed_ashp_efficiency / 100)
|
||||
# Adjust the hot water consumption to reflect the expected efficiency of an ASHP
|
||||
hotwater_consumption = hotwater_consumption / (assumed_ashp_efficiency / 100)
|
||||
|
||||
electric_consumption = (
|
||||
heating_consumption +
|
||||
|
|
|
|||
|
|
@ -563,7 +563,7 @@ class SearchEpc:
|
|||
uprn = hash(self.address1 + self.postcode)
|
||||
|
||||
if self.fast:
|
||||
return newest_epc, [], {}, "", "", None
|
||||
return newest_epc, [], {}, "", "", None, ""
|
||||
|
||||
# Retrieve postcode and address
|
||||
address_epc, postcode_epc, address_postal_town = self.format_address(newest_epc=newest_epc)
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ for _, x in tqdm(data.iterrows(), total=len(data)):
|
|||
standardised_ara_list.append(
|
||||
{
|
||||
"landlord_property_id": x["Property Ref."],
|
||||
"domna_address_1": find_epc_data["address1"],
|
||||
"postcode": find_epc_data["postcode"],
|
||||
"landlord_property_type": epc_searcher.newest_epc.get("property-type"),
|
||||
"landlord_built_form": epc_searcher.newest_epc.get("built-form"),
|
||||
"landlord_heating_system": epc_searcher.newest_epc.get("mainheat-description", ""),
|
||||
|
|
@ -73,3 +75,17 @@ for _, x in tqdm(data.iterrows(), total=len(data)):
|
|||
})
|
||||
|
||||
missed_df = pd.DataFrame(missed)
|
||||
|
||||
# Store
|
||||
standardised_ara_df = pd.DataFrame(standardised_ara_list)
|
||||
standardised_ara_df.to_excel(
|
||||
"/Users/khalimconn-kowlessar/Downloads/lincs_rural_standardised_ara_nov_2025.xlsx",
|
||||
index=False,
|
||||
sheet_name="Standardised Asset List"
|
||||
)
|
||||
# Store missed
|
||||
missed_df.to_excel(
|
||||
"/Users/khalimconn-kowlessar/Downloads/lincs_rural_missed_nov_2025.xlsx",
|
||||
index=False,
|
||||
sheet_name="Missed Properties"
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue