When doing the migration, the following need to be taken into consideration:
There are methods and parameters that are decommissioned.
There are differences in the JSON format.
Methods, parameters and elements changes in API Statistics
The table below lists the methods, parameters and elements that are removed in API Statistics:
target | method | |
filterNonGeo | method | |
getRegionalCategorization | method | The "geo_categorical" parameter is used for the UNICODE which won’t be supported anymore. |
getCountryLabel | method | The "country_label" parameter is used for the UNICODE which won’t be supported anymore. |
callBack | method | callBack is replaced by CORS. |
precision | parameter | The "precision" parameter is used for the UNICODE which won’t be supported anymore. |
shortLabel | parameter | |
groupedIndicators | parameter | |
unitLabel | parameter | |
HREF | Response JSON-stat element | Not used. |
The methods and parameters that will be carried on to the API Statistics are:
lastTimePeriod
sinceTimePeriod
untilTimePeriod
geoLevel, can be multiple and available values are:
- aggregate: European aggregates based on a white list - EU15, EU25, EU27_2007, EU27_2019, EU28, EA19, etc.
country: any country code (EU Member States, or EFTA, or Candidate Countries or other countries) - any 2 digits - i.e. FR
nuts1: NUTS code level 1 - any 3 digits - i.e. FR4 (see this page for more information about NUTS classification)
nuts2: NUTS code level 2 - any 4 digits - i.e. FR41 (see this page for more information about NUTS classification)
nuts3: NUTS code level 3 - any 5 digits - i.e. FR413 (see this page for more information about NUTS classification)
- city: code at city level - any 7 digits - i.e. DE_DEL1 (Karlsruhe)
Differences between JSON web service and API Statistics
Differences in TIME_PERIOD values
Difference type | JSON web service | API Statistics | |||
Change in data Time period code | Pattern | Example | Pattern | Example | Comment |
5 years | YYYY | 2019 | YYYY | 2019 | The indicated year is the last one of the 5 years period. |
Year | YYYY | 2019 | YYYY | 2019 | |
Semester | YYYYSN | 2015S1 | YYYY-SN | 2015-S1 | |
Quarter | YYYYQN | 2015Q4 | YYYY-QN | 2015-Q4 | |
Month | YYYYMNN | 2015M02 | YYYY-MM | 2015-02 | |
Week | YYYYWNN | 2020W28 | YYYY-WNN | 2020-W28 | |
Day | YYYYMNNDNN | 2019M06D13 | YYYY-MM-DD | 2015-12-31 |
Differences in fields
The field order:
JSON web service | API Statistics |
1.version 2.label 3.href 4.source 5.updated 6.status 7.extension 8.class 9.value 10.dimension 11.id 12.size | 1.version 2.class 3.label 4.source 5.updated 6.value 7.status 8.id 9.size 10.dimension 11.extension |
“source” property value:
JSON web service | API Statistics |
Eurostat | ESTAT |
“updated” property format:
JSON web service | API Statistics |
YYYY-MM-DD | yyyy-MM-ddTHH:mm:ssZ |
“extension” field:
JSON web service | API Statistics |
"datasetId" property name | “id” property name |
“description” property is present | “description” property is not present |
“subTitle” property is present | “subTitle” property is moved into the section “annotation” – see below. |
“annotation” is not present | “annotation” is present and it contains the following extra fields: DISSEMINATION_OBJECT_TYPE OBS_COUNT OBS_PERIOD_OVERALL_OLDEST OBS_PERIOD_OVERALL_LATEST UPDATE_STRUCTURE UPDATE_DATA SUBTITLE SOURCE_INSTITUTIONS DISSEMINATION_PRESENTATIONS |
Combinations of flags are not present | Combinations of flags are present |
“dimension” field:
JSON web service | API Statistics |
"freq" dimension is not present | "freq" dimension is present |
"label" property contains the dimension code | "label" property contains the dimension title |
“id” field:
JSON web service | API Statistics |
"freq" is not present | "freq" is present |
“size” field:
JSON web service | API Statistics |
"size" field does not include the "freq" dimension | "size" field includes the "freq" dimension |