epogrebnyak / weo-reader

Python client to read IMF World Economic Outlook (WEO) dataset as pandas dataframe.
31 stars 12 forks source link

Incomplete release of April 2020 WEO #1

Closed andreas-vester closed 4 years ago

andreas-vester commented 4 years ago

The April 2020 weo seems to have a number of changes (identifier, keys, etc.). Not all methods are properly working with that file. Also some of your tests are failing with this new weo file edition.

epogrebnyak commented 4 years ago

Thank you for pointing out, let me inquire.

Note https://db.nomics.world/IMF/WEO?q=WEO also provides access to same dataset, that should be better tested, hopefully.

I'll look into the April 2020 changes meanwhile for this package.

epogrebnyak commented 4 years ago

In part may be due to this:

Due to the high level of uncertainty in current global economic conditions, the April 2020 WEO database and statistical tables contain only these indicators: real GDP growth, consumer price index, current account balance, unemployment, per capita GDP growth, and fiscal balance. Projections for these indicators are provided only through 2021.

https://www.imf.org/external/pubs/ft/weo/data/changes.htm

epogrebnyak commented 4 years ago

So as stated above the data avilable in the dataset is the following:

In development version one can do:

w = download("2020.csv", 2020, 1) # newer functionality, both downloads and makes WEO object
w.variables()

this will list available variables:

[('Gross domestic product, constant prices', 'Percent change', 'NGDP_RPCH'),
 ('Gross domestic product, current prices',
  'Purchasing power parity; international dollars',
  'PPPGDP'),
 ('Gross domestic product per capita, constant prices',
  'Purchasing power parity; percent change',
  'NGDPRPPPPCPCH'),
 ('Inflation, average consumer prices', 'Percent change', 'PCPIPCH'),
 ('Inflation, end of period consumer prices', 'Percent change', 'PCPIEPCH'),
 ('Unemployment rate', 'Percent of total labor force', 'LUR'),
 ('General government net lending/borrowing', 'Percent of GDP', 'GGXCNL_NGDP'),
 ('Current account balance', 'Percent of GDP', 'BCA_NGDPD')]

so everything we can get from April-2020 issue is:

[w.getc(x) for (s, u, x) in w.variables()]

Luckily there seems to be no breaks in WEO data structure, just a lot of variables missing, as announced by IMF.

Let me know, @KraxelHuber, if any other help is needed.

epogrebnyak commented 4 years ago

Commit above fixes functionality like w.country("DEU")

epogrebnyak commented 4 years ago

Please update version from here or PyPi

epogrebnyak commented 4 years ago

Closing through dd0e405977d4348a63351d78e94dadf162989ed4 and 0.1.2020 release.