mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
Added property age estimate
This commit is contained in:
parent
4a67e7f222
commit
4e8735cf76
1 changed files with 6 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
import pint
|
import pint
|
||||||
|
import re
|
||||||
|
|
||||||
from model_data.Property import Property
|
from model_data.Property import Property
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
@ -134,6 +135,11 @@ class WallRecommendations:
|
||||||
if self.property.full_sap_epc:
|
if self.property.full_sap_epc:
|
||||||
return pd.to_datetime(self.property.full_sap_epc["lodgement-date"]).year
|
return pd.to_datetime(self.property.full_sap_epc["lodgement-date"]).year
|
||||||
|
|
||||||
|
if self.property.data["construction-age-band"]:
|
||||||
|
# Take the upper limit
|
||||||
|
band = [int(x) for x in re.findall(r'\b\d{4}\b', self.property.data["construction-age-band"])]
|
||||||
|
return band[1]
|
||||||
|
|
||||||
raise NotImplementedError("Implement me!")
|
raise NotImplementedError("Implement me!")
|
||||||
|
|
||||||
def recommend(self):
|
def recommend(self):
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue