Data model

Useful links:

Entities

DBnomics data model is defined by the following entities:

provider -(has many)-> dataset -(has many)-> time series

Provider

  • code: to have an URL well defined, a provider MUST have a code (example)

Dataset

  • code: to have an URL well defined, a dataset MUST have a code (example)

Series

  • code: to have an URL well defined, a series MUST have a code (example)
  • name: SHOULD be unique

TODO: if I generate a series code from a name, what characters are valid?

Duplicate series names

Some providers give the same names to many series. DBnomics data model accepts duplicate series names, even if it's not recommended.

The user will be able to distinguish those time series with the same name by looking at their code or dimensions.

Remind that one of DBnomics features is to redistribute provider data as-is. This situation would have been the same by accessing data from the provider website.

However the data validation script displays an error if run in developer mode.

Missing series codes

Some providers distribute time series with arbitrary codes (e.g. AMECO/UING/AUT.1.0.0.0.UING), whereas some other don't give codes to series, but dimensions (e.g. {"FREQ": "A", "REF_AREA": "FR"}). In the latter case, as the series code is a hard constraint, it has to be generated from the dimensions (e.g. A.FR).

Dimensions

Ideally, giving a value to all the dimensions of a dataset should return a unique time series. But sometimes, due to errors in provider data or because of modelization choices from providers, they distribute datasets with more than one time series per dimension set.

For example, this search by dimension where every dimension has a value selected, matches 3 time series (see also API link).

TODO: if I generate a dimension code from a label, what characters are valid?