hub/main.py

21 lines
824 B
Python

from hub.imports.geometry_factory import GeometryFactory
from hub.helpers.dictionaries import Dictionaries
from hub.imports.construction_factory import ConstructionFactory
from hub.imports.results_factory import ResultFactory
input_file = "data/cmm_test_corrected.geojson"
demand_file = "data/energy_demand_data.csv"
# Initialize city object from GeometryFactory
city = GeometryFactory(
"geojson",
input_file,
height_field="height",
year_of_construction_field="contr_year",
function_field="function_c",
adjacency_field="adjacency",
function_to_hub=Dictionaries().montreal_function_to_hub_function).city
ConstructionFactory('nrcan', city).enrich()
ResultFactory('archetypes', city, demand_file).enrich()
print("done")