Commit a1710550 authored by Alexander Lercher's avatar Alexander Lercher

Added check for cluster label assignments

parent 965da6db
......@@ -47,18 +47,24 @@ def create_type_label(layer_filename, treshold1, treshold2):
layer_file.write(json.dumps(content))
print_min_max("Solar_Production_Layer.json")
create_type_label("Solar_Production_Layer.json",
treshold1=1.4301666666666666, treshold2=2.860333333333333)
# print_min_max("Solar_Production_Layer.json")
# create_type_label("Solar_Production_Layer.json",
# treshold1=1.4301666666666666, treshold2=2.860333333333333)
print_min_max("User_Demand_Layer.json")
create_type_label("User_Demand_Layer.json",
treshold1=1.8306666666666667, treshold2=3.6608333333333336)
# print_min_max("User_Demand_Layer.json")
# create_type_label("User_Demand_Layer.json",
# treshold1=1.8306666666666667, treshold2=3.6608333333333336)
def check_values():
with open("Solar_Production_Layer.json", 'r') as layer_file:
with open("User_Demand_Layer.json", 'r') as layer_file:
content = json.loads(layer_file.read())
d = {'high': 0, 'medium': 0, 'low':0, 'noise':0}
for e in content:
print(f"{e['label']} : {e['type_label']}")
d[e['type_label']] += 1
# print(f"{e['label']} : {e['type_label']}")
print(d)
check_values()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment