mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
added get_asset_list
This commit is contained in:
parent
46c7a7c0d1
commit
34464267dc
2 changed files with 22 additions and 0 deletions
|
|
@ -109,6 +109,9 @@ class Ownership:
|
|||
self.portfolio_properties_filepath = (
|
||||
f"ownership/{self.project_name}/{self.run_timestamp}/portfolio_properties.xlsx"
|
||||
)
|
||||
self.portfolio_epc_data_filepath = (
|
||||
f"ownership/{self.project_name}/{self.run_timestamp}/portfolio_epc_data.xlsx"
|
||||
)
|
||||
|
||||
# Data
|
||||
self.epc_data = None
|
||||
|
|
@ -999,3 +1002,19 @@ class Ownership:
|
|||
bucket_name=self.bucket,
|
||||
file_key=self.portfolio_epc_data_filepath,
|
||||
)
|
||||
|
||||
def get_asset_list(self):
|
||||
"""
|
||||
From the EPC data, creates the asset list
|
||||
:return:
|
||||
"""
|
||||
|
||||
asset_list = self.portfolio_epc_data[["UPRN", "ADDRESS1", "POSTCODE"]].copy().rename(
|
||||
columns={
|
||||
"UPRN": "uprn",
|
||||
"ADDRESS1": "address",
|
||||
"POSTCODE": "postcode"
|
||||
}
|
||||
)
|
||||
|
||||
return asset_list
|
||||
|
|
|
|||
|
|
@ -122,3 +122,6 @@ def app():
|
|||
ownership_instance.pipeline(column_filters=epc_column_filters)
|
||||
|
||||
# Create the project, if a portfolio doesn't exist for the project name
|
||||
|
||||
# Create the asset list and the body of the portfolio
|
||||
asset_list = ownership_instance.get_asset_list()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue