-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fill NAs with zero in abcd
#460
Conversation
Note: It seems #455 has introduced a note in R CMD check... it is not complaining that Since this is only a NOTE, it won't appear in our automated CI/CD, but it's something worth looking into in any case. Handling this in #461 |
No strong opinion here because @jdhoffa and @jacobvjk know better what needs to be done here than I do, but general thoughts...
|
Thanks CJ, that was the context I was hoping for! :-) In that case, I think the gist of this PR is ok, though perhaps the implementation should be a bit more precise... @jacobvjk what do you think |
I still feel like it is reasonable safe to assume that an NA is an asset that is not actually operating at that point in time. In that case a replacement with zero is fine. I remember being told in the data herald that when no updated information on production sites are available, PAMS assumes that the level of production/capacity from the previous year is still valid. |
I am not so sure about this one. imagine you have a steel plant that is not operational in a given year (has either 0 or NA production). I would expect that steel plant to have an NA value for emission intensity. clearly the technology employed would not be a zero carbon technology even though nothing is produced. so I think you can't replace the NA with a 0 here. If you did, the exposure to this plant would be considered zero emissions and you could reduce your portfolio's emission intensity by having high financial exposure to an inactive plant. Am I understanding your point right? @jdhoffa |
Makes sense! And agreed. Then I think this PR is good to go |
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.
lgtm
This PR adjusts the expected behaviour of
target_market_share
in how it handles inputabcd
data whenabcd$production
containsNA
s. Previously it would filter these rows and remove from analysis. Now, it replaces them with0
.@jacobvjk I have a follow-up question, which is, do we want
target_sda
to exhibit the same behaviour? I imagine probably we do.and @cjyetman I wanted your input here, do you think this is a reasonable thing to do? (see linked issue for more reference). I know there are, in general, fears around replacing
NA
s with 0s willy nilly, but I think in this particular case, we do actually expect that PAMS data withNA
production values DO mean 0 production... Especially if the asset has not "turned on" yet.Closes #423