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 2a1a4b16..4dbf326b 100644 --- a/etl/eligibility/ha_15_32/ha_analysis_batch_3.py +++ b/etl/eligibility/ha_15_32/ha_analysis_batch_3.py @@ -148,6 +148,10 @@ class DataLoader: "address": "propertyaddress", "postcode": "address" # The 'address' column actually contains postcode }, + "HA12": { + "address": "Full Address", + "postcode": "Postcode" + }, "HA16": { "address": "Address", "postcode": "Postcode" @@ -169,6 +173,7 @@ class DataLoader: UNMATCHED_CIGA = { "HA2": 0, "HA6": 117, + "HA12": 6, "HA14": 3, "HA15": 3, "HA16": 7, @@ -198,7 +203,7 @@ class DataLoader: def create_asset_list_matching_address(self, ha_name, asset_list): - if ha_name in ["HA1", "HA6", "HA16", "HA24", "HA48"]: + if ha_name in ["HA1", "HA6", "HA12", "HA16", "HA24", "HA48"]: asset_list["matching_address"] = asset_list[ self.COLUMN_CONFIG[ha_name]["address"] ].astype(str).str.lower().str.strip() @@ -1558,13 +1563,39 @@ class DataLoader: return survey_list @staticmethod - def correct_ha63_survey_list(survey_list): - # Drop some filler rows - survey_list = survey_list[ - ~survey_list[survey_list.columns[0]].isin( - ["NO JOBS SURVEYED JULY 2021 ", "NO JOBS SURVEYED SEPTEMBER 2021"] - ) - ] + def correct_ha12_survey_list(survey_list): + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "Henstone Road", "Hanstone Road" + ) + + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "Lindern avenue", "Linden Avenue" + ) + + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "priness way", "Princess Way" + ) + + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "Worth Crecesent", "Worth Crescent" + ) + + survey_list["Post Code"] = survey_list["Post Code"].str.replace( + "DY117HA", "DY11 7HA" + ) + + survey_list["Post Code"] = survey_list["Post Code"].str.replace( + "DY117HF", "DY11 7HF" + ) + + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "Adderbrook Crescent", "Addenbrooke Crescent" + ) + + survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace( + "Kinver Road", "Kinver Avenue" + ) + return survey_list @staticmethod @@ -2079,6 +2110,7 @@ class DataLoader: "eco4 (subject to ciga/archetype)": "eco4 (subject to ciga)", "eco4 (subject to ciga)": "eco4 (subject to ciga)", "eco4(subject to ciga)": "eco4 (subject to ciga)", + "eco4 subject to ciga": "eco4 (subject to ciga)", } ha_facts_and_figures = [] @@ -4472,13 +4504,13 @@ def app(): # Add in: priority_has = [ - "HA1", "HA2", "HA6", "HA7", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA39", "HA41", "HA48", - "HA50", "HA63", "HA107", + "HA1", "HA2", "HA6", "HA7", "HA12", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA39", "HA41", + "HA48", "HA50", "HA63", "HA107", ] # 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 [WIP] - # Consider for ECO4: 12, 13, 136, 117 + # back on this], 28 [DONE], 41 [DONE], 50 [DONE], 48 [DONE], 2 [DONE], 63 [DONE], 12 [DONE] + # + # Consider for ECO4: 13, 136, 117 # COnsider for GBIS: 56, 35, 34 # Ignore for now: # 38 [problematic, but no ECO4], 10 problematic (no eligibility), 20 has barely any in