mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
debugging cleaning class for examples that hadn't been covered previously
This commit is contained in:
parent
7236ff2ed2
commit
cf5f69d6f0
3 changed files with 9 additions and 1 deletions
|
|
@ -44,7 +44,8 @@ def app():
|
|||
# Rename the columns to the same format as the api returns
|
||||
data.columns = [c.replace("_", "-").lower() for c in data.columns]
|
||||
# Take just date before the date threshold
|
||||
data = data[data["lodgement-date"] >= EARLIEST_EPC_DATE]
|
||||
# For this cleaning dataset, let's try and use all EPCs
|
||||
# data = data[data["lodgement-date"] >= EARLIEST_EPC_DATE]
|
||||
|
||||
# Convert to list of dictioaries as returned by the api
|
||||
data = data.to_dict("records")
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ class MainHeatAttributes(Definitions):
|
|||
"electric heat pumps": "electric heat pump",
|
||||
"solar-assisted heat pump": "solar assisted heat pump",
|
||||
"portable electric heating": "portable electric heaters",
|
||||
"portable electric heating assumed for most rooms": "portable electric heaters assumed for most rooms",
|
||||
}
|
||||
|
||||
edge_case_result = {}
|
||||
|
|
@ -138,6 +139,11 @@ class MainHeatAttributes(Definitions):
|
|||
self.is_edge_case = True
|
||||
return
|
||||
|
||||
if self.description == ', electric':
|
||||
self.edge_case_result['has_electric'] = True
|
||||
self.is_edge_case = True
|
||||
return
|
||||
|
||||
def process(self) -> Dict[str, Union[str, bool]]:
|
||||
|
||||
result: Dict[str, Union[str, bool]] = {f'has_{ds.replace(" ", "_")}': False for ds in self.DISTRIBUTION_SYSTEMS}
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ class MainheatControlAttributes(Definitions):
|
|||
TO_REMAP = {
|
||||
"celect control": 'celect-type control',
|
||||
"celect controls": 'celect-type control',
|
||||
"trv's, program & flow switch": 'trvs, programmer & flow switch',
|
||||
}
|
||||
|
||||
WELSH_TEXT = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue