From 94ad06726320972b02db779b8f2e9440a0ea9c0e Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Sun, 17 Mar 2024 14:25:49 +0000 Subject: [PATCH] done ha11 --- etl/eligibility/ha_15_32/ha_analysis_batch_3.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py index 67139e40..920ec1b6 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -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", ]