mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
put together ha facts and figures
This commit is contained in:
parent
8ef0198606
commit
78f5226ad7
1 changed files with 12 additions and 4 deletions
|
|
@ -44,7 +44,7 @@ class DataLoader:
|
|||
"HA14": 3,
|
||||
# There's just too many unmatched here
|
||||
"HA6": 117,
|
||||
"HA107": 52
|
||||
"HA107": 51
|
||||
}
|
||||
|
||||
def __init__(self, directories, december_figures_filepath, use_cache):
|
||||
|
|
@ -54,6 +54,7 @@ class DataLoader:
|
|||
|
||||
self.data = {}
|
||||
self.december_figures = None
|
||||
self.ha_facts_and_figures = None
|
||||
|
||||
def create_asset_list_matching_address(self, ha_name, asset_list):
|
||||
|
||||
|
|
@ -794,7 +795,8 @@ class DataLoader:
|
|||
}
|
||||
|
||||
eco_eligibility_map = {
|
||||
"not eligble": "not eligible"
|
||||
"not eligble": "not eligible",
|
||||
"eco 4(subject to ciga)": "eco4 (subject to ciga)",
|
||||
}
|
||||
|
||||
ha_facts_and_figures = []
|
||||
|
|
@ -919,9 +921,15 @@ class DataLoader:
|
|||
columns=["not eligible"]
|
||||
)
|
||||
|
||||
ha_facts_and_figures = self.december_figures.merge(ha_facts_and_figures, how="inner", on="HA Name")
|
||||
ha_facts_and_figures = ha_facts_and_figures.fillna(0)
|
||||
# Make all columns apart from HA NAme integers
|
||||
for col in ha_facts_and_figures.columns[1:]:
|
||||
ha_facts_and_figures[col] = ha_facts_and_figures[col].astype(int)
|
||||
|
||||
return ha_facts_and_figures
|
||||
ha_facts_and_figures = self.december_figures.merge(ha_facts_and_figures, how="inner", on="HA Name")
|
||||
ha_facts_and_figures = ha_facts_and_figures.fillna(0)
|
||||
|
||||
self.ha_facts_and_figures = ha_facts_and_figures
|
||||
|
||||
|
||||
def get_epc_data(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue