Completed v0.2

This commit is contained in:
Guille Gutierrez 2023-02-22 05:35:30 -05:00
parent b7b3c73ccd
commit 88dba07889
4 changed files with 21 additions and 10 deletions

View File

@ -5,6 +5,8 @@ from urllib.request import urlopen
from bs4 import BeautifulSoup
print('start archetypes')
def process_formula(formula, hdd):
formula = formula.replace('( hdd < ', '').replace(') ', '').split(':')
for equation in formula:
@ -54,30 +56,30 @@ for standard in standards['standard']:
elif period == '1980_2010':
archetype["infiltration_rate_for_ventilation_system_off"] = 1.0
count = 10
window_wall_ratio = {"transparent_ratio": {}}
window_wall_ratio = {}
for cell in cells:
if cell == 'Gross Window-Wall Ratio':
count = 0
if count == 2:
window_wall_ratio["transparent_ratio"]['north'] = cell
window_wall_ratio['north'] = cell
if count == 3:
window_wall_ratio["transparent_ratio"]['east'] = cell
window_wall_ratio['east'] = cell
if count == 4:
window_wall_ratio["transparent_ratio"]['south'] = cell
window_wall_ratio['south'] = cell
if count == 5:
window_wall_ratio["transparent_ratio"]['west'] = cell
window_wall_ratio['west'] = cell
if count < 6:
count += 1
found = False
skylight_roof_ratio = {"transparent_ratio": {}}
skylight_roof_ratio = {}
for cell in cells:
if cell == 'Skylight-Roof Ratio':
found = True
elif found:
skylight_roof_ratio['transparent_ratio']['north'] = cell
skylight_roof_ratio['transparent_ratio']['east'] = cell
skylight_roof_ratio['transparent_ratio']['south'] = cell
skylight_roof_ratio['transparent_ratio']['west'] = cell
skylight_roof_ratio['north'] = cell
skylight_roof_ratio['east'] = cell
skylight_roof_ratio['south'] = cell
skylight_roof_ratio['west'] = cell
found = False
archetype["constructions"] = {}
archetype["constructions"]["OutdoorsWall"] = {

5
main.py Normal file
View File

@ -0,0 +1,5 @@
import opaque_surfaces
import transparent_surfaces
import archetypes
print('NRCAN catalog successfully created')

View File

@ -4,6 +4,8 @@ import json
from urllib.request import urlopen
print('start opaque surfaces')
def process_formula(formula, hdd):
formula = formula.replace('( hdd < ', '').replace(') ', '').split(':')
for equation in formula:

View File

@ -3,6 +3,8 @@ import xmltodict
import json
from urllib.request import urlopen
print('start transparent surfaces')
def process_formula(formula, hdd):
formula = formula.replace('( hdd < ', '').replace(') ', '').split(':')
for equation in formula: