mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
minor tweak to asset list to make uprn int
This commit is contained in:
parent
bd15ce65c2
commit
72a4feb6af
2 changed files with 6 additions and 2 deletions
|
|
@ -36,7 +36,7 @@ def app():
|
|||
epc_data["CURRENT_ENERGY_RATING"].value_counts(normalize=True)
|
||||
|
||||
# For the purpose of the sample, take the properties have surveys done in the last 2 years
|
||||
# This gives us 1023 remaining properties
|
||||
# This gives us 1167 remaining properties
|
||||
two_years_ago = pd.Timestamp.now() - pd.DateOffset(days=int(2.5 * 365))
|
||||
epc_data = epc_data[epc_data["LODGEMENT_DATE"] >= two_years_ago]
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ def app():
|
|||
# 2) Unfilled cavity
|
||||
# 3) A roof that could be insulated (flat or pitched with no more than 50mm insulation)
|
||||
# 4) EPC E
|
||||
# Different buckets of properties
|
||||
# 12 properties
|
||||
archetype_1_sample = epc_data[
|
||||
epc_data["PROPERTY_TYPE"].isin(["House"]) &
|
||||
(epc_data["CURRENT_ENERGY_RATING"] == "E") &
|
||||
|
|
@ -69,6 +69,7 @@ def app():
|
|||
# 2) Unfilled cavity
|
||||
# 3) Another property above
|
||||
# 4) EPC E
|
||||
# 14 properties here
|
||||
archetype_2_sample = epc_data[
|
||||
epc_data["PROPERTY_TYPE"].isin(["Flat"]) &
|
||||
(epc_data["CURRENT_ENERGY_RATING"] == "E") &
|
||||
|
|
@ -108,6 +109,7 @@ def app():
|
|||
archetype_4_sample_asset_list = archetype_4_sample[["UPRN", "ADDRESS1", "POSTCODE"]].copy()
|
||||
archetype_4_sample_asset_list["ARCHETYPE"] = "Archetype 4"
|
||||
|
||||
# 41 total properties
|
||||
asset_list = pd.concat(
|
||||
[
|
||||
archetype_1_sample_asset_list,
|
||||
|
|
@ -126,6 +128,8 @@ def app():
|
|||
}
|
||||
)
|
||||
|
||||
asset_list["uprn"] = asset_list["uprn"].astype(int)
|
||||
|
||||
filename = f"{USER_ID}/{PORTFOLIO_ID}/inputs.csv"
|
||||
save_csv_to_s3(
|
||||
dataframe=asset_list,
|
||||
|
|
|
|||
0
etl/customers/gla_croydon_demo/slides.py
Normal file
0
etl/customers/gla_croydon_demo/slides.py
Normal file
Loading…
Add table
Reference in a new issue