mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
mappings for unkown loft and for thatched
This commit is contained in:
parent
eee99d1358
commit
053142f325
2 changed files with 22 additions and 25 deletions
|
|
@ -108,6 +108,8 @@ class EpcWallDescriptions(Enum):
|
|||
|
||||
class EpcRoofDescriptions(Enum):
|
||||
# Loft
|
||||
# Assumed options
|
||||
pitched_insulated_assumed = "Pitched, insulated (assumed)"
|
||||
# Known insulation at joists - we have 12, 25, 50, 75, 100, 125, 150, 175, 200, 225, 250, 270, 300, 350,
|
||||
# 400+ as options
|
||||
loft_12mm_insulation: str = "Pitched, 12 mm loft insulation"
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
from numpy import nan
|
||||
from tqdm import tqdm
|
||||
import pandas as pd
|
||||
from backend.onboarders.mappings.property_type import parity_map as property_map
|
||||
|
|
@ -290,23 +291,9 @@ roof_aggs = data[["Roof Construction", "Roof Insulation"]].drop_duplicates().to_
|
|||
|
||||
# Pitched, loft
|
||||
|
||||
{'Roof Construction': 'PitchedNormalLoftAccess', 'Roof Insulation': nan},
|
||||
{'Roof Construction': 'PitchedNormalLoftAccess', 'Roof Insulation': 'AsBuilt'},
|
||||
{'Roof Construction': 'PitchedNormalLoftAccess', 'Roof Insulation': 'Unknown'},
|
||||
|
||||
# Flat
|
||||
{'Roof Construction': 'Flat', 'Roof Insulation': 'AsBuilt'},
|
||||
{'Roof Construction': 'Flat', 'Roof Insulation': 'mm100'},
|
||||
{'Roof Construction': 'Flat', 'Roof Insulation': 'mm150'},
|
||||
{'Roof Construction': 'Flat', 'Roof Insulation': nan},
|
||||
|
||||
{'Roof Construction': 'Flat', 'Roof Insulation': 'Unknown'},
|
||||
|
||||
# Thatched
|
||||
{'Roof Construction': 'PitchedThatched', 'Roof Insulation': 'mm150'},
|
||||
{'Roof Construction': 'PitchedThatched', 'Roof Insulation': 'Unknown'},
|
||||
{'Roof Construction': 'PitchedThatched', 'Roof Insulation': 'mm50'},
|
||||
{'Roof Construction': 'PitchedThatched', 'Roof Insulation': 'mm300'},
|
||||
|
||||
# Sloping
|
||||
{'Roof Construction': 'PitchedWithSlopingCeiling', 'Roof Insulation': 'AsBuilt'},
|
||||
|
|
@ -317,10 +304,6 @@ roof_aggs = data[["Roof Construction", "Roof Insulation"]].drop_duplicates().to_
|
|||
{'Roof Construction': 'PitchedWithSlopingCeiling', 'Roof Insulation': 'NoInsulation'},
|
||||
{'Roof Construction': 'PitchedWithSlopingCeiling', 'Roof Insulation': 'Unknown'},
|
||||
|
||||
# Pitched no loft access
|
||||
{'Roof Construction': 'PitchedNormalNoLoftAccess', 'Roof Insulation': nan},
|
||||
{'Roof Construction': 'PitchedNormalNoLoftAccess', 'Roof Insulation': 'Unknown'},
|
||||
{'Roof Construction': 'PitchedNormalNoLoftAccess', 'Roof Insulation': 'AsBuilt'}
|
||||
]
|
||||
|
||||
roof_mapping = {
|
||||
|
|
@ -353,6 +336,16 @@ roof_mapping = {
|
|||
('PitchedNormalNoLoftAccess', 'mm350'): EpcRoofDescriptions.loft_350mm_insulation,
|
||||
('PitchedNormalNoLoftAccess', 'mm400'): EpcRoofDescriptions.loft_400mm_plus_insulation,
|
||||
|
||||
# All pitched options with asbuilt or unknown got to EpcRoofDescriptions.pitched_insulated_assumed
|
||||
# With access
|
||||
('PitchedNormalLoftAccess', nan): EpcRoofDescriptions.pitched_insulated_assumed,
|
||||
('PitchedNormalLoftAccess', 'AsBuilt'): EpcRoofDescriptions.pitched_insulated_assumed,
|
||||
('PitchedNormalLoftAccess', 'Unknown'): EpcRoofDescriptions.pitched_insulated_assumed,
|
||||
# No access
|
||||
('PitchedNormalNoLoftAccess', nan): EpcRoofDescriptions.pitched_insulated_assumed,
|
||||
('PitchedNormalNoLoftAccess', 'AsBuilt'): EpcRoofDescriptions.pitched_insulated_assumed,
|
||||
('PitchedNormalNoLoftAccess', 'Unknown'): EpcRoofDescriptions.pitched_insulated_assumed,
|
||||
|
||||
# Flat
|
||||
('Flat', 'NoInsulation'): EpcRoofDescriptions.flat_no_insulation,
|
||||
# Flat - limited insulation
|
||||
|
|
@ -368,6 +361,10 @@ roof_mapping = {
|
|||
('Flat', 'mm300'): EpcRoofDescriptions.flat_insulated,
|
||||
('Flat', 'mm350'): EpcRoofDescriptions.flat_insulated,
|
||||
('Flat', 'mm400'): EpcRoofDescriptions.flat_insulated,
|
||||
# Flat - as built or unknown
|
||||
('Flat', 'AsBuilt'): None, # To be classified
|
||||
('Flat', nan): None, # To be classified
|
||||
('Flat', 'Unknown'): None, # To be classified
|
||||
|
||||
# 12mm = very poor & has limited insulation description
|
||||
# 25, 50 = poor & has limited insulation description
|
||||
|
|
@ -375,7 +372,11 @@ roof_mapping = {
|
|||
# 150, 175, 200, 225, 250mm = good (Flat, insulated)
|
||||
# 270mm+ = very good (Flat, insulated)
|
||||
|
||||
# {'Roof Construction': 'Flat', 'Roof Insulation': 'mm50'},
|
||||
# Thatched
|
||||
('PitchedThatched', 'mm50'): EpcRoofDescriptions.thatched_with_additional_insulation,
|
||||
('PitchedThatched', 'mm150'): EpcRoofDescriptions.thatched_with_additional_insulation,
|
||||
('PitchedThatched', 'mm300'): EpcRoofDescriptions.thatched_with_additional_insulation,
|
||||
('PitchedThatched', 'Unknown'): EpcRoofDescriptions.thatched, # efficiency classified based on age
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -403,10 +404,6 @@ def classify_flat_roof(age_band: EpcConstructionAgeBand) -> EpcRoofDescriptions:
|
|||
return EpcRoofDescriptions.flat_no_insulation
|
||||
|
||||
|
||||
def classify_pitched_loft_unknown(age_band: EpcConstructionAgeBand):
|
||||
raise NotImplementedError("Pitched loft (unknown insulation) not implemented yet")
|
||||
|
||||
|
||||
def classify_thatched_roof(age_band: EpcConstructionAgeBand):
|
||||
raise NotImplementedError("Thatched roof classification not implemented yet")
|
||||
|
||||
|
|
@ -417,8 +414,6 @@ def classify_sloping_ceiling_roof(age_band: EpcConstructionAgeBand):
|
|||
|
||||
AS_BUILT_ROOF_CLASSIFIERS = {
|
||||
"Flat": classify_flat_roof,
|
||||
"PitchedNormalLoftAccess": classify_pitched_loft_unknown,
|
||||
"PitchedNormalNoLoftAccess": classify_pitched_loft_unknown,
|
||||
"PitchedThatched": classify_thatched_roof,
|
||||
"PitchedWithSlopingCeiling": classify_sloping_ceiling_roof,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue