mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
debugging asset list for ealing without wall
This commit is contained in:
parent
a6daeab889
commit
3ab1e94ea1
5 changed files with 32 additions and 38 deletions
2
.idea/Model.iml
generated
2
.idea/Model.iml
generated
|
|
@ -7,7 +7,7 @@
|
|||
<sourceFolder url="file://$MODULE_DIR$/open_uprn" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/recommendations" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Fastapi-backend" jdkType="Python SDK" />
|
||||
<orderEntry type="jdk" jdkName="AssetList" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
<component name="PyNamespacePackagesService">
|
||||
|
|
|
|||
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
|
|
@ -3,7 +3,7 @@
|
|||
<component name="Black">
|
||||
<option name="sdkName" value="Python 3.10 (backend)" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Fastapi-backend" project-jdk-type="Python SDK" />
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="AssetList" project-jdk-type="Python SDK" />
|
||||
<component name="PyCharmProfessionalAdvertiser">
|
||||
<option name="shown" value="true" />
|
||||
</component>
|
||||
|
|
|
|||
|
|
@ -575,13 +575,18 @@ class AssetList:
|
|||
|
||||
# We handle cleaning for walls, in the instance that the landlord provides us with EPC data and
|
||||
# we see instances of "average thermal transmittance" in the description
|
||||
self.standardised_asset_list[self.landlord_wall_construction] = np.where(
|
||||
self.standardised_asset_list[self.landlord_wall_construction].str.lower().str.contains(
|
||||
"average thermal transmittance"
|
||||
) == True,
|
||||
"new build - average thermal transmittance",
|
||||
self.standardised_asset_list[self.landlord_wall_construction]
|
||||
)
|
||||
if self.landlord_wall_construction is not None:
|
||||
self.standardised_asset_list[self.landlord_wall_construction] = np.where(
|
||||
self.standardised_asset_list[self.landlord_wall_construction].str.lower().str.contains(
|
||||
"average thermal transmittance"
|
||||
) == True,
|
||||
"new build - average thermal transmittance",
|
||||
self.standardised_asset_list[self.landlord_wall_construction]
|
||||
)
|
||||
else:
|
||||
# We want to make sure that we have a column for wall construction
|
||||
self.landlord_wall_construction = "landlord_wall_construction"
|
||||
self.standardised_asset_list[self.landlord_wall_construction] = None
|
||||
|
||||
# Clear our build year column
|
||||
# We attempt to process the year built column
|
||||
|
|
@ -625,6 +630,11 @@ class AssetList:
|
|||
if str(date_str).isdigit() & (len(str(date_str)) == 4):
|
||||
return int(date_str)
|
||||
|
||||
# Remove any non-numeric characters
|
||||
date_str = re.sub(r"\D", "", str(date_str))
|
||||
if str(date_str).isdigit() & (len(str(date_str)) == 4):
|
||||
return int(date_str)
|
||||
|
||||
raise NotImplementedError("Unhandled format for year built - implement me")
|
||||
|
||||
self.standardised_asset_list[self.landlord_year_built] = self.standardised_asset_list[
|
||||
|
|
|
|||
|
|
@ -246,40 +246,23 @@ def app():
|
|||
# - We want: fully insulated property (all wall types), EPC D or below (floors should be solid)
|
||||
# - Or the insulation required is loft/cavity (floors should be solid)
|
||||
|
||||
data_folder = "/Users/khalimconn-kowlessar/Documents/hestia/Customers/Colchester"
|
||||
data_filename = "Warmfront data- Colchester Borough Homes (Complete).xlsx"
|
||||
sheet_name = "Sheet1"
|
||||
postcode_column = 'Full Address.1'
|
||||
fulladdress_column = "Full Address"
|
||||
# Ealing
|
||||
data_folder = "/Users/khalimconn-kowlessar/Documents/hestia/Customers/Ealing/Programme data - 04032025"
|
||||
data_filename = "Ealing BC - Property Plus Tenure 25.02.2025.xlsx"
|
||||
sheet_name = "IGNORE - FULL MAIN"
|
||||
postcode_column = 'Postcode'
|
||||
fulladdress_column = "Address"
|
||||
address1_column = None
|
||||
address1_method = "first_word"
|
||||
address_cols_to_concat = []
|
||||
missing_postcodes_method = None
|
||||
landlord_year_built = "Build Date"
|
||||
landlord_year_built = "Year Built"
|
||||
landlord_os_uprn = None
|
||||
landlord_property_type = "Property Type"
|
||||
landlord_wall_construction = "Wallinsul"
|
||||
landlord_heating_system = "HeatSorc"
|
||||
landlord_property_type = "Property Type Code"
|
||||
landlord_wall_construction = None
|
||||
landlord_heating_system = None
|
||||
landlord_existing_pv = None
|
||||
landlord_property_id = "Property Reference"
|
||||
|
||||
# For Westward
|
||||
# data_folder = "/Users/khalimconn-kowlessar/Documents/hestia/Customers/Westward"
|
||||
# data_filename = "WESTWARD - completed list..xlsx"
|
||||
# sheet_name = "Sheet1"
|
||||
# postcode_column = "WFT EDIT Postcode"
|
||||
# fulladdress_column = "Address"
|
||||
# address1_column = None
|
||||
# address1_method = "house_number_extraction"
|
||||
# address_cols_to_concat = []
|
||||
# missing_postcodes_method = None
|
||||
# landlord_year_built = "Build date"
|
||||
# landlord_os_uprn = "UPRN"
|
||||
# landlord_property_type = "Location type"
|
||||
# landlord_wall_construction = "Wall Construction (EPC)"
|
||||
# landlord_heating_system = "Heat Source"
|
||||
# landlord_existing_pv = "PV (Y/N)"
|
||||
# landlord_property_id = "Place ref"
|
||||
landlord_property_id = "Property Ref"
|
||||
|
||||
# Maps addresses to uprn in problematic cases
|
||||
manual_uprn_map = {}
|
||||
|
|
|
|||
|
|
@ -21,5 +21,6 @@ PROPERTY_MAPPING = {
|
|||
'Flat': 'flat',
|
||||
'House': 'house',
|
||||
'Maisonette': 'maisonette',
|
||||
'Stairwell': 'other'
|
||||
'Stairwell': 'other',
|
||||
'MAISON': 'maisonette'
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue