Quick start

The purpose of the DBnomics project is to provide a unique website accessible for all users, allowing them to free download public economic data as released by national producers (national institutes of statistics, central banks) as well as international ones (IMF, World Bank, OECD, Eurostat, ECB…).

DBnomics goals:

  • aggregate data from many providers
  • organized in multi-dimensional datasets of time series
  • harmonize metadata
  • convert data formats (e.g. period)
  • keep category tree from provider
  • orchestrate jobs to download and convert data
  • allow users to query data by full-text search and by dimension
  • archive each revision of data

DBnomics non-goals:

  • modify providers data: DBnomics does not interpret or harmonize observations of a time series
  • create advanced data visualizations: there are lots of better tools outside
  • provide an environment to work with data: instead, let's ease accessing data from programs and notebooks

Data can be accessed via the website or from several programming languages.

DBnomics website

DBnomics website allows users to search and browse data.

The home page of DBnomics allows to search for datasets in the whole database. The search is not restricted to a specific provider.

Here are the search results for gdp france:

List of providers

DBnomics aggregates many data providers, the full list is available here.

Provider page

The datasets of a specific provider can be found on a provider page (e.g. OECD).

Those datasets are often organized by the provider in a category tree, and DBnomics keeps it.

Dataset page

Datasets contains time series, each having dimensions, and the dataset page allows the user to dig into them using faceted search.

Faceted search is a search pattern commonly used on e-commerce websites to find products by criteria like size, weight, color, etc.

On the dataset page it is also possible to do a full-text search, restricted to time series belonging to the current dataset, as opposed to the search of the home page which targets the whole database.

Here is the dataset EXR from ECB, with the dimension "Frequency" fixed to the value "Annual". We see that the dataset has a total of 3,632 time series, and 1,248 match the search criteria:

Time series page

Each time series has its own URL, allowing to display it as a chart or a table, and easing referencing.

Here is the page of the time series ECB/EXR/A.ARS.EUR.SP00.A:

Programming languages

Data can be accessed from programming languages.

DBnomics core team provide packages for Python and R.

DBnomics Community provide packages for Julia, Stata. Also, there is a plugin for Gretl, Gnu Regression, Econometrics and Time-series Library.

Internally those modules call DBnomics Web API and transform data to idiomatic data types like dataframes.

Python

A tutorial is available as a Jupyter notebook.

Quick start (using Python 3 venv):

python3 -m venv test-dbnomics-python
source test-dbnomics-python/bin/activate
pip install dbnomics ipython
ipython

# In ipython:

In [1]: import dbnomics
In [2]: df = dbnomics.fetch_series('OECD', 'MEI', 'USA.B6BLTT01.CXCUSA.Q')
In [3]: df
Out[3]:
    @frequency provider_code dataset_code  ...                                            Subject                                           Measure  Frequency
0    quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly
1    quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly
2    quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly
3    quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly
4    quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly
..         ...           ...          ...  ...                                                ...                                               ...        ...
235  quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly
236  quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly
237  quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly
238  quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly
239  quarterly          OECD          MEI  ...  Balance of payments BPM6 > Current account Bal...  US Dollars, sum over component sub-periods, s.a.  Quarterly

[240 rows x 18 columns]

From here you get the time series OECD/MEI/USA.B6BLTT01.CXCUSA.Q in the DataFrame df.

Contributing

If you're using a programming language that is not already supported, please tell us about it! You can call the Web API directly from your program to access data. However you can also quite easily contribute by writing a new package, allowing others to retrieve data from DBnomics from that language, and helping DBnomics Community to grow!