debugging xml extraction

This commit is contained in:
Khalim Conn-Kowlessar 2024-10-23 15:18:42 +01:00
parent 60490cd4fa
commit 9d4a93ca3e

View file

@ -9,7 +9,8 @@ from etl.xml_survey_extraction.pcdb import heating_data
PROPERTY_TYPE_LOOKUP = {
"0": "House",
"House": "House",
"2": "Flat"
"2": "Flat",
"3": "Maisonette",
}
@ -122,6 +123,7 @@ class XmlParser:
}
TRANSACTION_TYPE_MAP = {
"5": "Rented (social)",
"13": "ECO assessment",
"14": "Stock condition survey",
}
@ -134,7 +136,8 @@ class XmlParser:
TARIFF_MAP = {
"1": "Dual",
"2": "Single"
"2": "Single",
"3": "Unknown"
}
def __init__(self, file, filekey, surveyor_company, uprn=None):
@ -408,7 +411,7 @@ class XmlParser:
# We discount 10% of the wall area
insulation_wall_area = wall_areas * 0.9
else:
insulation_wall_area = wall_areas - window_areas
insulation_wall_area = wall_areas - sum(window_areas)
return insulation_wall_area
def extract_additional_data(self):
@ -779,6 +782,7 @@ class XmlParser:
"""
glazing_type_lookup = {
"2": "double glazing installed during or after 2002",
"3": "double glazing, unknown install date",
"5": "Single glazing",
}