From 768a0385e3a2cf7fc29b86b827cfb43d914e4621 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Sat, 9 Mar 2024 17:02:33 +0000 Subject: [PATCH] ha35 data read --- .../ha_15_32/ha_analysis_batch_3.py | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) 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 7ddc9844..ea0078c2 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -276,6 +276,13 @@ class DataLoader: 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 == "HA35": + asset_list["matching_address"] = 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["Address Post Code"].astype(str).str.lower().str.strip() + asset_list["matching_postcode"] = asset_list["Address Post Code"].astype(str).str.lower().str.strip() elif ha_name == "HA38": asset_list["matching_address"] = asset_list["House_Number"].astype(str).str.lower().str.strip() + ", " + \ asset_list["Address_Line_1"].astype(str).str.lower().str.strip() + ", " + \ @@ -1648,6 +1655,13 @@ class DataLoader: return survey_list + @staticmethod + def correct_ha35_survey_list(survey_list): + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "BALLADIER WLAK", "BALLADIER WALK" + ) + return survey_list + @staticmethod def levenstein_match(matching_string, df): match_to = df["matching_address"].tolist() @@ -4673,14 +4687,14 @@ def app(): # Add in: priority_has = [ - "HA1", "HA2", "HA6", "HA7", "HA12", "HA13", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA39", - "HA41", "HA48", "HA50", "HA63", "HA107", "HA117" + "HA1", "HA2", "HA6", "HA7", "HA12", "HA13", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA35", + "HA39", "HA41", "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 - # back on this], 28 [DONE], 41 [DONE], 50 [DONE], 48 [DONE], 2 [DONE], 63 [DONE], 12 [DONE], 117 [DONE] - # 13 [WIP] + # back on this], 28 [DONE], 41 [DONE], 50 [DONE], 48 [DONE], 2 [DONE], 63 [DONE], 12 [DONE], 117 [DONE], 13 [DONE] + # 35 [WIP] # Consider for ECO4: - # Consider for GBIS: 56, 35, 34 + # Consider for GBIS: 56, 34 # Ignore for now: # 38 [problematic, but no ECO4], 10 problematic (no eligibility), 20 has barely any in # Filter down the directories to only the priority HAs