Skip to content

Commit

Permalink
Merge pull request #3015 from SEED-platform/refactor/better-include-e…
Browse files Browse the repository at this point in the history
…lec-unknown

refactor: include Electricity - Unknown meter type in analyses
  • Loading branch information
nllong committed Nov 19, 2021
2 parents 762089d + 9db5682 commit 41161e4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions seed/analysis_pipelines/better/buildingsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
# NOTE: this is semi-redundant with to_energy_type dict in building_sync/mappings.py
SEED_TO_BSYNC_RESOURCE_TYPE = {
Meter.ELECTRICITY_GRID: 'Electricity',
Meter.ELECTRICITY_UNKNOWN: 'Electricity',
Meter.NATURAL_GAS: 'Natural gas',
Meter.DIESEL: 'Diesel',
Meter.PROPANE: 'Propane',
Expand Down
2 changes: 1 addition & 1 deletion seed/analysis_pipelines/bsyncr.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _prepare_all_properties(self, analysis_view_ids_by_property_view_id, analysi
.annotate(readings_count=Count('meter_readings'))
.filter(
property=analysis_property_view.property,
type__in=[Meter.ELECTRICITY_GRID, Meter.ELECTRICITY_SOLAR, Meter.ELECTRICITY_WIND],
type__in=[Meter.ELECTRICITY_GRID, Meter.ELECTRICITY_SOLAR, Meter.ELECTRICITY_WIND, Meter.ELECTRICITY_UNKNOWN],
readings_count__gte=12,
)
)
Expand Down
2 changes: 1 addition & 1 deletion seed/analysis_pipelines/co2.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
ERROR_INVALID_REGION_CODE: 'Could not find C02 rate for provided eGRID subregion code.'
}

VALID_METERS = [Meter.ELECTRICITY_GRID]
VALID_METERS = [Meter.ELECTRICITY_GRID, Meter.ELECTRICITY_UNKNOWN]
TIME_PERIOD = datetime.timedelta(days=365)

# These factors represent how much CO2e is emitted per MWh of electricity used
Expand Down
2 changes: 1 addition & 1 deletion seed/analysis_pipelines/eui.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
WARNING_SOME_INVALID_PROPERTIES: 'Some properties failed to validate.'
}

VALID_METERS = [Meter.ELECTRICITY_GRID, Meter.ELECTRICITY_SOLAR, Meter.ELECTRICITY_WIND]
VALID_METERS = [Meter.ELECTRICITY_GRID, Meter.ELECTRICITY_SOLAR, Meter.ELECTRICITY_WIND, Meter.ELECTRICITY_UNKNOWN]
TIME_PERIOD = datetime.timedelta(days=365)


Expand Down

0 comments on commit 41161e4

Please sign in to comment.