mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-07-12 13:29:04 +00:00
Merge pull request #486 from Hestia-Homes/funding-engine
Funding engine
This commit is contained in:
commit
93cdf262e8
2 changed files with 2 additions and 4 deletions
|
|
@ -75,9 +75,6 @@ class EpcClean:
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
# Average
|
|
||||||
filtered_data.groupby("lighting-description")["low-energy-lighting"].mean().reset_index()
|
|
||||||
|
|
||||||
# Convert low-energy-lighting to float
|
# Convert low-energy-lighting to float
|
||||||
for row in filtered_data:
|
for row in filtered_data:
|
||||||
row["low-energy-lighting"] = float(row["low-energy-lighting"])
|
row["low-energy-lighting"] = float(row["low-energy-lighting"])
|
||||||
|
|
@ -93,7 +90,7 @@ class EpcClean:
|
||||||
|
|
||||||
# Scale to between 0 and 1
|
# Scale to between 0 and 1
|
||||||
averages = [{
|
averages = [{
|
||||||
"lighting-description": correct_spelling(description.lower()) / 100,
|
"lighting-description": correct_spelling(description.lower()),
|
||||||
"low-energy-lighting": total / counts[description] / 100
|
"low-energy-lighting": total / counts[description] / 100
|
||||||
} for description, total in sums.items()]
|
} for description, total in sums.items()]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -164,6 +164,7 @@ county_to_region_map = {
|
||||||
'Wakefield': 'Yorkshire and the Humber', 'West Yorkshire': 'Yorkshire and the Humber',
|
'Wakefield': 'Yorkshire and the Humber', 'West Yorkshire': 'Yorkshire and the Humber',
|
||||||
'York': 'Yorkshire and the Humber',
|
'York': 'Yorkshire and the Humber',
|
||||||
'Westmorland': 'North West England',
|
'Westmorland': 'North West England',
|
||||||
|
'Westmorland and Furness': 'North West England',
|
||||||
|
|
||||||
# Additional mappings requried, based on what we find in the EPC database
|
# Additional mappings requried, based on what we find in the EPC database
|
||||||
'Greater London Authority': 'Inner London',
|
'Greater London Authority': 'Inner London',
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue