question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we make a harmonize module?

See original GitHub issue

We are at the moment beginning to pick up more use of aneris to do harmonization at various stages of analysis. When I first wrote it, I had a specific use case/project in mind, but that is now expanding across a couple of different areas. And it was “pre pyam”.

So, question to our community here - would it make sense to operationally move aneris inside of pyam? I would envision this to effective wrap the current aneris functionality and return a pyam.IamDataFrame of results (or inplace). Currently, aneris uses a decision-tree approach by default, but we could allow this to be overridden by a single method in this interface to keep things simple as well.

I am wondering what others think about this. I know that harmonization is a very common operation and probably implemented all over the place. Would it make sense to have one ‘canoncial’ interface for it? Would you use it if there was one? Or should we just keep it separate and in its own repo.

I will admit bias, I think it would be nice to have it be part of the community toolbox to also help with maintenance efforts. I do not want it to die due to neglect =)

Would love any and all input, but especially from @danielhuppmann @coroa @gaurav-ganti @l-welder @znicholls @Rlamboll @jkikstra

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jkikstracommented, Sep 29, 2020

Hi all, apologies for the delayed response.

From a user perspective, I’m very happy to see this discussion going on. Indeed, as @gidden mentions, while we now use aneris for emissions, it is a common operation that can (and should?) happen much more widely (i.e. for many more variables) in many assessments across the community; one could perhaps think about harmonizing carbon prices or solar capacities.

With this in mind, it would be really great to see the core of aneris being repurposed for creating a pyam.IamDataFrame.harmonize() function (the first option argued for by @coroa). Indeed, we could pass a method as argument. Maybe even write a ‘generalised’ tree function, but I have no feeling for whether such a thing is possible or makes sense (it will be very much ‘expert judgement’ for setting the parameters, @gidden might know better here?

1reaction
coroacommented, Sep 16, 2020

(EDIT: I did not say hi on any of the available channels yet. So here it is: HI. I joined @gidden 's work-team two months ago and have become a regular user of aneris and pyam since. I typically have many ideas for improvements and am not too shy to propose PRs, if time permits. Happy to work together with all of you.)

I don’t have a strong preference for either solution and would make the choice dependent on the envisioned interface:

If we want to have an interface like:

harmonized_model_idf = model_idf.harmonize(history=hist_idf)

then I would urge to include the aneris modules directly into the pyam repository, rather than carrying aneris as an explicit dependency along.

If we are happy enough with an update to aneris HarmonizationDriver to allow something like:

harmonized_model_idf = HarmonizationDriver(model_idf, hist_idf).harmonize()

then pyam does not need the aneris dependency and aneris can live happily alongside pyam.

In either case, I think it makes sense to think about making region mappings a bit more explicit in pyam (ie provide a simple interface to the region_mapping.csv delivered with it) in conjunction with an adaptation of aneris.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Harmonize | Drupal.org
What does it do? Harmonize makes it much easier to access field values in Drupal templates. It does this by preprocessing entity content...
Read more >
Adding Harmonize to Modules (Canvas)
Configure Modules in Canvas to use Harmonize tools such as Discussion, Poll, Course Q&A, Topic Q&A, Chat, and Communication Center.
Read more >
Copy Harmonize Discussions Between Canvas Courses
Use Canvas Modules to copy Harmonize discussions between courses. First add the discussion to the module then use the Canvas Import Content ...
Read more >
Songwriter's Secrets: Writing Harmonies - Musical U
If you are writing songs for a band where two singers are harmonizing, sometimes working on the two vocal parts first will help...
Read more >
iZotope Nectar | How to Create Vocal Harmonies - YouTube
Ryan walks you through the module's parameter settings, so you can ... You will also learn how to adjust the pitch and delay...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found