set up vander elliot asset list

This commit is contained in:
Khalim Conn-Kowlessar 2024-05-09 16:32:22 +01:00
parent 028d245667
commit cc170e1fa3
4 changed files with 118 additions and 2 deletions

2
.idea/Model.iml generated
View file

@ -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="Python 3.10 (model_data)" jdkType="Python SDK" />
<orderEntry type="jdk" jdkName="Python 3.10 (backend)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyNamespacePackagesService">

2
.idea/misc.xml generated
View file

@ -3,7 +3,7 @@
<component name="Black">
<option name="sdkName" value="Python 3.10 (backend)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (model_data)" project-jdk-type="Python SDK" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (backend)" project-jdk-type="Python SDK" />
<component name="PythonCompatibilityInspectionAdvertiser">
<option name="version" value="3" />
</component>

View file

@ -79,6 +79,17 @@ class PropertyValuation:
100070520130: 177_000, # Based on Zoopla
100070333957: 185_000, # Based on Zoopla
100070543258: 211_000, # Based on Zoopla
# Vander Elliot Pilot - search by going to https://www.zoopla.co.uk/property/uprn/{uprn}/
41018850: 104_000, # Based on Zoopla
38237316: 74_000, # Based on Zoopla
38237317: 74_000, # Based on Zoopla
41052320: 70_000, # Based on Zoopla
41052321: 70_000, # Based on Zoopla
41052322: 38_000, # Based on Zoopla
41222759: 38_000, # Based on Zoopla
41222760: 46_000, # Based on Zoopla
41222761: 270_000, # Based on Zoopla
41212534: 38_000, # Based on Zoopla
}
# We base our valuation uplifts on a number of sources

View file

@ -0,0 +1,105 @@
import pandas as pd
from utils.s3 import save_csv_to_s3
EPC_C_PORTFOLIO_ID = 78
EPC_B_PORTFOLIO_ID = 79
USER_ID = 8
def app():
"""
This code sets up the asset list for the 9 property portfolio for the pilot
:return:
"""
asset_list = [
{
"address": "79 Clare Road",
"postcode": "L20 9LZ",
"uprn": 41018850, # 3 bedroom property
},
{
"address": "Flat 1, 29 Bedford Road",
"postcode": "L4 5PS",
"uprn": 38237316 # Single dewlling converted into two flats
},
{
"address": "Flat 2, 29 Bedford Road",
"postcode": "L4 5PS",
"uprn": 38237317 # Single dewlling converted into two flats
},
# 7 Flats above a domestic unit
{
"address": "Flat 1, 2 Linacre Lane",
"postcode": "L20 5AH",
"uprn": 41052320
},
{
"address": "Flat 2, 2 Linacre Lane",
"postcode": "L20 5AH",
"uprn": 41052321,
},
{
"address": "Flat 3, 2 Linacre Lane",
"postcode": "L20 5AH",
"uprn": 41052322,
},
{
"address": "Flat 4, 2 Linacre Lane",
"postcode": "L20 5AH",
"uprn": 41222759,
},
{
"address": "Flat 1, 4 Linacre Lane",
"postcode": "L20 5AH",
"uprn": 41222760,
},
{
"address": "Flat 2, 4 Linacre Lane",
"postcode": "L20 5AH",
"uprn": 41222761,
},
{
"address": "Flat 3, 4 Linacre Lane",
"postcode": "L20 5AH",
"uprn": 41212534,
},
]
asset_list = pd.DataFrame(asset_list)
# Store the asset list in s3
filename = f"{USER_ID}/{EPC_C_PORTFOLIO_ID}/pilot.csv"
save_csv_to_s3(
dataframe=asset_list,
bucket_name="retrofit-plan-inputs-dev",
file_name=filename
)
# EPC C portoflio
body = {
"portfolio_id": str(EPC_C_PORTFOLIO_ID),
"housing_type": "Private",
"goal": "Increase EPC",
"goal_value": "C",
"trigger_file_path": filename,
"already_installed_file_path": "",
"patches_file_path": "",
"non_invasive_recommendations_file_path": "",
"budget": None,
}
print(body)
# EPC B portoflio
body = {
"portfolio_id": str(EPC_B_PORTFOLIO_ID),
"housing_type": "Private",
"goal": "Increase EPC",
"goal_value": "B",
"trigger_file_path": filename,
"already_installed_file_path": "",
"patches_file_path": "",
"non_invasive_recommendations_file_path": "",
"budget": None,
}
print(body)