SEED-platform / seed

Standard Energy Efficiency Data (SEED) Platform™ is a web-based application that helps organizations easily manage data on the energy performance of large groups of buildings.
Other
107 stars 55 forks source link

CO2 Analysis -- eGRID Subregion Code not picked up by program #2997

Closed RDmitchell closed 2 years ago

RDmitchell commented 2 years ago

Describe the bug

Expected Behavior I would have expected the program to calculate the CO2 values because I imported the eGRID subregion codes

Actual Behavior see description

Steps to Reproduce See description

Instance Information Instance: ad707077bc25e403eafed1eb5cc6874d-8554735.us-east-1.elb.amazonaws.com SHA: 6a31f3d36

RDmitchell commented 2 years ago

@macintoshpie -- I have added this to the current project, so it is in Triage

RDmitchell commented 2 years ago

@macintoshpie / @nllong -- copying what I said in slack into this issue

I think something might be wrong with the CO2 analysis on the staging server I am testing on. I thought it had to do with the fact that I added the eGRID subregion field and data on a 2nd import (see issue 2997) but I deleted the inventory (as a superuser) and then reimported the file with the egrid region specified, and am still getting the error that "Property is missing eGRID Subregion Code". image The egrid subregion code is defined for all the records image

macintoshpie commented 2 years ago

Not sure if this is causing the issue, but we're grabbing egrid subregion code from the PropertyView instead of the AnalysisPropertyView (which it should be the latter) https://github.com/SEED-platform/seed/blob/6a31f3d369af1348afccb14c33ff9b4925cb711b/seed/analysis_pipelines/co2.py#L384

RDmitchell commented 2 years ago

@macintoshpie -- so does that mean you will need to change the code? If yes, let me know when the fix is deployed to the new staging server and I will retest. Thx.

RDmitchell commented 2 years ago

Here is the file I imported.

JCC_ESPM_clean_anonymized-40goodrecordsGas-Elec-EGRID.xlsx

RDmitchell commented 2 years ago

@macintoshpie Here is the mapping image

macintoshpie commented 2 years ago

@RDmitchell posted in slack, including here as well for documentation:

My guess is when you tested on monday, the “blessed” column didn’t exist yet (it wasnt in 2.12.1), then in 2.12.2 we added the column, and when you were reimporting it somehow ended up mapping to your existing extra data column

If you could check your column settings and verify there's no egrid code extra data col and retry that might fix it. I tested with your provided data and it worked properly

RDmitchell commented 2 years ago

@macintoshpie -- I will try the import again, but I believe I did this test in this version 2.12.2.6a31f3d36

RDmitchell commented 2 years ago

@macintoshpie -- I suspect this is the problem, ie, I have two definitions of eGRID Subregion Code, one in extra data. image

I guess I should delete the Extra Data field?

RDmitchell commented 2 years ago

To get the CO2 analysis to work, I tried the following

RDmitchell commented 2 years ago

Instance: 2.12.2.6a31f3d36

RDmitchell commented 2 years ago

I will close this issue.