ha35 data read

This commit is contained in:
Khalim Conn-Kowlessar 2024-03-09 17:02:33 +00:00
parent 1ccb2cdebd
commit 768a0385e3

View file

@ -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