Commit 67bcbc39 authored by Lubber's avatar Lubber

Merge remote-tracking branch 'origin/develop' into develop

parents 88ef9c6d a1710550
...@@ -47,18 +47,24 @@ def create_type_label(layer_filename, treshold1, treshold2): ...@@ -47,18 +47,24 @@ def create_type_label(layer_filename, treshold1, treshold2):
layer_file.write(json.dumps(content)) layer_file.write(json.dumps(content))
print_min_max("Solar_Production_Layer.json") # print_min_max("Solar_Production_Layer.json")
create_type_label("Solar_Production_Layer.json", # create_type_label("Solar_Production_Layer.json",
treshold1=1.4301666666666666, treshold2=2.860333333333333) # treshold1=1.4301666666666666, treshold2=2.860333333333333)
print_min_max("User_Demand_Layer.json") # print_min_max("User_Demand_Layer.json")
create_type_label("User_Demand_Layer.json", # create_type_label("User_Demand_Layer.json",
treshold1=1.8306666666666667, treshold2=3.6608333333333336) # treshold1=1.8306666666666667, treshold2=3.6608333333333336)
def check_values(): 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()) content = json.loads(layer_file.read())
d = {'high': 0, 'medium': 0, 'low':0, 'noise':0}
for e in content: 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