Difference between revisions of "Fusion-CSV-TS"

From Fusion Registry Wiki
Jump to navigation Jump to search
(Parameters)
(Overview)
Line 23: Line 23:
 
The Dimension in the columns is controlled using the '''dimensionAtObservation''' REST query parameter, defaulting to Time if not provided.
 
The Dimension in the columns is controlled using the '''dimensionAtObservation''' REST query parameter, defaulting to Time if not provided.
  
<b>Note:</b> The Fusion-CSV-TS Data format does not output observation Attributes, but it does output series attributes.  Series Attributes are determined by the Attribute Attachement level as defined in the Data Structure Definition (DSD)If the DSD defines an Attribute as varying with FREQ and REF_AREA, then this Attribute will be output unless either REF_AREA or FREQ are output as the Dimension at observation.
+
Fusion-CSV-TS can be used as an export format for the Fusion Registry, and an export format for the Fusion Edge Server and Fusion Data BrowserFusion-CSV-TS can not be used as a data import format.
  
Fusion-CSV-TS can be used as an export format for the Fusion Registry, and an export format for the Fusion Edge Server and Fusion Data BrowserFusion-CSV-TS can not be used as a data import format.
+
'''Attributes'''
 +
<b>Note:</b> The Fusion-CSV-TS Data format does not output observation or dataset Attributes, but it does output series Attributes.  Series Attributes are determined by the Attribute Attachement level as defined in the Data Structure Definition (DSD)If the DSD defines an Attribute as varying with FREQ and REF_AREA, then this Attribute will be output unless either REF_AREA or FREQ are output as the Dimension at observation.
  
 
=Parameters=
 
=Parameters=

Revision as of 03:50, 22 October 2020

Overview

The Fusion-CSV-TS Data format predated SDMX-CSV and is not an official SDMX format. The format differs from both SDMX-CSV and Fusion-CSV as it does not output an observation per row, instead it outputs a Series per row with one output Dimension across the column.

The TS in the format name stands for Time Series, as the format originally output the series in the rows with time periods in the columns. However Fusion Registry v10.4.0 and higher support any dimension to be output across the columns, not just Time.

Example: Time Series

REF_AREA, INDICATOR, SUB_INDICATOR, FREQ, 2008, 2009, 2010
GHA,      GCI,       RANK,          A,    102,  114,  114
GHA,      GCI,       VALUE,         A,    3.6,  3.4,  3.5


Example - By SUB_INDICATOR

REF_AREA, INDICATOR,  FREQ, TIME_PERIOD, RANK, VALUE
GHA,      GCI,        A,    2008,        102,  3.6      
GHA,      GCI,        A,    2009,        114,  3.4       
GHA,      GCI,        A,    2010,        114,  3.5       

The Dimension in the columns is controlled using the dimensionAtObservation REST query parameter, defaulting to Time if not provided.

Fusion-CSV-TS can be used as an export format for the Fusion Registry, and an export format for the Fusion Edge Server and Fusion Data Browser. Fusion-CSV-TS can not be used as a data import format.

Attributes Note: The Fusion-CSV-TS Data format does not output observation or dataset Attributes, but it does output series Attributes. Series Attributes are determined by the Attribute Attachement level as defined in the Data Structure Definition (DSD). If the DSD defines an Attribute as varying with FREQ and REF_AREA, then this Attribute will be output unless either REF_AREA or FREQ are output as the Dimension at observation.

Parameters

The following URL parameters can be used in a RESTful query for Fusion-CSV-TS data.

  • format =csv-ts
  • delimiter =comma | tab | semicolon | space (comma is default)
  • labels = id | name | both (id is default)
  • dimensionAtObservation = ID of Dimension default if not provided is TIME_PERIOD
  • bom = include | exclude (Include or Exclude the Byte Order Mark (BOM).
    The BOM helps Excel interpret non Latin characters when opening a CSV file)

Examples Breakdown by Time Series: https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=csv-ts&labels=both&delimiter=tab
Breakdown by Sub Indicator https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=csv-ts&labels=both&dimensionAtObservation=SUB_INDICATOR

Example Output

An example query using the format request parameters, HTTP Accept Headers can also be used to define the same format.
https://demo.metadatatechnology.com/FusionRegistry/ws/public/sdmxapi/rest/data/WB,GCI,1.0/GHA.GCI..?format=csv-ts&labels=both


An example dataset with IDs only, spaces have been added to this example to assist readability.

REF_AREA, INDICATOR, SUB_INDICATOR, FREQ, 2008, 2009, 2010
GHA,      GCI,       RANK,          A,    102,  114,  114
GHA,      GCI,       VALUE,         A,    3.6,  3.4,  3.5

The same dataset in Fusion-CSV with lables included. Note, labels columns are only included if the Dimension, Attribute, or Measure is Coded, if it is not, then only one column is output - this can be seen in the table below where both TIME_PERIOD and OBS_VALUE are only single columns.

REF_AREA, Reference Area, INDICATOR, Indicator,                    SUB_INDICATOR, Sub Indicator, FREQ, Frequency, 2008, 2009, 2010
GHA,      Ghana,          GCI,       Global Competitiveness Index, RANK,          Rank           A,    Annual,    102,  114,  114
GHA,      Ghana,          GCI,       Global Competitiveness Index, VALUE,         Value          A,    Annual,    3.6,  3.4,  3.5