From 78066563cea4b328952707fe3d60aba367ef88db Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 25 Jul 2024 18:47:43 +0100 Subject: [PATCH] Added missing orientations --- etl/xml_survey_extraction/XmlParser.py | 8 ++++++-- etl/xml_survey_extraction/app.py | 3 +++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/etl/xml_survey_extraction/XmlParser.py b/etl/xml_survey_extraction/XmlParser.py index 3f277bad..c65173dd 100644 --- a/etl/xml_survey_extraction/XmlParser.py +++ b/etl/xml_survey_extraction/XmlParser.py @@ -650,10 +650,14 @@ class XmlParser: } orientation_lookup = { - "3": "East", - "5": "South", "1": "North", + "2": "North East", + "3": "East", + "4": "South East", + "5": "South", + "6": "South West", "7": "West", + "8": "North West" } self.windows = [ diff --git a/etl/xml_survey_extraction/app.py b/etl/xml_survey_extraction/app.py index c6e16e3b..6fe02e2d 100644 --- a/etl/xml_survey_extraction/app.py +++ b/etl/xml_survey_extraction/app.py @@ -42,6 +42,9 @@ def main(): logger.info(f"Exatracted XMLS for the energy assessments") + # TODO: IF we have many uploads, we can do them in a batch so we don't try and upload huge amounts of data to + # the database at onece + # For each property, we download the xmls and extract the data database_data = [] for uprn, xmls in assessments_map.items():