2024-10-03 18:28:35 -04:00
|
|
|
from hub.imports.geometry_factory import GeometryFactory
|
|
|
|
from hub.helpers.dictionaries import Dictionaries
|
2024-10-09 12:11:39 -04:00
|
|
|
from hub.imports.construction_factory import ConstructionFactory
|
|
|
|
from hub.imports.results_factory import ResultFactory
|
2024-10-03 18:28:35 -04:00
|
|
|
|
2024-10-09 12:11:39 -04:00
|
|
|
input_file = "data/cmm_test_corrected.geojson"
|
|
|
|
demand_file = "data/energy_demand_data.csv"
|
2024-10-03 18:28:35 -04:00
|
|
|
|
|
|
|
city = GeometryFactory(
|
2024-10-09 12:11:39 -04:00
|
|
|
"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")
|