-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gailin/fix consumed sign bug #221
Conversation
* add neg check to output_to_results * add rate columns to negative check * make negative check not error on small (small run has data issues leading to negative, caused by using subset of data)
.gitignore
Outdated
@@ -14,6 +14,9 @@ notebooks/.ipynb_checkpoints | |||
notebooks/*/.ipynb_checkpoints | |||
.hypothesis/ | |||
|
|||
# Editor settings | |||
.vscode/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to duplicate line 24 (although I hadn't included the wildcard) - maybe we should just delete line 24
self.results[ba]["net_consumed_mwh"] = ( | ||
self.generation[ba] + self.eia930.df[KEYS["E"]["TI"] % ba] | ||
)[self.generation.index] | ||
if ba in BA_930_INCONSISTENCY: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I like how we only use demand for these BAs that have issues.
@@ -77,13 +92,18 @@ def output_intermediate_data(df, file_name, path_prefix, year, skip_outputs): | |||
|
|||
|
|||
def output_to_results(df, file_name, subfolder, path_prefix, skip_outputs): | |||
# Always check columns that should not be negative. | |||
small = "small" in path_prefix |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a clever way to do this without passing args.small to the function!
Closes #214 , see issue for more commentary
write_power_sector_results
net_consumed_mwh
net_consumed_mwh
for BAs with inconsistencies between EIA-930 interchange and ournet_generation_mwh
, because these inconsistencies prevent calculation of a reasonablenet_consumed_mwh
output_to_results
to guarantee that all result files must pass validation check