Skip to content

Commit

Permalink
Merge pull request #45 from EPAENERGYSTAR/feature/epa2.0_climate_zone…
Browse files Browse the repository at this point in the history
…_weights

Feature/epa2.0 climate zone weights
  • Loading branch information
john-zither authored Jan 8, 2024
2 parents f98a895 + 97da25b commit 6925ea5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
19 changes: 6 additions & 13 deletions thermostat/climate_zone.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from eeweather.geo import get_lat_long_climate_zones
import numpy as np
import logging
from pathlib import Path

logger = logging.getLogger('epathermostat')

Expand Down Expand Up @@ -38,20 +39,12 @@
'Mixed-Dry': 'Mixed-Dry/Hot-Dry',
}

WEIGHTS = pd.read_csv(
Path(__file__).parents[0] / "resources" / "NationalAverageClimateZoneWeightings.csv"
).set_index('climate_zone')
HEATING_CLIMATE_ZONE_WEIGHTS = WEIGHTS["heating_weight"].to_dict()

HEATING_CLIMATE_ZONE_WEIGHTS = {
'very-cold_cold': 0.549,
'mixed-humid': 0.312,
'mixed-dry_hot-dry': 0.054,
'hot-humid': 0.049,
'marine': 0.036}

COOLING_CLIMATE_ZONE_WEIGHTS = {
'very-cold_cold': 0.096,
'mixed-humid': 0.34,
'mixed-dry_hot-dry': 0.144,
'hot-humid': 0.42,
'marine': 0.0}
COOLING_CLIMATE_ZONE_WEIGHTS = WEIGHTS["cooling_weight"].to_dict()


def retrieve_climate_zone(zipcode):
Expand Down
10 changes: 5 additions & 5 deletions thermostat/resources/NationalAverageClimateZoneWeightings.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
climate_zone,heating_weight,cooling_weight
Very-Cold/Cold,0.549,0.096
Mixed-Humid,0.312,0.340
Mixed-Dry/Hot-Dry,0.054,0.144
Hot-Humid,0.049,0.420
Marine,0.036,0.000
very-cold_cold,0.564,0.194
mixed-humid,0.294,0.311
mixed-dry_hot-dry,0.051,0.137
hot-humid,0.054,0.345
marine,0.037,0.013

0 comments on commit 6925ea5

Please sign in to comment.