testing rebaselining for Instagroup and changing multi glaze proportion for Partiy onboarder to 0-100

This commit is contained in:
Khalim Conn-Kowlessar 2026-03-24 18:21:19 +00:00
parent 8b2af1556a
commit b22c7ac6e8
3 changed files with 16 additions and 17 deletions

View file

@ -559,19 +559,18 @@ async def model_engine(body: PlanTriggerRequest):
)
logger.info("Got the plan input from csv")
# TODO: New onboarding process
if body.file_format == "ara_property_list":
plan_input = read_excel_from_s3(
bucket_name=get_settings().DATA_BUCKET, file_key=body.trigger_file_path, sheet_name=body.sheet_name,
header_row=0
)
plan_input = plan_input.to_dict('records')
# We then slide it on the indexes if they are provided
if body.index_start is not None and body.index_end is not None:
plan_input = plan_input[body.index_start:body.index_end]
# TODO: New onboarding process
if body.file_format == "ara_property_list":
plan_input = pd.read_excel(
"/Users/khalimconn-kowlessar/Downloads/2025_11_11 - Peabody - Data Extracts for Domna_transformed ("
"2).xlsx",
sheet_name="Input Sample"
)
plan_input = plan_input.to_dict('records')
# Confirm no duplicate UPRNS
check_duplicate_uprns(plan_input)

View file

@ -4,20 +4,20 @@ from datatypes.epc.windows import EpcWindowDescriptions
glazing_map = {
# (description, energy efficiency, multi_glaze_proportion, glazed_type, glazed_area
# For SAP 10 assessments, The glazed type and glazed area are not populated in the EPC API data any more
"Double 2002 or later": (EpcWindowDescriptions.fully_double_glazed, EpcEfficiency.AVERAGE, 1, None, None),
"Double before 2002": (EpcWindowDescriptions.fully_double_glazed, EpcEfficiency.POOR, 1, None, None),
"Double but age unknown": (EpcWindowDescriptions.fully_double_glazed, EpcEfficiency.POOR, 1, None, None),
"Double 2002 or later": (EpcWindowDescriptions.fully_double_glazed, EpcEfficiency.AVERAGE, 100, None, None),
"Double before 2002": (EpcWindowDescriptions.fully_double_glazed, EpcEfficiency.POOR, 100, None, None),
"Double but age unknown": (EpcWindowDescriptions.fully_double_glazed, EpcEfficiency.POOR, 100, None, None),
"Single": (EpcWindowDescriptions.single_glazed, EpcEfficiency.VERY_POOR, 0, None, None),
# For triple glazing, with age unknown, the performance is only average, whereas if it's a post 2022
# installation, it's classed as high performance glazing with good efficiency. We'll need to be considerate as to
# how we make updates to the windows data.
# Triple known data is high performance glazing with Good efficiency (at least)
"Triple": (EpcWindowDescriptions.fully_triple_glazed, EpcEfficiency.AVERAGE, 1, None, None),
"Triple": (EpcWindowDescriptions.fully_triple_glazed, EpcEfficiency.AVERAGE, 100, None, None),
# This is also classed as high performance glazing
"DoubleKnownData": (
EpcWindowDescriptions.fully_double_glazed.high_performance_glazing, EpcEfficiency.GOOD, 1, None, None
EpcWindowDescriptions.fully_double_glazed.high_performance_glazing, EpcEfficiency.GOOD, 100, None, None
),
# Under SAP 10, secondary glazing is classed as poor efficiency (whereas under SAP 2012 it was generally good)
"Secondary": (EpcWindowDescriptions.full_secondary_glazing, EpcEfficiency.POOR, 1, None, None),
"TripleKnownData": (EpcWindowDescriptions.high_performance_glazing, EpcEfficiency.GOOD, 1, None, None),
"Secondary": (EpcWindowDescriptions.full_secondary_glazing, EpcEfficiency.POOR, 100, None, None),
"TripleKnownData": (EpcWindowDescriptions.high_performance_glazing, EpcEfficiency.GOOD, 100, None, None),
}

View file

@ -564,7 +564,7 @@ class EPCRecord:
"mainheatc_energy_eff": addr.landlord_heating_controls_efficiency,
"hot_water_energy_eff": addr.landlord_hot_water_efficiency,
"multi_glaze_proportion": addr.landlord_multi_glaze_proportion * 100, # TODO: Fix this!
"multi_glaze_proportion": addr.landlord_multi_glaze_proportion,
"construction_age_band": addr.landlord_construction_age_band,
}