Merge pull request #486 from Hestia-Homes/funding-engine

Funding engine
This commit is contained in:
KhalimCK 2025-08-26 12:34:00 +01:00 committed by GitHub
commit 93cdf262e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -75,9 +75,6 @@ class EpcClean:
]
]
# Average
filtered_data.groupby("lighting-description")["low-energy-lighting"].mean().reset_index()
# Convert low-energy-lighting to float
for row in filtered_data:
row["low-energy-lighting"] = float(row["low-energy-lighting"])
@ -93,7 +90,7 @@ class EpcClean:
# Scale to between 0 and 1
averages = [{
"lighting-description": correct_spelling(description.lower()) / 100,
"lighting-description": correct_spelling(description.lower()),
"low-energy-lighting": total / counts[description] / 100
} for description, total in sums.items()]

View file

@ -164,6 +164,7 @@ county_to_region_map = {
'Wakefield': 'Yorkshire and the Humber', 'West Yorkshire': 'Yorkshire and the Humber',
'York': 'Yorkshire and the Humber',
'Westmorland': 'North West England',
'Westmorland and Furness': 'North West England',
# Additional mappings requried, based on what we find in the EPC database
'Greater London Authority': 'Inner London',