mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Added ha41 matching
This commit is contained in:
parent
180c0c53ea
commit
c43349a577
1 changed files with 17 additions and 5 deletions
|
|
@ -174,7 +174,8 @@ class DataLoader:
|
|||
|
||||
UNMATCHED_ECO3 = {
|
||||
"HA25": 154,
|
||||
"HA50": 5
|
||||
"HA41": 26,
|
||||
"HA50": 5,
|
||||
}
|
||||
|
||||
def __init__(self, directories, december_figures_filepath, use_cache, rebuild):
|
||||
|
|
@ -264,6 +265,14 @@ class DataLoader:
|
|||
asset_list["add_5"].astype(str).str.lower().str.strip() + ", " + \
|
||||
asset_list["post_code"].astype(str).str.lower().str.strip()
|
||||
asset_list["matching_postcode"] = asset_list["post_code"].astype(str).str.lower().str.strip()
|
||||
elif ha_name == "HA41":
|
||||
asset_list["matching_address"] = asset_list["AddressLine1"].astype(str).str.lower().str.strip() + ", " + \
|
||||
asset_list["AddressLine2"].astype(str).str.lower().str.strip() + ", " + \
|
||||
asset_list["AddressLine3"].astype(str).str.lower().str.strip() + ", " + \
|
||||
asset_list["AddressLine4"].astype(str).str.lower().str.strip() + ", " + \
|
||||
asset_list["AddressLine5"].astype(str).str.lower().str.strip() + ", " + \
|
||||
asset_list["Postcode"].astype(str).str.lower().str.strip()
|
||||
asset_list["matching_postcode"] = asset_list["Postcode"].astype(str).str.lower().str.strip()
|
||||
elif ha_name == "HA50":
|
||||
asset_list["matching_address"] = asset_list["Address Line 1"].astype(str).str.lower().str.strip() + ", " + \
|
||||
asset_list["Post Code"].astype(str).str.lower().str.strip()
|
||||
|
|
@ -1683,6 +1692,10 @@ class DataLoader:
|
|||
def correct_ha50_eco3_list(eco3_list):
|
||||
return eco3_list
|
||||
|
||||
@staticmethod
|
||||
def correct_ha41_eco3_list(eco3_list):
|
||||
return eco3_list
|
||||
|
||||
def merge_eco3_to_assets(self, asset_list, eco3_list, ha_name):
|
||||
|
||||
eco3_list_correction_function = getattr(self, f"correct_{ha_name.lower()}_eco3_list")
|
||||
|
|
@ -4384,15 +4397,14 @@ def app():
|
|||
# Add in:
|
||||
# TODO: Remove ECO3 sales from HA25
|
||||
priority_has = [
|
||||
"HA1", "HA6", "HA7", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA39", "HA50", "HA107",
|
||||
"HA1", "HA6", "HA7", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA39", "HA41", "HA50", "HA107",
|
||||
]
|
||||
# Next HAs to do: 14 [DONE], 15[DONE], 32 [DONE], 33 [Input format is 4 parts and no eco4 jobs identified - come
|
||||
# back on this],
|
||||
# Then: 28 [DONE],
|
||||
# 41, 48, 50
|
||||
# 38[problematic, but no ECO4], 10 problematic (no eligibility),
|
||||
# 20 has barely any in
|
||||
# TODO - do 50
|
||||
# Ignore for now:
|
||||
# TODO: 38[problematic, but no ECO4], 10 problematic (no eligibility), 20 has barely any in
|
||||
# Filter down the directories to only the priority HAs
|
||||
directories = [d for d in directories if d.split("/")[2] in priority_has]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue