When looked from the outside, most windows seem alike. But technologically, they can be made from very different materials with different characteristics. How can we then choose a window? How do the characteristics of a good one look like? Can a good window affect our mood? The National Fenestration Rating Council (NFRC) has created a database about various different manufacturers, window types and models along with their characteristics. According to this organization, there are several important window attributes:
- U-factor: measures how well a product can keep heat from escaping from the inside of a room. The lower the number, the better a product is keeping heat in (lower is better)
- Solar Heat Gain Coefficient (SHGC): measures how well a product can resist unwanted heat gain, which is especially important during summer cooling season. The lower the number, the less you'll spend on cooling (lower is better)
- Visible transmittance (VT): measures how well a product is designed to effectively light your home wiht daylight potentially saving you money on artificial lighting. The higher the number, the more natural light is left in (higher is better)
- Air leakage: measures how much air will enter a room through a product. The lower the number, the fewer drafts you experience (lower is better)
- Condensation resistance: determines how well the window resists forming condensation (higher is better)
We notice that each observation has the features "U-factor", "SHGC", "VT" and "Condensation resistance". Assuming they are equally important, we want to find a window whose sum of relative values is maximal. We can use the MinMaxScaler in sklearn to fit and transform the data to an interval [0, 1]. Since lower values are better for the first two columns, we subtract them from 1. The we find the sums on each row and the indices which would have sorted these sums. Since the sort is ascending by default and we seek to restrict ourselves to the maximal sums only, we reverse the result and take the IDs of the first 20 items.
import pandas as pd import numpy as np from sklearn.preprocessing import MinMaxScaler mms = MinMaxScaler() header_cols = ['CPD #','Group ID','Manufacturer Product Code','Frame/Sash Type','U-factor','SHGC','VT','Condensation Resistance','Glazing Layers','Low-E','Gap Widths','Spacer','Gap Fill','Grid','Divider','Tint'] df = pd.read_csv('ALL_windows.csv', names=header_cols) # 587.8MB file print(df.shape) # (4185620, 16) indices = df['CPD #'] res = df[['U-factor', 'SHGC', 'VT', 'Condensation Resistance']] transf = mms.fit_transform(res) transf[:,0] = 1 - transf[:,0] transf[:,1] = 1 - transf[:,1] sumres = transf.sum(axis=1) some_indices = np.argsort(sumres)[::-1][:20] for idx in some_indices: print(indices[idx])
We now have the IDs of the windows of interest which allows us to go back to the NFRC site and use them to find the manufacturer and specifics of each product (I didn't include "Manufacturer" column in the data to save some time and the window model number is not very informative).
While some windows can have exceptional ratings in one dimension, they may have suboptimal ones in several others. In reality, we often try to optimize against multiple objectives, which was also the approach taken here. While this might work well in general, for specific applications you may choose to weigh the different attributes differently.
The data can be used not only to discover manufacturers, but also as a benchmark to test any future windows you encounter. For instance, in my case I found that a window having an U-factor of 0.15, solar heat gain coefficient of 0.29, visible transmittance of 0.53 and condensation resistance of 0.85 may not be that bad, considering that relative to others it seems to have well-balanced characteristics. (As long as the database is up-to-date.) If we knew about the characteristics of a new model, we could use these numbers as an anchor to determine how much the new product deviates from them.
Windows (and their frames) seem to be often neglected in buildings, causing loss of heat and the nudge towards increased usage of heating appliances (which have been shown to consume lots of energy). The American Energy Innovation Council, for instance, estimates that losses to windows cost US consumers 40 billion dollar each year. Although windows should not be neglected (exposure to light is linked with our mood), we should not forget that they aren't the only surface (there are walls too) which come in contact with air. Everytime we walk in a building, that's on a surface as well.