mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
lighting fitting extraction from summary report
This commit is contained in:
parent
f97bb7f127
commit
bccf3c621b
1 changed files with 8 additions and 3 deletions
|
|
@ -73,7 +73,10 @@ def extract_summary_report(pdf_path):
|
|||
'Total Ground Floor Area (m2)': None,
|
||||
'RIR Floor Area': None,
|
||||
'Main Building Wall Area (m2)': None,
|
||||
'First Extension Wall Area (m2)': None
|
||||
'First Extension Wall Area (m2)': None,
|
||||
"Number of Light Fittings": None,
|
||||
"Number of LEL Fittings": None,
|
||||
"Number of fittings needing LEL": None
|
||||
}
|
||||
|
||||
with open(pdf_path, "rb") as file:
|
||||
|
|
@ -198,6 +201,10 @@ def extract_summary_report(pdf_path):
|
|||
dimensions = extract_building_parts_summary(text)
|
||||
data.update(dimensions)
|
||||
|
||||
data["Number of Light Fittings"] = int(re.search(r"Total number of light fittings\s*(\d+)", text).group(1))
|
||||
data["Number of LEL Fittings"] = int(re.search(r"Total number of L.E.L. fittings\s*(\d+)", text).group(1))
|
||||
data["Number of fittings needing LEL"] = data["Number of Light Fittings"] - data["Number of LEL Fittings"]
|
||||
|
||||
return data
|
||||
|
||||
|
||||
|
|
@ -771,8 +778,6 @@ def main():
|
|||
extracted_data["Current SAP Rating"] = extracted_data["Current SAP Rating"].astype(int)
|
||||
extracted_data["Current EPC Band"] = extracted_data["Current SAP Rating"].apply(sap_to_epc)
|
||||
|
||||
# TODO: RIR floor area!!!
|
||||
|
||||
# Remove some definite duplicates
|
||||
dupes = extracted_data[extracted_data["Address"].duplicated()]["Address"]
|
||||
dupes = extracted_data[extracted_data["Address"].isin(dupes)]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue