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

Dimension details (filtered)

Lists out the given dataset's dimension details. 

Input: Required on both GET and POST requests

Name Type Description
DatasetId String Unique identifier for dataset.
DimensionId String Unique Identifier for dimension.

Input: POST

All Dimension members will be listed out. The post can be used when advanced filters are required to determine whether observation data is present between a given date range and for a list of frequencies. The date filters (i.e start date,end date) will set the HasData flag depending on whether or not data is present for the given condition.

If start date and end date is not given data from all time ranges will be considered. By default if not frequency is given, all frequencies will be considered.

Name Type  Description 
Dimensions Array[DimensionFilter]  List of dimensions to be filtered on. This field is the same as the above mentioned simple request. 
DimensionFilter contains 
  1. DimensionId: Unique dimension id.
  2. Members: It is an array of integers which contain dimension member keys.
StartDate Date  StartDate of observation values(only changes HasData field to false. It provides all data as output)
EndDate Date  EndDate of observation values(only changes HasData field to false. It provides all data as output)
Frequency Array[char]  Array of required Frequencies. values can be 'A' -Annual ,'Q' -Quarterly, 'M' -Monthly ,'W' -Weekly
 

Result:

The Result contains all dimension details.

Name  Type  Description 
Key  Int  Dimension key 
Id  String  Unique dimension code 
Name  String  Dimension name 
Description  String  Dimension details 
isGeo bool Specifies whether geographical dimension
datasetId string Unique identifier for the dataset
datasetType string Enumerator specifies whether dataset is type of 0 - "Reguler",  1 - "Virtual" and 2 - "Flat"
fields string

List of Dimension metadata fields
1. Key: key of metadat
2. Name: Name of metadata
3. Type: Type of metadata can be of
Boolean=0,
Integer=1,
Float=2,
Double=3,
DateTime=4,
Char=5,
String =6

Members  DimensionMember  List of members in the dimension(Contains all members).The data is ordered according to hierarchy first and then by name. 
eg:world data with level 0 will be followed by asia data at level 1. India will be listed next with level as 2. 
Europe is listed next with level 1 so on. 
Each DimensionMember contains : 
  1. Key: Key of the dimension member .
  2. Name: Dimension member name.
  3. Level: Level of the member in the Heirarchy.
  4. HasData: Indicates whether or not Timeseries data is present for this dimension member.
Groups  DimensionGroup  List of dimension groups present for the respective dimension member. 
  1. Key: Dimensiongroup unique Key.
  2. Name: Dimension group name.
 
GET: http://knoema.com/api/1.0/meta/dataset/CDIACTACHIINDUSAA/dimension/Location
{
   "key": 1002900,
   "id": "Location",
   "name": "Location",
   "description": "",
   "isGeo": true,
   "datasetId": "CDIACTACHIINDUSAA",
   "datasetType": 0,
   "fields": [
      {
         "key": 1007110,
         "name": "RegionId",
         "type": 6
      }
   ],
   "items": [
      {
         "key": 1000000,
         "name": "Asia",
         "level": 0,
         "hasData": true,
         "fields": {
            "regionId": "CN"
         }
      },
      {
         "key": 1000010,
         "name": "India",
         "level": 1,
         "hasData": true,
         "fields": {
            "regionId": "IN"
         }
      }
   ],
   "groups": []
}
  
Post: http://knoema.com/api/1.0/meta/dataset/CDIACTACHIINDUSAA/dimension/Location
 
{
    DimensionRequest: [
        {
            DimensionId: "Location",
            Members: [
                1000020,
                1000030
            ]
        },
        {
            DimensionId: "Variable",
            Members: [
                1000000,
                1000010
            ]
        }
    ],
 Frequency: [
        "A",
        "Q",
        "M",
        "W"
    ],
    StartDate: "01/01/2000",
    EndDate: "01/01/2010"
}
  
{
   "key": 1002910,
   "id": "Variable",
   "name": "Variable",
   "description": "",
   "isGeo": false,
   "datasetId": "CDIACTACHIINDUSAA",
   "datasetType": 0,
   "fields": [
      {
         "key": 1004760,
         "name": "Definition",
         "type": 6
      }
   ],
   "items": [
      {
         "key": 1000000,
         "name": "anomalies",
         "level": 0,
         "hasData": false,
         "fields": {}
      },
      {
         "key": 1000010,
         "name": "smoothed anomalies",
         "level": 0,
         "hasData": false,
         "fields": {}
      },
      {
         "key": 1000020,
         "name": "Annual mean temperature for the entire period of record",
         "level": 0,
         "hasData": false,
         "fields": {
            "definition": "If the amt is added to anomalies or smoothed anomalies the actual annual temperature foreach year can be calculated."
         }
      }
   ],
   "groups": []
}