Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mdbnomics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DBnomics
mdbnomics
Commits
88bb9f55
Commit
88bb9f55
authored
5 years ago
by
Dóra Kocsis
Browse files
Options
Downloads
Patches
Plain Diff
add modified test script
parent
078577a2
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test.m
+30
-5
30 additions, 5 deletions
test.m
with
30 additions
and
5 deletions
test.m
+
30
−
5
View file @
88bb9f55
% 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"]}}'
);
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment