An error occured. Details Hide
You have unsaved pages. Restore Cancel

Get Data (filtered)

This endpoint returns observation data for the list of combination of TimeseriesKey and DatasetId provided in the post request with respect to StartDate, EndDate and Frequency provided.
 
Input: Input is a list of datasetId and timeseries key.
Name  Type  Description 
TimeSeries TimeseriesDescriptor  The TimeseriesDescriptor contains 
  1. datasetIds : Unique datasetId
  2. TimeseriesKeys : Timeseies key
StartDate Date  Timeseries start date
Enddate Date  Timeseries end date
Frequency Char  Frequency of Data required( A= Annual ;S=SemiAnnually; Q=Quarterly; W=Weekly; D=Daily)
CustomFields Bool  Includes additional dimensional metadata associated with each dimension as part of output 

 Result 

Array of Observation Data

Name  Type  Description 
dataset String  Unique identifier for a dataset
id Int  Timeseries key 
metadata Array[DimensionalDetails]  List of Dimension details. 
Consist of 
  • dim:Dimension id
  • key: Dimension member key(The dimension member key associated with this timeseries)
  • name: Dimension member name.
  • RegionId: Region code for the member of geographical dimension
startDate Date  First Observation value's date.
endDate Date  Most recent observation value's date.
scaleValue Int  The default scale value. "data" needs to be multiplied by this value to obtain absolute observation data value.
unit String  Unit of output data 
frequency Char  Denotes the frequency of data available. 
Frequency of data can be of the following types 
  1. annual
  2. semiannual
  3. quarterly
  4. monthly 
  5. weekly   
  6. daily
data Array[double]  Observation values with the first value corresponding to the startdate and the last value corresponding to endDate.
null values can be present and correspond to missing data.

Example:

Post: http://knoema.com/api/1.0/data/get
 
{
   "Timeseries": [
      {
         "TimeseriesKey": 1000000,
         "DatasetId": "CDIACTACHIINDUSAA"
      },
      {
         "TimeseriesKey": 1000020,
         "DatasetId": "CDIACTACHIINDUSAA"
      }
   ],
   "StartDate": "01/01/1991",
   "EndDate": "01/01/2008",
   "Frequency": "A",
   "CustomFields": true
}
 
Output:
 
[
 
    {
        "dataset": "CDIACTACHIINDUSAA",
        "id": 1000000,
        "metadata": [
            {
                "dim": "Location",
                "key": 1000000,
                "name": "China",
                "RegionId": "CN"
            },
            {
                "dim": "Variable",
                "key": 1000000,
                "name": "anomalies",
                "Definition": null
            }
        ],
        "startDate": "Tue, 01 Jan 1991 00:00:00 GMT",
        "endDate": "Thu, 01 Jan 1998 00:00:00 GMT",
        "scaleValue": 1,
        "unit": "deg C",
        "frequency": "annual",
        "data": [
            0.61,
            0.28,
            0.25,
            0.92,
            0.74,
            0.31,
            1,
            1.21
        ]
    },
    {
        "dataset": "CDIACTACHIINDUSAA",
        "id": 1000020,
        "metadata": [
            {
                "dim": "Location",
                "key": 1000010,
                "name": "India",
                "RegionId": "IN"
            },
            {
                "dim": "Variable",
                "key": 1000010,
                "name": "smoothed anomalies",
                "Definition": null
            }
        ],
        "startDate": "Tue, 01 Jan 1991 00:00:00 GMT",
        "endDate": "Thu, 01 Jan 1998 00:00:00 GMT",
        "scaleValue": 1,
        "unit": "deg C",
        "frequency": "annual",
        "data": [
            0.26,
            0.27,
            0.29,
            0.3,
            0.31,
            0.33,
            0.37,
            0.31
        ]
    }
 
]