Open orichters opened 4 months ago
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.
@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.
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)"}
}
🤣
Still, the validation creates errors. My suspicion is that I used tags inside tag definitions and that I'm not allowed to do that.
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?
Also, I see that you used Final Energy as the standard method for aggregating carbon prices. Looking back at https://github.com/IAMconsortium/common-definitions/pull/38, I think we should make that explicit in the variable name how the price was computed.
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
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)
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
@orichters, is this PR still relevant?
@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
orbillion US$2010/yr