mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
ha30 32% matched
This commit is contained in:
parent
efbda5cece
commit
22f3aca336
1 changed files with 27 additions and 2 deletions
|
|
@ -164,6 +164,10 @@ class DataLoader:
|
||||||
"address": "T1_Address",
|
"address": "T1_Address",
|
||||||
"postcode": "matching_postcode"
|
"postcode": "matching_postcode"
|
||||||
},
|
},
|
||||||
|
"HA30": {
|
||||||
|
"address": "A_Address",
|
||||||
|
"postcode": "A_Postcode"
|
||||||
|
},
|
||||||
"HA48": {
|
"HA48": {
|
||||||
"address": "Full Address",
|
"address": "Full Address",
|
||||||
"postcode": "Postcode"
|
"postcode": "Postcode"
|
||||||
|
|
@ -207,7 +211,7 @@ class DataLoader:
|
||||||
|
|
||||||
def create_asset_list_matching_address(self, ha_name, asset_list):
|
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[
|
asset_list["matching_address"] = asset_list[
|
||||||
self.COLUMN_CONFIG[ha_name]["address"]
|
self.COLUMN_CONFIG[ha_name]["address"]
|
||||||
].astype(str).str.lower().str.strip()
|
].astype(str).str.lower().str.strip()
|
||||||
|
|
@ -1892,6 +1896,27 @@ class DataLoader:
|
||||||
|
|
||||||
return survey_list
|
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
|
@staticmethod
|
||||||
def levenstein_match(matching_string, df):
|
def levenstein_match(matching_string, df):
|
||||||
match_to = df["matching_address"].tolist()
|
match_to = df["matching_address"].tolist()
|
||||||
|
|
@ -4972,7 +4997,7 @@ def app():
|
||||||
# Add in:
|
# Add in:
|
||||||
priority_has = [
|
priority_has = [
|
||||||
"HA1", "HA2", "HA6", "HA7", "HA9", "HA12", "HA13", "HA14", "HA15", "HA16", "HA18",
|
"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",
|
# "HA34",
|
||||||
"HA35", "HA39", "HA41", "HA48", "HA50", "HA56", "HA63", "HA107", "HA117"
|
"HA35", "HA39", "HA41", "HA48", "HA50", "HA56", "HA63", "HA107", "HA117"
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue