Skip to content

Change GDP deflator for EUR and add factor for EUR_2024#60

Merged
khaeru merged 4 commits intoIAMconsortium:mainfrom
mwerning:iam_units/add-EUR2024-conversion
Mar 10, 2026
Merged

Change GDP deflator for EUR and add factor for EUR_2024#60
khaeru merged 4 commits intoIAMconsortium:mainfrom
mwerning:iam_units/add-EUR2024-conversion

Conversation

@mwerning
Copy link
Contributor

@mwerning mwerning commented Mar 10, 2026

This PR:

  • Adds EUR_2024 as a currency. cf. iiasa/sparccle-workflow#19
  • Changes the deflators used for EUR to be Eurozone-wide values, rather than specific Germany. See discussion below.

Copy link
Member

@danielhuppmann danielhuppmann left a comment

Choose a reason for hiding this comment

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

Thanks, but I'm confused why GDP deflator provided by the World Bank is not correct and has to be modified in this way. Why does the USD deflator not have to be modified in this manner?

Please also add the script that you used to query the data from the World Bank, modify the values, and write the relevant lines. This will help to add more values easily (e.g., 2025 EUR.

@mwerning
Copy link
Contributor Author

mwerning commented Mar 10, 2026

@danielhuppmann The World Bank provides different indicators. There is the NY.GDP.DEFL.ZS.AD indicator, which provides the GDP deflator as a linked series. This is only available on the country level though. For the Euro area, the World Bank does provide data, but the indicator is NY.GDP.DEFL.KD.ZG, which is an annual %, therefore the calculation is needed. I mentioned this to @khaeru, as having an indicator that is available for the entire Euro area seemed more accurate than just using the deflator for Germany, and we discussed to update the definitions accordingly.

Due to time constraints, I didn't download the data using a script, but manually by using the Download option on the World Bank website and did the calculation in Excel. Happy to attach the spreadsheet here if that helps.

GDP_deflator_calc_EUR.xlsx
API_NY.GDP.DEFL.KD.ZG_DS2_en_csv_v2_104.csv

@khaeru
Copy link
Contributor

khaeru commented Mar 10, 2026

EDIT: Ah, I was too slow.

To frame another way:

  • NY.GDP.DEFL.ZS (previous)
    • Used for USD and formerly EUR.
    • This data flow does not have generic/EUR-wide values.
    • The EUR deflators were for Germany specifically (?locations=DE in the URL in the file), which could be a worse fit for data (a) about the EU as a whole (e.g. its total GDP) or (b) for other countries in the Eurozone where inflation went at different rates.
  • NY.GDP.DEFL.KD.ZG
    • This does include EUR-wide values (?locations=XC).

This to me seemed like sound logic, so I encouraged to open the PR.

There many more nuances we could get into. For example, if USD_#### is used to express quantities describing a specific non-USA country (say: Ghana), then in some sense that country's own domestic deflators should be used to change to a different base year, and not the ones of the country (USA) whose currency happens to be picked as units of measurement. But to support choice or detection of this would be a big expansion of scope for the package.

@khaeru
Copy link
Contributor

khaeru commented Mar 10, 2026

@mwerning the test workflow had been disabled by GitHub for inactivity. I've reenabled it. If you push a new commit or force-push a small change to the existing one, it should run again.

@khaeru khaeru added the enhancement New feature or request label Mar 10, 2026
@khaeru
Copy link
Contributor

khaeru commented Mar 10, 2026

a new commit

You should for instance add yourself to AUTHORS.

@mwerning
Copy link
Contributor Author

@khaeru Thank you for the more detailed explanation. I have added today's date to the definitions.txt as the date for the last update for the EUR values and modified the AUTHORS.

@codecov-commenter
Copy link

codecov-commenter commented Mar 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.01%. Comparing base (87b823b) to head (44b756b).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #60   +/-   ##
=======================================
  Coverage   96.01%   96.01%           
=======================================
  Files           5        5           
  Lines         201      201           
=======================================
  Hits          193      193           
  Misses          8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Add 2024 to the list of described supported periods for EUR currency
  conversion.
- Bump copyright year.
@khaeru khaeru merged commit 1b3f6d8 into IAMconsortium:main Mar 10, 2026
11 checks passed
@khaeru
Copy link
Contributor

khaeru commented Mar 10, 2026

Thanks @mwerning for this helpful contribution! 🥳

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants