hub/main.py

20 lines
582 B
Python

from hub.imports.geometry_factory import GeometryFactory
from hub.helpers.dictionaries import Dictionaries
import os
import psycopg2
import csv
input_file = "data/cmm_points_function_vintage_surface.csv"
# Initialize city object from GeometryFactory
city = GeometryFactory(
file_type="csv",
path=input_file,
centroid_x_field="centroid_x",
centroid_y_field="centroid_y",
year_of_construction_field="anne_cnstr",
function_field="code_util",
function_to_hub=Dictionaries().montreal_function_to_hub_function,
total_floor_area_field="supfi_etag"
).city