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

First set of macro variables #56

Closed
wants to merge 10 commits into from
Closed

Conversation

orichters
Copy link
Contributor

@orichters orichters commented Feb 15, 2024

@FlorianLeblancDr and I added a first set of macro variables, still needs a review from @IAMconsortium/common-definitions-macro-economy, but I think let us already check whether we are going in the right direction now.

I tried to use tags as much as possible, but sometimes there is significant overlap between economic sectors used for Value Added, for Trade, for Energy etc., so it might be worth doing a cleanup.

@danielhuppmann: I'm not sure whether the Currency unit tag works like that, but I think it should. Haven't tested. Also unsure whether to use billion USD_2010/yr or billion US$2010/yr

@danielhuppmann
Copy link
Member

Sorry, the tags don't work like that, they have to be part of the variable-name - see the documentation here.

About the currency-units, I strongly suggest to move towards SI/ISO-conventions and avoid special characters - this will greatly facilitate automated processing, validation and processing in subsequent applications.

@orichters
Copy link
Contributor Author

@danielhuppmann. I see, I undid that.

Still, I don't understand the error raised in the checks now. I thought I was using the tags now as intended:

  File "/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/nomenclature/code.py", line 44, in from_dict
    raise ValueError(f"Code is not a single name-attributes mapping: {mapping}")
ValueError: Code is not a single name-attributes mapping: {'Food': None, 'description': 'COICOP code CP01 (Food)'}
Error: Process completed with exit code 1.

@danielhuppmann
Copy link
Member

The following

  - Food:
    description: COICOP code CP01 (Food)

is interpreted as

{
  "Food": None,
  "description": "COICOP code CP01 (Food)"
}

You have to add two whitespaces before the description such

  - Food:
       description: COICOP code CP01 (Food)

is interpreted as

{
  "Food": {"description": "COICOP code CP01 (Food)"}
}

@orichters
Copy link
Contributor Author

Still, the validation creates errors. My suspicion is that I used tags inside tag definitions and that I'm not allowed to do that.

@danielhuppmann
Copy link
Member

Unfortunately, you are correct, it is not (yet?) possible to do nested tagging, but given that these are only four items, it works to include them directly, I guess?

@danielhuppmann
Copy link
Member

Also, I see that you used Final Energy as the standard method for aggregating carbon prices. Looking back at #38, I think we should make that explicit in the variable name how the price was computed.

@FlorianLeblancDr
Copy link
Contributor

FlorianLeblancDr commented Feb 15, 2024

I did not find the common suggestion of Tier 1 we build
https://github.com/FlorianLeblancDr/common-definitions/blob/for_orichters_macro/definitions/variable/macro-economy/tier_1_macroeconomic.yaml
And found it easier to go for smaller PR starting with #57

@IAMconsortium/common-definitions-macro-economy

@volker-krey
Copy link
Contributor

Dear all, @danielhuppmann made me aware of this discussion. Regarding the Value Added variables, I wanted to mention that as part of the AR6 National Scenario call, we revised those variables and actually included ISIC sectors in the definitions to reduce ambiguity and improve consistency with statistical data. Those definitions can be found on the variable_definitions sheet of the national data template (https://data.ene.iiasa.ac.at/ar6-scenario-submission/static/files/national.zip), but let me paste the Value Added variables in below. Hope this is useful.

Value Added | billion US$2010/yr | Total value added
Value Added|Agriculture | billion US$2010/yr | Value added of agriculture, forestry and fishing (ISIC Rev4 Divisions 01-03)
Value Added|Industry | billion US$2010/yr | Value added of industry (ISIC Rev4 Divisions 05-43)
Value Added|Industry|Mining | billion US$2010/yr | Value added of mining and quarrying (ISIC Rev4 Divisions 05–09)
Value Added|Industry|Manufacturing | billion US$2010/yr | Value added of manufacturing (ISIC Rev4 Divisions 10–33)
Value Added|Industry|Water | billion US$2010/yr | Value added of water supply; sewerage, waste management and remediation activities (ISIC Rev4 Divisions 36–39)
Value Added|Industry|Construction | billion US$2010/yr | Value added of construction (ISIC Rev4 Divisions 41–43)
Value Added|Industry|Manufacturing|Steel | billion US$2010/yr | Value added of manufacturing (ISIC Rev4 Classes 2410, 2431)
Value Added|Industry|Manufacturing|Cement | billion US$2010/yr | Value added of manufacturing (ISIC Rev4 Divisions 2394)
Value Added|Industry|Manufacturing|Chemicals | billion US$2010/yr | Value added of manufacturing (ISIC Rev4 Divisions 20)
Value Added|Industry|Manufacturing|Light Manufacturing | billion US$2010/yr | Value added of manufacturing (ISIC Rev4 Divisions 10–16, 18-23 with exception of Class 2394, 25-33)
Value Added|Industry|Manufacturing|Pulp and Paper | billion US$2010/yr | Value added of manufacturing (ISIC Rev4 Divisions 17)
Value Added|Industry|Manufacturing|Non-ferrous Metals | billion US$2010/yr | Value added of manufacturing (ISIC Rev4 Classes 2420, 2432)
Value Added|Industry|Energy | billion US$2010/yr | Value added of energy (ISIC Rev4 Divisions 05, 06, 19, 35, Group 091 and Classes 0892 and 0721)
Value Added|Industry|Energy|Electricity and Gas | billion US$2010/yr | Value added of electricity, gas, steam and air conditioning supply (ISIC Rev4 Division 35)
Value Added|Services | billion US$2010/yr | Value added of services (ISIC Rev4 Divisions 45-99)
Value Added|Services|Transportation | billion US$2010/yr | Value added of transportation and storage (ISIC Rev4 Divisions 49–53)
Value Added|Services|Public Administration | billion US$2010/yr | Value added of public administration and defence; compulsory social security (ISIC Rev4 Division 84)
Value Added|Services|Other Services | billion US$2010/yr | Value added of other services (ISIC Rev4 Divisions 45-99 other than 49-53 or 84)

@FlorianLeblancDr
Copy link
Contributor

Very usefull Volker.
We will build on this and make the template consitent with the AR6 national call.

We started to do it in PR57

e.g. This File

I will also mention your comment in the general issue

description: electricity
- Secondary Energy|Hydrogen:
description: hydrogen
- Secondary Energy|Liquids|Biomass:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a category for (aggregate) liquid fuels

@danielhuppmann
Copy link
Member

@orichters, is this PR still relevant?

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

Successfully merging this pull request may close these issues.

4 participants