mdbnomics issueshttps://git.dynare.org/dbnomics/mdbnomics/-/issues2022-08-08T07:36:01Zhttps://git.dynare.org/dbnomics/mdbnomics/-/issues/12Issue encountered when trying to fetch data from IMF/WEO2022-08-08T07:36:01ZMassimo GiovanniniIssue encountered when trying to fetch data from IMF/WEOwhen trying to fecth 'IMF/WEOAGG:2021-04/1.NGDPD.us_dollars', I encountered two issues:
1) relates to the fact that some series in IMF/WEO database begin with scalars as opposed to letters.
2) relates to the fact that some labels in IMF/...when trying to fecth 'IMF/WEOAGG:2021-04/1.NGDPD.us_dollars', I encountered two issues:
1) relates to the fact that some series in IMF/WEO database begin with scalars as opposed to letters.
2) relates to the fact that some labels in IMF/WEO database have "_" as separators and others have "-".
To make mdbnomics work I had to modify fetch_series_by_api_link.m and iter_series_info.m using try/catch/end statements to preserve the original behavior.
For the first problem I force an "A" in the label before the scalar.
For the second, I force a replacement of "-" with a "_".
The quick fixes are as follows.
In fetch_series_by_api_link.m:
line 71 has been replaced by:
try
dimensions_labels_columns_names_dataset{jj} = dataset_dimensions.dimensions_labels.(dataset_dimensions.dimensions_codes_order{jj});
catch
dataset_dimensions.dimensions_codes_order{jj} = regexprep(dataset_dimensions.dimensions_codes_order{jj},'[^a-zA-Z0-9]','_');
dimensions_labels_columns_names_dataset{jj} = dataset_dimensions.dimensions_labels.(dataset_dimensions.dimensions_codes_order{jj});
end
lines 120-123 have been replaced by:
try
series_code = regexprep(flat_series.series_code,'[^a-zA-Z0-9]','_');
dimension_label = dataset_dimensions_labels.(dimension_codes{jj});
flat_series.labels{jj, 1} = dimension_label;
dimension_value_code = regexprep(series_dims_by_dataset_code.(complete_dataset_code).(series_code).(dimension_codes{jj}),'[^a-zA-Z0-9]','_');
catch
% Avoid structure fieldnames to start with scalars (Massimo)
series_code_temp = regexprep(series_code(1),'[0-9]','A');
series_code = [series_code_temp series_code];
dimension_label = dataset_dimensions_labels.(dimension_codes{jj});
flat_series.labels{jj, 1} = dimension_label;
dimension_value_code = regexprep(series_dims_by_dataset_code.(complete_dataset_code).(series_code).(dimension_codes{jj}),'[^a-zA-Z0-9]','_');
end
In iter_series_info.m:
line 86 has been replaced by:
try
series_dims_by_dataset_code.(complete_dataset_code).(series_code) = series.dimensions;
catch
% Avoid structure fieldnames to start with scalars (Massimo)
series_code_temp = regexprep(series_code(1),'[0-9]','A');
series_code = [series_code_temp series_code];
series_dims_by_dataset_code.(complete_dataset_code).(series_code) = series.dimensions;
endhttps://git.dynare.org/dbnomics/mdbnomics/-/issues/11MATLAB certificate problem with webread2022-05-13T11:50:58ZMassimo GiovanniniMATLAB certificate problem with webreadWhen I try to use Mdbnomics I receive the following error message:
'Could not establish a secure connection to "api.db.nomics.world". The reason is "error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed". Che...When I try to use Mdbnomics I receive the following error message:
'Could not establish a secure connection to "api.db.nomics.world". The reason is "error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed". Check your certificate file (C:\Program Files\MATLAB\R2019a\sys\certificates\ca\rootcerts.pem) for expired, missing or invalid certificates.'
To circumvent the problem I added to the file ‘fetch_series_page.m’ which is in ‘mdbnomics-master\src\utils’ below row 39 [options = weboptions('ContentType','json');] the following instruction:
options.CertificateFilename=('');
This occurred both on Windows 10 and MacOS machines respectively with MATLAB2019a and MATLAB2017b.https://git.dynare.org/dbnomics/mdbnomics/-/issues/10Add Octave support2022-10-14T07:56:21ZSébastien VillemotAdd Octave supportCurrently, mdbnomics only works with MATLAB. The main reason is that it requires the `webread` and `webwrite` functions to access the RESTful interface of DBnomics. Those versions are not available in Octave 5 and before.
They should be...Currently, mdbnomics only works with MATLAB. The main reason is that it requires the `webread` and `webwrite` functions to access the RESTful interface of DBnomics. Those versions are not available in Octave 5 and before.
They should be incorporated in the upcoming Octave 6. However, the following bugs may complicate things:
- https://savannah.gnu.org/bugs/?func=detailitem&item_id=56624
- https://savannah.gnu.org/bugs/?func=detailitem&item_id=58217