Commit 88bb9f55 authored by Dóra Kocsis's avatar Dóra Kocsis

add modified test script

parent 078577a2
% https://api.db.nomics.world/v22/series/AFDB/bbkawjf/AFDB_CPIA_EM_DB_S.BDI?observations=1
%[d, dd] = get_series('AFDB','bbkawjf','AFDB_CPIA_EM_DB_S.BDI')
%disp(d)
%disp(dd)
[d, dd] = get_dataset('AMECO','UVGD');
% fetch series by provider code and dataset code
df = fetch_series('provider_code', "AMECO", 'dataset_code', "UVGD", 'max_nb_series', 500);
% fetch one series by ID
df_id = fetch_series('series_ids',"AMECO/ZUTN/EA19.1.0.0.0.ZUTN");
% fetch multiple series by ID
df_ids = fetch_series('series_ids', ["AMECO/ZUTN/EA19.1.0.0.0.ZUTN", "AMECO/ZUTN/DNK.1.0.0.0.ZUTN"]);
% fetch many series by ID from different datasets
df_ids_sets = fetch_series('series_ids', ["AMECO/ZUTN/EA19.1.0.0.0.ZUTN", "AMECO/ZUTN/DNK.1.0.0.0.ZUTN", "IMF/CPI/A.AT.PCPIT_IX"]);
% fetch time series by code mask
df_code_mask1 = fetch_series('provider_code', "IMF", 'dataset_code', "CPI", 'series_code', "M.FR+DE.PCPIEC_IX+PCPIA_IX");
df_code_mask2 = fetch_series('provider_code', "IMF", 'dataset_code', "CPI", 'series_code', ".FR.PCPIEC_WT");
% df_code_mask3 = fetch_series('provider_code', "IMF", 'dataset_code', "CPI", 'series_code', "M..PCPIEC_IX+PCPIA_IX", 'max_nb_series', 400);
% fetch series by dimensions
% dimensions=struct("geo", "dnk");
df_dim = fetch_series('provider_code',"AMECO", 'dataset_code', "ZUTN", 'dimensions', '{"geo":["dnk"]}');
df_dims = fetch_series('provider_code',"WB",'dataset_code',"DB", 'dimensions', '{"country":["ES","FR","IT"],"indicator":["IC.REG.COST.PC.FE.ZS.DRFN"]}');
% fetch series by api link
df_link = fetch_series_by_api_link("https://api.db.nomics.world/v22/series/WB/DB?observations=1&dimensions=%7B%22country%22%3A%5B%22FR%22%2C%22IT%22%2C%22ES%22%5D%2C%22indicator%22%3A%5B%22IC.REG.COST.PC.FE.ZS.DRFN%22%5D%7D");
% fetch series from the cart
df_cart = fetch_series_by_api_link("https://api.db.nomics.world/v22/series?series_ids=AMECO%2FZUTN%2FEA19.1.0.0.0.ZUTN&observations=1");
% fetch multi frequency series
df_multi_freq = fetch_series('series_ids', ["BEA/NIUnderlyingDetail-U001BC/S315-A",...
"BEA/NIUnderlyingDetail-U001BC/S315-Q",...
"BEA/NIUnderlyingDetail-U001BC/S315-M"]);
%% TO BE IMPLEMENTED
% fetch one series and apply interpolation filter %NOT IMPLEMENTED
df_filter = fetch_series('series_ids', "AMECO/ZUTN/EA19.1.0.0.0.ZUTN",...
'dbnomics_filters', '{"code":["interpolate"], "parameters": {"frequency": ["monthly"], "method": ["spline"]}}');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment