From 8a3a3dbb168c6c28534b8e8fc2a6abc03097f621 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Tue, 3 Sep 2024 19:05:57 +0100 Subject: [PATCH] setting up vectis inputs --- etl/xml_survey_extraction/app.py | 110 +++++++++++++++++++++++++------ 1 file changed, 89 insertions(+), 21 deletions(-) diff --git a/etl/xml_survey_extraction/app.py b/etl/xml_survey_extraction/app.py index be39d0df..b51c01b8 100644 --- a/etl/xml_survey_extraction/app.py +++ b/etl/xml_survey_extraction/app.py @@ -12,6 +12,7 @@ logger = setup_logger() BUCKET = "retrofit-energy-assessments-dev" USER_ID = 8 +non_invasive_recommendations_filepath = "{USER_ID}/{PORTFOLIO_ID}/non_invasive_recommendations.csv" SCENARIOS = { 101: { "project_code": "VDE001", @@ -19,7 +20,7 @@ SCENARIOS = { "bodies": [ # Scenario A: Cavity wall insulation { - "portfolio_id": str(86), + "portfolio_id": str(101), "housing_type": "Private", "goal": "Increasing EPC", "goal_value": "A", @@ -27,14 +28,16 @@ SCENARIOS = { "already_installed_file_path": "", "patches_file_path": "", "non_invasive_recommendations_file_path": "", - "exclusions": ["floor_insulation", "fireplace", "solar_pv", "heating", 'lighting'], + "inclusions": [ + "draught_proofing", "secondary_glazing", "trickle_vents", "low_energy_lighting", + ], "budget": None, - "scenario_name": "Low Hanging Fruit", + "scenario_name": "Quick wins - do now while tenanted", "multi_plan": True, }, # Scenario B: CWI, Solar PV, AHSP { - "portfolio_id": str(86), + "portfolio_id": str(101), "housing_type": "Private", "goal": "Increasing EPC", "goal_value": "A", @@ -42,30 +45,95 @@ SCENARIOS = { "already_installed_file_path": "", "patches_file_path": "", "non_invasive_recommendations_file_path": "", - "exclusions": ["floor_insulation", "fireplace", 'lighting'], + "inclusions": [ + "draught_proofing", + "secondary_glazing", + "trickle_vents", + "low_energy_lighting", + "suspended_floor_insulation", + "internal_wall_insulation" + ], "budget": None, - "scenario_name": "Deep Retrofit", + "scenario_name": "Do when void", "multi_plan": True, }, - # Scenario C, CWI, floor insulation, PV, AHSP - { - "portfolio_id": str(86), - "housing_type": "Private", - "goal": "Increasing EPC", - "goal_value": "A", - "trigger_file_path": "", - "already_installed_file_path": "", - "patches_file_path": "", - "non_invasive_recommendations_file_path": "", - "exclusions": ["fireplace", 'lighting'], - "budget": None, - "scenario_name": "Whole House Retrofit", - "multi_plan": True, - } ] }, } +# TODO: These non-intrusive recommendations should be detected from the EPRs, the scenarios and the condition report? +NON_INTRUSITVE_RECOMMENDATIONS = [ + { + # 2 Grove Mansions + "uprn": 121016121, + "recommendations": [ + { + "type": "draught_proofing", + "cost": None, + "survey": True + }, + {"type": "secondary_glazing", "cost": None, "survey": True}, + {"type": "trickle_vents", "cost": None, "survey": True}, + {"type": "suspended_floor_insulation", "cost": None, "survey": True}, + {"type": "internal_wall_insulation", "cost": None, "survey": True}, + ] + }, + { + # 8 Grove Mansions + "uprn": 10024087855, + "recommendations": [ + {"type": "draught_proofing", "cost": None, "survey": True}, + {"type": "secondary_glazing", "cost": None, "survey": True}, + {"type": "trickle_vents", "cost": None, "survey": True}, + {"type": "low_energy_lighting", "cost": None, "survey": True}, + {"type": "internal_wall_insulation", "cost": None, "survey": True}, + ] + }, + { + # 9 Grove Mansions + "uprn": 121016128, + "recommendations": [ + {"type": "draught_proofing", "cost": None, "survey": True}, + {"type": "secondary_glazing", "cost": None, "survey": True}, + {"type": "trickle_vents", "cost": None, "survey": True}, + {"type": "low_energy_lighting", "cost": None, "survey": True}, + {"type": "suspended_floor_insulation", "cost": None}, + {"type": "internal_wall_insulation", "cost": None, "survey": True}, + ] + }, + { + # 5 Grove Mansions + "uprn": 121016124, + "recommendations": [ + {"type": "secondary_glazing", "cost": None, "survey": True}, + {"type": "trickle_vents", "cost": None, "survey": True}, + {"type": "low_energy_lighting", "cost": None, "survey": True}, + {"type": "internal_wall_insulation", "cost": None, "survey": True}, + ] + }, + { + # 14 Grove Mansions + "uprn": 121016117, + "recommendations": [ + {"type": "draught_proofing", "cost": None, "survey": True}, + {"type": "secondary_glazing", "cost": None, "survey": True}, + {"type": "trickle_vents", "cost": None, "survey": True}, + {"type": "low_energy_lighting", "cost": None, "survey": True}, + {"type": "internal_wall_insulation", "cost": None, "survey": True}, + ] + }, + { + # 19 Grove Mansions + "uprn": 121016117, + "recommendations": [ + {"type": "low_energy_lighting", "cost": None, "survey": True}, + {"type": "secondary_glazing", "cost": None, "survey": True}, + {"type": "internal_wall_insulation", "cost": None, "survey": True}, + {"type": "room_roof_insulation", "cost": None, "survey": True}, + ] + }, +] + def main(): """