mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
HA117 data load
This commit is contained in:
parent
76ef60d06c
commit
e3f36fc881
1 changed files with 22 additions and 5 deletions
|
|
@ -188,7 +188,8 @@ class DataLoader:
|
||||||
"HA25": 154,
|
"HA25": 154,
|
||||||
"HA41": 26,
|
"HA41": 26,
|
||||||
"HA50": 5,
|
"HA50": 5,
|
||||||
"HA63": 0
|
"HA63": 0,
|
||||||
|
"HA117": 4
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, directories, december_figures_filepath, use_cache, rebuild):
|
def __init__(self, directories, december_figures_filepath, use_cache, rebuild):
|
||||||
|
|
@ -308,6 +309,11 @@ class DataLoader:
|
||||||
asset_list["District"].astype(str).str.lower().str.strip() + ", " + \
|
asset_list["District"].astype(str).str.lower().str.strip() + ", " + \
|
||||||
asset_list["Postcode"].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()
|
asset_list["matching_postcode"] = asset_list["Postcode"].astype(str).str.lower().str.strip()
|
||||||
|
elif ha_name == "HA117":
|
||||||
|
asset_list["matching_address"] = asset_list["Address1"].astype(str).str.lower().str.strip() + ", " + \
|
||||||
|
asset_list["Address2"].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()
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError("implement me")
|
raise NotImplementedError("implement me")
|
||||||
|
|
||||||
|
|
@ -1800,6 +1806,17 @@ class DataLoader:
|
||||||
|
|
||||||
return eco3_list
|
return eco3_list
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def correct_ha117_eco3_list(eco3_list):
|
||||||
|
# Delete rows where postcode is null - there are some placeholder rows where this happens
|
||||||
|
eco3_list = eco3_list[~pd.isnull(eco3_list["Post Code"])]
|
||||||
|
|
||||||
|
eco3_list["Street / Block Name"] = eco3_list["Street / Block Name"].str.replace(
|
||||||
|
"TARRING ROAD", "155 TARRING ROAD"
|
||||||
|
)
|
||||||
|
|
||||||
|
return eco3_list
|
||||||
|
|
||||||
def merge_eco3_to_assets(self, asset_list, eco3_list, ha_name):
|
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")
|
eco3_list_correction_function = getattr(self, f"correct_{ha_name.lower()}_eco3_list")
|
||||||
|
|
@ -4505,13 +4522,13 @@ def app():
|
||||||
# Add in:
|
# Add in:
|
||||||
priority_has = [
|
priority_has = [
|
||||||
"HA1", "HA2", "HA6", "HA7", "HA12", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA39", "HA41",
|
"HA1", "HA2", "HA6", "HA7", "HA12", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA39", "HA41",
|
||||||
"HA48", "HA50", "HA63", "HA107",
|
"HA48", "HA50", "HA63", "HA107", "HA117"
|
||||||
]
|
]
|
||||||
# Next HAs to do: 14 [DONE], 15[DONE], 32 [DONE], 33 [Input format is 4 parts and no eco4 jobs identified - come
|
# 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], 28 [DONE], 41 [DONE], 50 [DONE], 48 [DONE], 2 [DONE], 63 [DONE], 12 [DONE]
|
# back on this], 28 [DONE], 41 [DONE], 50 [DONE], 48 [DONE], 2 [DONE], 63 [DONE], 12 [DONE]
|
||||||
#
|
# 117 [WIP]
|
||||||
# Consider for ECO4: 13, 136, 117
|
# Consider for ECO4: 13
|
||||||
# COnsider for GBIS: 56, 35, 34
|
# Consider for GBIS: 56, 35, 34
|
||||||
# Ignore for now:
|
# Ignore for now:
|
||||||
# 38 [problematic, but no ECO4], 10 problematic (no eligibility), 20 has barely any in
|
# 38 [problematic, but no ECO4], 10 problematic (no eligibility), 20 has barely any in
|
||||||
# Filter down the directories to only the priority HAs
|
# Filter down the directories to only the priority HAs
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue