Skip to content
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

Russia vs. Russian Federation in G20 definitions (and possible issue with the G20 file in itself) #203

Closed
korsbakken opened this issue Nov 5, 2024 · 5 comments

Comments

@korsbakken
Copy link

This is possibly two issues:

In the G20 region definition file, Russia is listed as "Russia" rather than "Russian Federation", which is inconsistent with the naming in pycountry and in nomenclature.countries. Is that intentional, or should it be made consistent?

The possibly offending line is here:

If it is changed, the change will also need to be reflected in any region mapping files that map to the Russia G20 region (COFFEE is the only one I found by grep/manual inspection).

In addition, the g20.yaml file itself will potentially produce duplicate regions for projects that add individual countries. Do we need to have individual countries as regions in the G20 hierarchy? Or could we instead have G20 as a region, with the countries given in the countries attribute, and let teams that need individual countries add them themselves from nomenclature.countries?

@danielhuppmann
Copy link
Member

Thanks @korsbakken for raising this issue. The first item is fixed via #204.

And yes, defining a project that uses both common-definitions-regions and all nomenclature-countries (using countries: True in nomenclature.yaml) will currently not work. We plan to support that using import-filters, see IAMconsortium/nomenclature#326

Having a list of key individual countries used in IAM projects seems like a useful compromise between only aggregate-regions and always using all countries.

I have not seen a use-case yet for an own G20-region, but this could easily be added to the common region-hierarchy.

@korsbakken
Copy link
Author

Having a list of key individual countries used in IAM projects seems like a useful compromise between only aggregate-regions and always using all countries.

Thanks. Yes, I agree that a project-specific list is a better solution than grabbing all countries (unless that is what is needed).

But the issue now is that because the G20 hierarchy exists in common-definitions and nomenclature throws an exception for duplicate definitions, you cannot use the region definitions from common-definitions at all if you also want to include any of the G20 countries as individual countries under a different hierarchy in your project (or just if you want a full country definition that includes ISO etc. in your DSD). But if import filters are implemented, then that would solve the problem, yes.

Would it be an option to allow merging or overriding definitions from one repo with those of another? Or is that something you have decided against for a reason? I implemented a related feature in the (still alpha) iam-validation package, where you can use an update method to add definitions from one DSD to another, and override overlapping definitions. It's still a little rough around the edges when it comes to the metadata attributes, though. But a similar approach could be extended to load two repositories and let duplicate definitions in one override the other. Or a list of multiple repositories in order of priority, for that matter.

@danielhuppmann
Copy link
Member

Two ways to resolve the current conflict between G20-countries and nomenclature.countries:

  • Initialize the RegionCodeList in your project only from common-definitions and then add countries to the mapping "manually" checking against duplicates
  • Contribute to the filter-feature when importing other repositories, @phackstock started a PR at Filter external repos nomenclature#396

At the moment, I'm hesitant to allow (silently?) dropping duplicates at initialization in the nomenclature package.

@phackstock
Copy link
Contributor

At the moment, I'm hesitant to allow (silently?) dropping duplicates at initialization in the nomenclature package.

I'm very much in agreement with this. The way I see it, the whole point of having nomenclature and definition files is to have unique definitions for variables, regions, etc...
Allowing dropping/merging duplicate definitions could lead to ambiguities and misunderstandings.

The price to pay for uniqueness is of course discussions like this one but I think that it's still better than allowing multiple definitions of the same value.

@danielhuppmann
Copy link
Member

@phackstock implemented IAMconsortium/nomenclature#396, so it is now possible to filer out G20 regions when using common-definitions regions and use all countries.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants