mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
ha38 wip:
This commit is contained in:
parent
87c77e53c0
commit
f8948ff60f
1 changed files with 18 additions and 2 deletions
|
|
@ -234,6 +234,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 == "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() + ", " + \
|
||||
asset_list["Address_Line_2"].astype(str).str.lower().str.strip() + ", " + \
|
||||
asset_list["Address_Line_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 == "HA39":
|
||||
# Create matching_address by concatenating add_1, add_2, add_3, add_4, add_5, post_code
|
||||
asset_list["matching_address"] = asset_list["add_1"].astype(str).str.lower().str.strip() + ", " + \
|
||||
|
|
@ -332,6 +339,8 @@ class DataLoader:
|
|||
asset_list["HouseNo"] = asset_list["Dwelling num"].copy()
|
||||
elif ha_name == "HA28":
|
||||
asset_list["HouseNo"] = asset_list["House Number"].copy()
|
||||
elif ha_name == "HA38":
|
||||
asset_list["HouseNo"] = asset_list["House_Number"].copy()
|
||||
else:
|
||||
split_addresses = asset_list['matching_address'].str.split(',', expand=True)
|
||||
house_numbers = split_addresses[0].str.split(' ', expand=True)
|
||||
|
|
@ -912,6 +921,12 @@ class DataLoader:
|
|||
|
||||
return survey_list
|
||||
|
||||
@staticmethod
|
||||
def correct_ha38_survey_list(survey_list):
|
||||
# Rename the "No" column to "No." to align with the other survey sheets
|
||||
survey_list = survey_list.rename(columns={"NO ": "NO."})
|
||||
return survey_list
|
||||
|
||||
@staticmethod
|
||||
def correct_ha32_survey_list(survey_list):
|
||||
survey_list["Street / Block Name"] = np.where(
|
||||
|
|
@ -3490,10 +3505,11 @@ def app():
|
|||
december_figures_filepath = "local_data/ha_data/HA_December_figures.csv"
|
||||
|
||||
priority_has = [
|
||||
"HA1", "HA6", "HA7", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA39", "HA107",
|
||||
"HA1", "HA6", "HA7", "HA14", "HA15", "HA16", "HA24", "HA25", "HA28", "HA32", "HA38", "HA39", "HA107",
|
||||
]
|
||||
# Next HAs to do: 15[DONE], 32 [DONE], 33 [Input format is 4 parts and no eco4 jobs identified - come back on this],
|
||||
# Then: 28, 41, 38, 10, 14, 20, 48
|
||||
# Then: 28 [DONE],
|
||||
# 38, 41, 10, 14, 20, 48
|
||||
# Filter down the directories to only the priority HAs
|
||||
directories = [d for d in directories if d.split("/")[2] in priority_has]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue