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 fba30f1f..bdb0d0c4 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -164,6 +164,10 @@ class DataLoader: "address": "T1_Address", "postcode": "matching_postcode" }, + "HA30": { + "address": "A_Address", + "postcode": "A_Postcode" + }, "HA48": { "address": "Full Address", "postcode": "Postcode" @@ -207,7 +211,7 @@ class DataLoader: def create_asset_list_matching_address(self, ha_name, asset_list): - if ha_name in ["HA1", "HA6", "HA12", "HA16", "HA24", "HA48"]: + if ha_name in ["HA1", "HA6", "HA12", "HA16", "HA24", "HA30", "HA48"]: asset_list["matching_address"] = asset_list[ self.COLUMN_CONFIG[ha_name]["address"] ].astype(str).str.lower().str.strip() @@ -1892,6 +1896,27 @@ class DataLoader: return survey_list + @staticmethod + def correct_ha30_survey_list(survey_list): + + survey_list = survey_list[~pd.isnull(survey_list["Post Code"])] + + # Split on / and take the first half + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.split("/").str[0] + + # Not in the asset list + survey_list = survey_list[ + ~((survey_list["Street / Block Name"] == "Horsebridge Road") & + (survey_list["NO."] == 286)) + ] + + survey_list = survey_list[ + ~((survey_list["Street / Block Name"] == "DUTTON WAY") & + (survey_list["NO."] == 9)) + ] + + return survey_list + @staticmethod def levenstein_match(matching_string, df): match_to = df["matching_address"].tolist() @@ -4972,7 +4997,7 @@ def app(): # Add in: priority_has = [ "HA1", "HA2", "HA6", "HA7", "HA9", "HA12", "HA13", "HA14", "HA15", "HA16", "HA18", - "HA19", "HA24", "HA25", "HA27", "HA28", "HA32", + "HA19", "HA24", "HA25", "HA27", "HA28", "HA30", "HA32", # "HA34", "HA35", "HA39", "HA41", "HA48", "HA50", "HA56", "HA63", "HA107", "HA117" ]