mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
working on the costing methodology
This commit is contained in:
parent
93d375bc7a
commit
854c784bd9
1 changed files with 19 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ from io import BytesIO
|
|||
|
||||
import pandas as pd
|
||||
|
||||
from etl.ownership.config import EXCLUDED_UPRNS
|
||||
from etl.xml_survey_extraction.XmlParser import XmlParser
|
||||
|
||||
SURVEY_FOLDER_PATH = "/Users/khalimconn-kowlessar/Documents/hestia/Customers/AIHA/RESIDENT SURVEYS"
|
||||
|
|
@ -91,6 +92,7 @@ def main():
|
|||
# - AIH001-11 - The layout of this unit is confusing, is there roof access?
|
||||
# - AIH001-12 - Why was there not access to the cylinder?
|
||||
# - AIH001-12 - Is the need to draught proofing due to the windows?
|
||||
# - AIH001-04 - is the flat roof area correct?
|
||||
|
||||
recommended_measures = [
|
||||
{
|
||||
|
|
@ -132,6 +134,7 @@ def main():
|
|||
{
|
||||
"measure": "Loft Insulation",
|
||||
"description": "300mm loft insulation",
|
||||
"floor_area": 80, # Based on area of 1st floor
|
||||
"sap_points": 8,
|
||||
"ending_sap": 61
|
||||
},
|
||||
|
|
@ -152,6 +155,7 @@ def main():
|
|||
{
|
||||
"measure": "Flat Roof Insulation",
|
||||
"description": "100mm flat roof insulation",
|
||||
"floor_area": 39.1482, # based on area of top floor
|
||||
"sap_points": 4,
|
||||
"ending_sap": 52
|
||||
},
|
||||
|
|
@ -185,6 +189,7 @@ def main():
|
|||
{
|
||||
"measure": "Flat Roof Insulation",
|
||||
"description": "100mm flat roof insulation",
|
||||
"floor_area": 49.48, # based on area of top floor
|
||||
"sap_points": 5,
|
||||
"ending_sap": 59,
|
||||
},
|
||||
|
|
@ -256,6 +261,7 @@ def main():
|
|||
{
|
||||
"measure": "Loft Insulation",
|
||||
"description": "300mm loft insulation",
|
||||
"floor_area": 54.2864, # Based on area of top floor
|
||||
"sap_points": 2,
|
||||
"ending_sap": 58,
|
||||
},
|
||||
|
|
@ -390,6 +396,7 @@ def main():
|
|||
{
|
||||
"measure": "Flat Roof Insulation",
|
||||
"description": "100mm flat roof insulation",
|
||||
"floor_area": 33.06, # Based on area of the extension
|
||||
"sap_points": 2,
|
||||
"ending_sap": 61,
|
||||
},
|
||||
|
|
@ -445,7 +452,8 @@ def main():
|
|||
},
|
||||
{
|
||||
"measure": "Loft Insulation",
|
||||
"description": "300mm loft insulation",
|
||||
"description": "300mm loft insulation", # Based on area of main building
|
||||
"floor_area": 59.20,
|
||||
"sap_points": 1,
|
||||
"ending_sap": 69,
|
||||
},
|
||||
|
|
@ -511,10 +519,18 @@ def main():
|
|||
n_floors = property_data["number_of_floors"]
|
||||
cost_of_scalfolding = [x for x in scaffolding_data if x["number_of_floors"] == n_floors][0]["price"]
|
||||
measure["Total Cost"] = float(measure_pricing["unit_price"].values[0]) + cost_of_scalfolding
|
||||
continue
|
||||
|
||||
blah
|
||||
if measure_unit == "floor_m2":
|
||||
floor_area = measure["floor_area"]
|
||||
measure["Total Cost"] = float(measure_pricing["unit_price"].values[0]) * floor_area
|
||||
continue
|
||||
|
||||
measure["total"] = pricing_data[pricing_data["item"] == measure["measure"]]["unit_price"].values[0]
|
||||
if measure_unit == "hlp_m2":
|
||||
hlp = measure["hlp"]
|
||||
measure["Total Cost"] = float(measure_pricing["unit_price"].values[0]) * hlp
|
||||
|
||||
raise Exception("Unknown unit type")
|
||||
|
||||
# Step 1: Normalize the recommended_measures data into a DataFrame.
|
||||
normalized_measures = []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue