From a665b2897a6ff4281fd6bc1b9f0c55d7ac666d4b Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 5 Jul 2024 12:27:01 +0100 Subject: [PATCH] added required buckets for ecr --- etl/bill_savings/EnergyConsumptionModel.py | 31 +++++----------------- infrastructure/terraform/main.tf | 17 ++++++++++++ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/etl/bill_savings/EnergyConsumptionModel.py b/etl/bill_savings/EnergyConsumptionModel.py index 534b8d60..b616be08 100644 --- a/etl/bill_savings/EnergyConsumptionModel.py +++ b/etl/bill_savings/EnergyConsumptionModel.py @@ -16,26 +16,6 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %( class EnergyConsumptionModel: FEATURES = { - # "heating_kwh": [ - # "lodgement-year", "lodgement-month", "current-energy-efficiency", "energy-consumption-current", - # "heating-cost-current", - # "total-floor-area", "number-heated-rooms", - # "mainheat-description", "mainheat-energy-eff", "main-fuel", "secondheat-description", - # "property-type", "built-form", "mainheatcont-description", 'hotwater-description', 'hot-water-energy-eff', - # # TESTING - # # "walls-description", - # "walls-energy-eff", - # # "roof-description", - # "roof-energy-eff", - # # "floor-description", - # # "county" - # # "co2-emissions-current", - Made it worse - # # TODO: Should hot water features go in here? - # # , , "number-habitable-rooms", - # # - # # - # # - # ], "heating_kwh": [ "lodgement-year", "lodgement-month", "current-energy-efficiency", "energy-consumption-current", "heating-cost-current", "heating-cost-potential", "total-floor-area", "number-heated-rooms", @@ -45,7 +25,9 @@ class EnergyConsumptionModel: "roof-energy-eff", "windows-description", "windows-energy-eff", "floor-description", "flat-top-storey", "flat-storey-count", "unheated-corridor-length", "solar-water-heating-flag", "mechanical-ventilation", "low-energy-lighting", "environment-impact-current", "energy-tariff", - "county", "construction-age-band", "co2-emissions-current" + "county", "construction-age-band", "co2-emissions-current", + # TODO: Testing + "lighting-cost-current", "hot-water-cost-current", "current-energy-rating" ], "hot_water_kwh": [ "lodgement-year", "lodgement-month", @@ -66,7 +48,7 @@ class EnergyConsumptionModel: "county", "windows-description", "windows-energy-eff", "flat-top-storey", "flat-storey-count", "unheated-corridor-length", "solar-water-heating-flag", "mechanical-ventilation", - "low-energy-lighting", "environment-impact-current", "energy-tariff" + "low-energy-lighting", "environment-impact-current", "energy-tariff", "current-energy-rating" ] def __init__(self, cleaned, model_paths=None, n_jobs=1): @@ -162,8 +144,9 @@ class EnergyConsumptionModel: self.data = self.data.drop(columns=["original_description", "thermal_transmittance", "from", "to"]) # Modify number of heated rooms and number of habitable rooms - # self.data["number-heated-rooms"] = self.data["number-heated-rooms"].apply(lambda x: "10+" if x > 10 else - # str(x)) + self.data["number-heated-rooms"] = self.data["number-heated-rooms"].apply( + lambda x: "16_or_more" if x > 15 else str(x) + ) # self.data["number-habitable-rooms"] = self.data["number-habitable-rooms"].apply( # lambda x: "10+" if x > 10 else str(x) # ) diff --git a/infrastructure/terraform/main.tf b/infrastructure/terraform/main.tf index f968aba8..b90c73a8 100644 --- a/infrastructure/terraform/main.tf +++ b/infrastructure/terraform/main.tf @@ -145,6 +145,23 @@ module "retrofit_heat_predictions" { allowed_origins = var.allowed_origins } +module "retrofit_lighting_cost_predictions" { + source = "./modules/s3" + bucketname = "retrofit-lighting-cost-predictions-${var.stage}" + allowed_origins = var.allowed_origins +} + +module "retrofit_heating_cost_predictions" { + source = "./modules/s3" + bucketname = "retrofit-heating-cost-predictions-${var.stage}" + allowed_origins = var.allowed_origins +} + +module "retrofit_hot_water_cost_predictions" { + source = "./modules/s3" + bucketname = "retrofit-hot-water-cost-predictions-${var.stage}" + allowed_origins = var.allowed_origins +} # Set up the route53 record for the API module "route53" {