From 1b4fcc3d9442c5fa9c36bc9d6d2f9f381c59dd51 Mon Sep 17 00:00:00 2001 From: ogavalda <33801000+ogavalda@users.noreply.github.com> Date: Fri, 30 Aug 2024 17:46:11 -0400 Subject: [PATCH] Added thunderbay --- hub/catalog_factories/usage/nrcan_catalog.py | 2 +- hub/data/construction/Changing names.py | 18 ++++++++++++++++++ hub/data/geolocation/admin2Codes.txt | 1 + .../helpers/construction_helper.py | 3 ++- hub/imports/weather/helpers/weather.py | 3 ++- 5 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 hub/data/construction/Changing names.py diff --git a/hub/catalog_factories/usage/nrcan_catalog.py b/hub/catalog_factories/usage/nrcan_catalog.py index b990bf19..73ee4ffb 100644 --- a/hub/catalog_factories/usage/nrcan_catalog.py +++ b/hub/catalog_factories/usage/nrcan_catalog.py @@ -98,7 +98,7 @@ class NrcanCatalog(Catalog): domestic_hot_water_peak_flow = ( space_type['service_water_heating_peak_flow_per_area'] * cte.GALLONS_TO_QUBIC_METERS / cte.HOUR_TO_SECONDS - ) + ) #m3/(s m2) space_types_dictionary[usage_type] = {'occupancy_per_area': occupancy_density, 'lighting_per_area': lighting_density, 'electric_equipment_per_area': appliances_density, diff --git a/hub/data/construction/Changing names.py b/hub/data/construction/Changing names.py new file mode 100644 index 00000000..e2813a3d --- /dev/null +++ b/hub/data/construction/Changing names.py @@ -0,0 +1,18 @@ +import json +from pathlib import Path +from hub.catalog_factories.catalog import Catalog +from hub.catalog_factories.data_models.construction.content import Content +from hub.catalog_factories.construction.construction_helper import ConstructionHelper +from hub.catalog_factories.data_models.construction.construction import Construction +from hub.catalog_factories.data_models.construction.archetype import Archetype +from hub.catalog_factories.data_models.construction.window import Window +from hub.catalog_factories.data_models.construction.material import Material +from hub.catalog_factories.data_models.construction.layer import Layer +import hub.helpers.constants as cte + +_path_constructions = (Path(__file__).parent / 'nrcan_constructions.json').resolve() +with open(_path_constructions, 'r', encoding='utf-8') as file: + _constructions = json.load(file) + +for surface in _constructions['opaque_surfaces']: + print(surface.name) diff --git a/hub/data/geolocation/admin2Codes.txt b/hub/data/geolocation/admin2Codes.txt index aa1ba712..4682e801 100644 --- a/hub/data/geolocation/admin2Codes.txt +++ b/hub/data/geolocation/admin2Codes.txt @@ -8378,6 +8378,7 @@ CA.10.08 Abitibi-Témiscamingue Abitibi-Temiscamingue 5881941 CA.04.1306 Albert County Albert County 5883098 CA.03.5883398 Alexander Alexander 5883398 CA.08.3557 Algoma Algoma 5883638 +CA.08.3558 Thunder Bay Thunder Bay CA.03.5884145 Alonsa Alonsa 5884145 CA.07.1205 Annapolis County Annapolis County 5885415 CA.07.1214 Antigonish County Antigonish County 5886183 diff --git a/hub/imports/construction/helpers/construction_helper.py b/hub/imports/construction/helpers/construction_helper.py index d75d8424..422a71a6 100644 --- a/hub/imports/construction/helpers/construction_helper.py +++ b/hub/imports/construction/helpers/construction_helper.py @@ -58,7 +58,8 @@ class ConstructionHelper: 'Boucherville': '6', 'Mascouche': '6', 'Saint-Leonard': '6', - 'La Prairie': '6' + 'La Prairie': '6', + 'Thunder Bay': '7B' } _reference_city_to_israel_climate_zone = { diff --git a/hub/imports/weather/helpers/weather.py b/hub/imports/weather/helpers/weather.py index 755f9ad3..4092642f 100644 --- a/hub/imports/weather/helpers/weather.py +++ b/hub/imports/weather/helpers/weather.py @@ -25,7 +25,8 @@ class Weather: 'US.NY.047': 'https://energyplus-weather.s3.amazonaws.com/north_and_central_america_wmo_region_4/USA/NY/USA_NY_New.York.City-Central.Park.94728_TMY/USA_NY_New.York.City-Central.Park.94728_TMY.epw', 'CA.10.12': 'https://energyplus-weather.s3.amazonaws.com/north_and_central_america_wmo_region_4/CAN/PQ/CAN_PQ_Quebec.717140_CWEC/CAN_PQ_Quebec.717140_CWEC.epw', 'IL.01.': 'https://energyplus-weather.s3.amazonaws.com/europe_wmo_region_6/ISR/ISR_Eilat.401990_MSI/ISR_Eilat.401990_MSI.epw', - 'ES.07.PM': 'https://energyplus-weather.s3.amazonaws.com/europe_wmo_region_6/ESP/ESP_Palma.083060_SWEC/ESP_Palma.083060_SWEC.epw' + 'ES.07.PM': 'https://energyplus-weather.s3.amazonaws.com/europe_wmo_region_6/ESP/ESP_Palma.083060_SWEC/ESP_Palma.083060_SWEC.epw', + 'CA.10.17': 'https: //energyplus-weather.s3.amazonaws.com/north_and_central_america_wmo_region_4/CAN/ON/CAN_ON_Thunder.Bay.717490_CWEC.epw' } # todo: this dictionary need to be completed, a data science student task?