mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Added ha20
This commit is contained in:
parent
443aa585d0
commit
6ccfff0411
1 changed files with 46 additions and 4 deletions
|
|
@ -566,7 +566,8 @@ class DataLoader:
|
||||||
"HA107": 51,
|
"HA107": 51,
|
||||||
"HA48": 0,
|
"HA48": 0,
|
||||||
"HA45": 0,
|
"HA45": 0,
|
||||||
"HA52": 5
|
"HA52": 5,
|
||||||
|
"HA20": 6
|
||||||
}
|
}
|
||||||
|
|
||||||
UNMATCHED_ECO3 = {
|
UNMATCHED_ECO3 = {
|
||||||
|
|
@ -669,6 +670,17 @@ class DataLoader:
|
||||||
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 == "HA20":
|
||||||
|
asset_list["matching_address"] = (
|
||||||
|
asset_list["House Name"].astype(str).str.lower().str.strip() + ", " +
|
||||||
|
asset_list["Block"].astype(str).str.lower().str.strip() + ", " +
|
||||||
|
asset_list["Address Line 1"].astype(str).str.lower().str.strip() + ", " +
|
||||||
|
asset_list["Address Line 2"].astype(str).str.lower().str.strip() + ", " +
|
||||||
|
asset_list["Address Line 3"].astype(str).str.lower().str.strip() + ", " +
|
||||||
|
asset_list["Address Line 4"].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 == "HA21":
|
elif ha_name == "HA21":
|
||||||
asset_list["matching_address"] = (
|
asset_list["matching_address"] = (
|
||||||
asset_list["Address"].astype(str).str.lower().str.strip() + ", " +
|
asset_list["Address"].astype(str).str.lower().str.strip() + ", " +
|
||||||
|
|
@ -2697,6 +2709,35 @@ class DataLoader:
|
||||||
def correct_ha5_survey_list(survey_list):
|
def correct_ha5_survey_list(survey_list):
|
||||||
return survey_list
|
return survey_list
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def correct_ha20_survey_list(survey_list):
|
||||||
|
# Not in the asset list
|
||||||
|
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
|
||||||
|
"Abbot Close", "ABBOTS CLOSE"
|
||||||
|
)
|
||||||
|
|
||||||
|
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
|
||||||
|
"Downbarns Road", "DOWN BARNS ROAD"
|
||||||
|
)
|
||||||
|
|
||||||
|
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
|
||||||
|
"Austin Lane", "AUSTINS LANE"
|
||||||
|
)
|
||||||
|
|
||||||
|
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
|
||||||
|
"South Park Way", "SOUTHPARK WAY"
|
||||||
|
)
|
||||||
|
|
||||||
|
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
|
||||||
|
"OAKLAND ROAD", "OAKWOOD ROAD"
|
||||||
|
)
|
||||||
|
|
||||||
|
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
|
||||||
|
"ACRE WAY/NORTHWOOD", "ACRE WAY"
|
||||||
|
)
|
||||||
|
|
||||||
|
return survey_list
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def levenstein_match(matching_string, df):
|
def levenstein_match(matching_string, df):
|
||||||
match_to = df["matching_address"].tolist()
|
match_to = df["matching_address"].tolist()
|
||||||
|
|
@ -3301,7 +3342,8 @@ class DataLoader:
|
||||||
"AFF0RDALE WARMTH": "ECO4",
|
"AFF0RDALE WARMTH": "ECO4",
|
||||||
"ECO 4 RdSAP CL": "ECO4",
|
"ECO 4 RdSAP CL": "ECO4",
|
||||||
"Affordable Warmth (R) ": "ECO4",
|
"Affordable Warmth (R) ": "ECO4",
|
||||||
"Affordable Warmth ": "ECO4"
|
"Affordable Warmth ": "ECO4",
|
||||||
|
"ECO 4 AFFORDABLE WARMTH": "ECO4",
|
||||||
}
|
}
|
||||||
|
|
||||||
# Since it seems like "subject to archetype check" has some failure conditions, for simplicity, we
|
# Since it seems like "subject to archetype check" has some failure conditions, for simplicity, we
|
||||||
|
|
@ -6478,11 +6520,11 @@ def app():
|
||||||
|
|
||||||
# Add in:
|
# Add in:
|
||||||
priority_has = [
|
priority_has = [
|
||||||
"HA1", "HA2", "HA5", "HA6", "HA7", "HA9", "HA12", "HA13", "HA14", "HA15", "HA16", "HA18", "HA19", "HA24",
|
"HA1", "HA2", "HA6", "HA7", "HA9", "HA12", "HA13", "HA14", "HA15", "HA16", "HA18", "HA19", "HA24",
|
||||||
"HA25", "HA27", "HA28", "HA30", "HA31", "HA32", "HA34", "HA35", "HA39", "HA41", "HA48", "HA49", "HA50", "HA54",
|
"HA25", "HA27", "HA28", "HA30", "HA31", "HA32", "HA34", "HA35", "HA39", "HA41", "HA48", "HA49", "HA50", "HA54",
|
||||||
"HA56", "HA63", "HA107", "HA117", "HA8", "HA11", "HA21", "HA37", "HA42",
|
"HA56", "HA63", "HA107", "HA117", "HA8", "HA11", "HA21", "HA37", "HA42",
|
||||||
# Added as of March 18th
|
# Added as of March 18th
|
||||||
"HA44", "HA45", "HA51", "HA52", "HA17",
|
"HA44", "HA45", "HA51", "HA52", "HA17", "HA5", "HA20",
|
||||||
# New HAS
|
# New HAS
|
||||||
"HAXX", "HAXXX",
|
"HAXX", "HAXXX",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue