diff --git a/etl/route_march/oo_prs_additional_units/oo_prs_additional_units.py b/etl/route_march/oo_prs_additional_units/oo_prs_additional_units.py index 2c63a788..93757051 100644 --- a/etl/route_march/oo_prs_additional_units/oo_prs_additional_units.py +++ b/etl/route_march/oo_prs_additional_units/oo_prs_additional_units.py @@ -111,6 +111,33 @@ def filter_and_prepare_epcs(epcs): def rename_and_add_columns(epcs): + # Retrieve just the data we need + epcs = epcs[ + [ + "uprn", + "address", + "postcode", + "property-type", + "built-form", + "inspection-date", + "current-energy-rating", + "current-energy-efficiency", + "roof-description", + "walls-description", + "transaction-type", + # New fields needed + "secondheat-description", + "total-floor-area", + "construction-age-band", + "floor-height", + "number-habitable-rooms", + "mainheat-description", + # + "energy-consumption-current", # kwh/m2 + "tenure" + ] + ] + epcs = epcs.rename( columns={ "address": "Address", @@ -151,7 +178,7 @@ def rename_and_add_columns(epcs): epcs["Estimated Heat Loss Perimeter (m2)"] = epcs.apply( lambda x: estimate_external_wall_area( x["Estimated Number of Floors"], - float(x["Property Floor Height"]) if x["Property Floor Height"] else 2.5, + float(x["Property Floor Height"]) if x["Property Floor Height"] else 2.4, x["Estimated Perimeter (m)"], x["Archetype"] ), axis=1