mdbnomics issueshttps://git.dynare.org/dbnomics/mdbnomics/-/issues2020-12-14T10:24:19Zhttps://git.dynare.org/dbnomics/mdbnomics/-/issues/5General cleanup: copyright, license, Readme.md2020-12-14T10:24:19ZHoutan BastaniGeneral cleanup: copyright, license, Readme.mdCopyright: `Copyright (C) 2020 Dynare Team`
License text: Include license text at the top of the file, similar to what you see in Dynare files
Include https://git.dynare.org/Dynare/dynare/-/blob/master/COPYING in the root directory
Cr...Copyright: `Copyright (C) 2020 Dynare Team`
License text: Include license text at the top of the file, similar to what you see in Dynare files
Include https://git.dynare.org/Dynare/dynare/-/blob/master/COPYING in the root directory
Create Readme.md describing what the software does and how to use it (what directory to add to the path, what software it depends on, ...)https://git.dynare.org/dbnomics/mdbnomics/-/issues/4Convert source code into MATLAB class2020-06-04T13:02:07ZDóra Kocsiskocsis.doralinda@gmail.comConvert source code into MATLAB class0.1https://git.dynare.org/dbnomics/mdbnomics/-/issues/7fetch_series_by_api_link.m2020-04-06T11:08:28ZHoutan Bastanifetch_series_by_api_link.m- document better in header (what goes in `varargin`)
- line 21: if `series_list` is empty, set `df={};` then `return`. Otherwise the rest of the code is indented as you have it now...
- line 30: `length(dataset_codes)`
- example in head...- document better in header (what goes in `varargin`)
- line 21: if `series_list` is empty, set `df={};` then `return`. Otherwise the rest of the code is indented as you have it now...
- line 30: `length(dataset_codes)`
- example in header doesn't work: `fetch_series_by_api_link("https://api.db.nomics.world/v22/series?provider_code=AMECO&dataset_code=ZUTN")`
- this function is very slow. It took 10 seconds to run `fetch_series_by_api_link("https://api.db.nomics.world/v22/series/BIS/long_pp?limit=1000&offset=0&q=&observations=1&align_periods=1&dimensions=%7B%7D")` on my computer. It seems like the bulk of the time is spent in the loop starting on line 109. On first look, you don't need to go through this cell by cell, rather column by column, avoiding the inner loop. You should also be able to assign the first row in one line as `ordered_columns_names` will be a cell array of strings once #8 is done, removing the loop on lines 56-60. You may want to initialize `df` to `NaN` as well.... anyway, we'll review all of this once #8 is done.https://git.dynare.org/dbnomics/mdbnomics/-/issues/9set up GitLab pipeline2020-04-06T11:04:44ZDóra Kocsiskocsis.doralinda@gmail.comset up GitLab pipeline* [x] Makefile.txt
* [x] gitlab-ci.yml* [x] Makefile.txt
* [x] gitlab-ci.yml2020-03-31https://git.dynare.org/dbnomics/mdbnomics/-/issues/3Add unit tests2020-04-01T13:18:09ZDóra Kocsiskocsis.doralinda@gmail.comAdd unit tests* [x] `test_fetch_series_by_code`
* [x] `test_fetch_series_by_code_mask`
* [x] `test_fetch_series_by_code_mask_with_plus_in_dimension_code`
* [x] `test_fetch_series_by_id`
* [x] `test_fetch_series_by_ids_in_same_dataset`
* [x] `tes...* [x] `test_fetch_series_by_code`
* [x] `test_fetch_series_by_code_mask`
* [x] `test_fetch_series_by_code_mask_with_plus_in_dimension_code`
* [x] `test_fetch_series_by_id`
* [x] `test_fetch_series_by_ids_in_same_dataset`
* [x] `test_fetch_series_by_ids_in_different_datasets`
* [x] `test_fetch_series_by_dimension`
* [x] `test_fetch_series_of_dataset`
* [x] `test_fetch_series_by_api_link`
* [x] `test_fetch_series_with_na_values`
* [x] `test_fetch_series_with_max_nb_series`
* [x] `test_fetch_series_with_filter_on_one_series`
* [x] `test_fetch_series_with_filter_on_one_series_with_filter_error`
(Source: test suite of the Python client (https://git.nomics.world/dbnomics/dbnomics-python-client/blob/master/tests/test_client.py))0.1https://git.dynare.org/dbnomics/mdbnomics/-/issues/8remove all double quotes and string arrays from code for backward compatibility2020-03-30T16:00:34ZHoutan Bastaniremove all double quotes and string arrays from code for backward compatibilityDouble quotes were introduced in R2017a
String arrays were introduced in R2016b
https://www.mathworks.com/help/matlab/ref/string.htmlDouble quotes were introduced in R2017a
String arrays were introduced in R2016b
https://www.mathworks.com/help/matlab/ref/string.htmlhttps://git.dynare.org/dbnomics/mdbnomics/-/issues/6fetch_series.m2020-03-27T16:58:07ZHoutan Bastanifetch_series.mClarify documentation:
- replace `strjoin` as it's only supported in R2013a and later
- The phrasing "If not `None`, ..." implies that `key` is required and that you must pass `'key', 'None'` to turn it off.
- It would be useful to have ...Clarify documentation:
- replace `strjoin` as it's only supported in R2013a and later
- The phrasing "If not `None`, ..." implies that `key` is required and that you must pass `'key', 'None'` to turn it off.
- It would be useful to have a list of keys, clearly describing what they are for and what values they accept. The form this takes is up to you, it should just be done clearly. It would also be useful to know which keys are required, which are optional, and which are required when another key is passed. Keep in mind how this displays when you type `help fetch_series` at the MATLAB command.
- if `dimensions` is not a `function_handle` and `series_code` is provided, `series_code` takes precedence over `dimensions`. Is this desired? Should an error be thrown if both of these are passed to make it explicit to the user?
- These two examples from the header don't work:
- `fetch_series('provider_code', "IMF", 'dataset_code', "CPI", 'series_code', "M..PCPIEC_IX+PCPIA_IX")`
- `fetch_series('provider_code', "AMECO", 'dataset_code', "ZUTN", dimensions={"geo": ["dnk"]})`https://git.dynare.org/dbnomics/mdbnomics/-/issues/2Functionality2020-03-25T16:51:47ZDóra Kocsiskocsis.doralinda@gmail.comFunctionality**OUTPUT**
Final MATLAB output will be a cell array with unstacked values over the queried period keeping the following information intact:
- `@frequency`
- `provider_code`
- `dataset_code`
- `dataset_name`
- `series_code`
- `series_na...**OUTPUT**
Final MATLAB output will be a cell array with unstacked values over the queried period keeping the following information intact:
- `@frequency`
- `provider_code`
- `dataset_code`
- `dataset_name`
- `series_code`
- `series_name`
- `original_period`: the period as returned by DBnomics
- `period` (`pd.Timestamp`): the first day of `original_period`
- `original_value` (`str` or `float`): the observation value as returned by DBnomics, where not available values are represented by `"NA"`
- `value` (`float` or `NaN`): the observation value as returned by DBnomics, where not available values are represented by `NaN`
Followed by dimensions columns, corresponding to the dimensions of the dataset:
- *dimensions labels* (eg:`freq`, `unit`, `geo`)
- then *dimensions values labels* (eg: `Frequency`, `Unit`, `Country`)
**FUNCTIONS**
Keeping the original functionality of the R, Python plug-ins, the following functions are necessary:
* [x] Fetch time series:
* [x] by ids
- one series,
- multiple series from same dataset,
- multiple series from different datasets of different providers
* [x] by mask (`CompatibleProviders = {"BIS", "ECB", "Eurostat", "FED", "IMF", "IMF-WEO", "INSEE", "OECD", "WTO"}`)
- one series,
- multiple series from same dataset,
- all series along one dimension from the same dataset
- all series along multiple dimensions from the same dataset
* [x] by dimensions (same dataset)
- one series of one dimension,
- multiple series of one dimension,
- multiple series of multiple dimensions,
* [x] Fetch series by api link (from the website/cart)
* [x] Transform time series with filters
- https://editor.nomics.world/filters
- Note: array fields should change when filters are used
- `period_middle_day`: the middle day of `original_period` (can be useful when you compare graphically interpolated series and original ones)
- `filtered` (`bool`): `True` if the series is filtered
- `series_code`: same as before for original series, but the suffix `_filtered` is added for filtered series
- `series_name`: same as before for original series, but the suffix `(filtered)` is added for filtered series0.1