Closed jyalpert closed 4 years ago
Yes, you can use getOECDJSONStructure
function in CIF.
For example, get the structure of OECD Main Economic Indicators database:
from cif import cif
cif.getOECDJSONStructure(dsname = 'MEI')
# returns:
# Structure: LOCATION, SUBJECT, MEASURE, FREQUENCY, TIME_PERIOD
or structure of OECD MEI Archive with historical values of selected MEI indicators:
cif.getOECDJSONStructure(dsname = 'MEI_archive')
# returns:
# Structure: LOCATION, VAR, EDI, FREQUENCY, TIME_PERIOD
To get all the possible values of MEI database LOCATION use parameter showValues
:
cif.getOECDJSONStructure(dsname = 'MEI', showValues = [0])
# returns:
# LOCATION values:
# {'id': 'AUS', 'name': 'Australia'}
# {'id': 'AUT', 'name': 'Austria'}
# {'id': 'BEL', 'name': 'Belgium'}
# {'id': 'CAN', 'name': 'Canada'}
# etc.
or for all the possible values of MEI database MEASURE:
cif.getOECDJSONStructure(dsname = 'MEI', showValues = [2])
# returns:
# MEASURE values:
# {'id': 'ST', 'name': 'Level, rate or national currency'}
# {'id': 'MEI', 'name': 'Main Economic Indicators'}
# {'id': 'STSA', 'name': 'Level, rate or national currency, s.a.'}
# {'id': 'IXEB', 'name': 'Index Eurostat base'}
# etc.
The list of OECD databases with API access: https://data.oecd.org/searchresults/?hf=20&b=0&r=f%2Ftype%2Fdatasets%2Fapi+access&r=%2Bf%2Ftype%2Fdatasets%2Fapi+access&l=en&s=score
I am using this CIF package to retrieve data from OECD.stat, but cannot find any data dictionary listing the available dsname, subject, and measures. Is this available anywhere, or is it possible to at least retrieve a list of the possible values? Thanks