done ha11

This commit is contained in:
Khalim Conn-Kowlessar 2024-03-17 14:25:49 +00:00
parent a7ed3b84e5
commit 94ad067263

View file

@ -530,6 +530,12 @@ class DataLoader:
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 == "HA11":
asset_list["matching_address"] = asset_list["Address 1"].astype(str).str.lower().str.strip() + ", " + \
asset_list["Address 2"].astype(str).str.lower().str.strip() + ", " + \
asset_list["Address 3"].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 == "HA13":
asset_list["matching_address"] = asset_list["Address 1"].astype(str).str.lower().str.strip() + ", " + \
asset_list["address 2"].astype(str).str.lower().str.strip() + ", " + \
@ -2322,6 +2328,15 @@ class DataLoader:
return survey_list
@staticmethod
def correct_ha11_survey_list(survey_list):
# Remove 39 HOLLYWOOD WAY as it's not in the asset list
survey_list = survey_list[
~((survey_list["Street / Block Name"] == "HOLLYWOOD WAY") &
(survey_list["NO."] == 39))
]
return survey_list
@staticmethod
def levenstein_match(matching_string, df):
match_to = df["matching_address"].tolist()
@ -6015,7 +6030,7 @@ def app():
"HA27", "HA28", "HA30", "HA31", "HA32", "HA34", "HA35", "HA39", "HA41", "HA48", "HA49", "HA50", "HA54", "HA56",
"HA63", "HA107", "HA117",
# Added as of March 17th
"HA8",
"HA8", "HA11",
# New HAS
"HAXX", "HAXXX",
]