ha13 49% matched

This commit is contained in:
Khalim Conn-Kowlessar 2024-03-08 19:20:38 +00:00
parent 15efd02b8b
commit b2b8fd8f84

View file

@ -224,6 +224,12 @@ class DataLoader:
asset_list["Address3"].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 == "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() + ", " + \
asset_list["Address 3"].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 == "HA14":
# Create matching_address by concatenating Address 1, Address 2, Address 3, Address 4, Postcode
asset_list["matching_address"] = asset_list["Address 1"].astype(str).str.lower().str.strip() + ", " + \
@ -1604,6 +1610,19 @@ class DataLoader:
return survey_list
@staticmethod
def correct_ha13_survey_list(survey_list):
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
"Woodfarm Road", "WOOD FARM ROAD"
)
survey_list["Street / Block Name"] = survey_list["Street / Block Name"].str.replace(
"ALLANDALE ROAD", "ALLANDALE"
)
return survey_list
@staticmethod
def levenstein_match(matching_string, df):
match_to = df["matching_address"].tolist()
@ -4525,8 +4544,8 @@ def app():
# Add in:
priority_has = [
"HA1", "HA2", "HA6", "HA7", "HA12", "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", "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]