mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
Added ha7
This commit is contained in:
parent
eb216e55d3
commit
2a4d16162a
1 changed files with 16 additions and 8 deletions
|
|
@ -49,8 +49,19 @@ PROPERTY_TYPE_LOOKUP = {
|
|||
}
|
||||
},
|
||||
"HA7": {
|
||||
"property_type": {},
|
||||
"built_form": {}
|
||||
"property_type": {
|
||||
"House": "House",
|
||||
"Flat": "Flat",
|
||||
"Bungalow": "Bungalow",
|
||||
"Maisonette": "Maisonette",
|
||||
},
|
||||
"built_form": {
|
||||
"Semi Detached": "Semi-Detached",
|
||||
"Mid Terrace": "Mid-Terrace",
|
||||
"End Terrace": "End-Terrace",
|
||||
"Detached": "Detached",
|
||||
"End Terraced": "End-Terrace",
|
||||
}
|
||||
},
|
||||
"HA14": {
|
||||
"property_type": {
|
||||
|
|
@ -1042,6 +1053,9 @@ def get_property_type_and_built_form(property_meta, ha_name):
|
|||
elif ha_name == "HA6":
|
||||
property_type = PROPERTY_TYPE_LOOKUP[ha_name]["property_type"][property_meta["Dwelling type"]]
|
||||
built_form = property_meta["built_form"]
|
||||
elif ha_name == "HA7":
|
||||
property_type = PROPERTY_TYPE_LOOKUP[ha_name]["property_type"][property_meta["Archetype"]]
|
||||
built_form = PROPERTY_TYPE_LOOKUP[ha_name]["built_form"][property_meta["Property Type"]]
|
||||
elif ha_name == "HA14":
|
||||
if property_meta["Asset Type Description"] == "Block - Repair":
|
||||
# We try and deduce if it's a flat or house, depending on if it has "room" or "flats" in the address
|
||||
|
|
@ -1106,9 +1120,6 @@ def get_epc_data(
|
|||
outputs = {}
|
||||
for ha_name, data_assets in loader.data.items():
|
||||
|
||||
if ha_name == "HA39":
|
||||
continue
|
||||
|
||||
if not pull_data:
|
||||
# Then we retrieve the data from S3
|
||||
processed_ha_results = read_pickle_from_s3(
|
||||
|
|
@ -1135,7 +1146,6 @@ def get_epc_data(
|
|||
scoring_data = []
|
||||
nodata = []
|
||||
failed_model_rows = []
|
||||
# Failed at index 13691
|
||||
for index, property_meta in tqdm(asset_list.iterrows(), total=len(asset_list)):
|
||||
|
||||
if property_meta["matching_postcode"] is None:
|
||||
|
|
@ -1906,8 +1916,6 @@ def app():
|
|||
loader.load()
|
||||
loader.ha_facts_and_figures()
|
||||
|
||||
loader.facts_and_figures.to_csv("facts_and_figures.csv", index=False)
|
||||
|
||||
# We load in the additional data required to perform the analysis
|
||||
cleaned = read_from_s3(
|
||||
s3_file_name="cleaned_epc_data/cleaned.bson",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue