-
Notifications
You must be signed in to change notification settings - Fork 11
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
Add units agnostic harmonisation #42
Conversation
@lewisjared fyi |
Hey @znicholls I can try to get to this in the next day or so. It would be useful to add a bit more context and flavor to the description which would help me understand the motivation (what didn't work) and solution. |
Awesome thanks. There's not a massive rush unless @jkikstra wants to simplify the WG3 process by using something like this.
No worries, done |
|
||
def _harmonise_single(timeseries, history, harmonisation_year, overrides): | ||
assert timeseries.shape[0] == 1 | ||
# unclear why we don't use pyam or scmdata for filtering |
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.
# unclear why we don't use pyam or scmdata for filtering | |
# unclear why we don't have pyam or scmdata as a dependency as this would simplify filtering and other handling |
Hi @znicholls , starting to look at this now. It's a great addition, and if it's ok for you and @lewisjared and @jkikstra I'd like to try to take a deeper look to see how much of this can be incorporated in the guts of So if it's ok to delay a detailed review for sometime, that'd be great. To answer a lot of your questions very simply, |
Yep no worries, this can just sit until you get time to dive into the
details.
Makes sense re pyam, might be a useful dependency now.
…On Thu, 2 Sep 2021 at 2:39 am, Matthew Gidden ***@***.***> wrote:
Hi @znicholls <https://github.com/znicholls> , starting to look at this
now. It's a great addition, and if it's ok for you and @lewisjared
<https://github.com/lewisjared> and @jkikstra
<https://github.com/jkikstra> I'd like to try to take a deeper look to
see how much of this can be incorporated in the guts of aneris.
So if it's ok to delay a detailed review for sometime, that'd be great.
To answer a lot of your questions very simply, aneris predates pyam, so
did not use it of course..
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#42 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFUH5G62AX3F2MMQ5L426XLT7ZJLRANCNFSM5C7225UA>
.
|
Hey @znicholls - picking this up again so WG3 can get out the door. I have not had time to do any more robust thinking/coding on this. Accordingly, I suggest the following way forward:
|
Brain dump in #46. Perhaps not as clear as we would hope but it should get to the issues (although you might have to wade through some waffle to get there) |
Thanks @znicholls ! |
Add convenience functions which make it simpler to harmonise a number of timeseries and can also handle mismatches in units.
There's a few problems this is aiming to solve:
iamdf.timeseries()
(maybe I've missed something)All I've done is add a single module,
convenience
, with a single function,harmonise_all
, that addresses the issues above. The new tutorial notebook gives an illustration of how to use it and demonstrates a) how it can handle unit conversion and b) how the default decision tree can be overridden.The changes in
methods
are to handle the time columns being integers rather than strings. They don't break any other tests so I think they're written in a suitably flexible way. I also picked up a dependence on the gas in the default decision tree, but this appears to be undocumented. I can make a separate issue for that if helpful.