Skip to content

SDMX-JSON (item)

Note

This page is automatically generated from the source code, and is a bit rough. If you have trouble, check the source code for this type or post a message to the forum.

A CatalogItem representing region-mapped data obtained from SDMX-JSON format.

Descriptions of this format are available at: - https://data.oecd.org/api/sdmx-json-documentation/ - https://github.com/sdmx-twg/sdmx-json/tree/master/data-message/docs - https://sdmx.org/ - http://stats.oecd.org/sdmx-json/ (hosts a handy query builder)

The URL can be of two types, eg: 1. http://example.com/sdmx-json/data/DATASETID/BD1+BD2.LGA.1+2.A/all?startTime=2013&endTime=2013 2. http://example.com/sdmx-json/data/DATASETID

For #2, the dimension names and codes come from (in json format): http://example.com/sdmx-json/dataflow/DATASETID

Initialization File properties:

"type": "sdmx-json"

aggregatedDimensionIds

An array of dimension ids whose values should not be shown in the Now Viewing panel; instead, their values should be aggregated and treated as a single value. Eg. useful if a dimension is repeated (eg. STATE and REGION). NOTE: Currently only a single aggregatedDimensionId is supported. This should not be applied to regions or time periods.

blacklist

Gets or sets each dimension's non-allowed values, by id. Eg. {"COB": ["TOTAL", "1"], "FREQUENCY": ["Q"]}. If not defined, all values are allowed (subject to the whitelist). If a dimension is not present, all values for that dimension are allowed (subject to the whitelist). Note this will not be applied to regions or time periods. If the same value is in both the whitelist and the blacklist, the blacklist wins. The expression is first matched as a regular expression (sandwiched between ^ and &); if that fails, it is matched as a literal string. So eg. "[0-9]+" will match 015 but not A015.

cacheDuration

The cache duration to use for proxied URLs for this catalog member. If undefined, proxied URLs are effectively cachable forever. The duration is expressed as a Varnish-like duration string, such as '1d' (one day) or '10000s' (ten thousand seconds).

canDisplayPercent

Gets or sets whether this item can show percentages instead of raw values. This is set to true automatically if total value ids are available on all necessary columns.

cannotDisplayPercentMap

Deprecated. Use cannotSum instead. Defaults to none.

cannotSum

A mapping of concept ids to arrays of values which, if selected, mean the results cannot be summed. If one of these values is chosen: - Does not show the "canDisplayPercent" option. - Explains to the user that it can't show multiple values of concepts. eg. {"MEASURE": ["rate"]}. Can also be the boolean "true", if it should apply to all selections. Defaults to none.

cleanFootnotes

Gets or sets whether to remove trailing "(x)"s from the values that appear in the SDMX-JSON response. If true, for example, "Total responses(c)" would be replaced with "Total responses". This is a workaround for an ABS-specific issue. Default false.

customProperties

The dictionary of custom item properties.

data

The data, represented as a binary Blob, a string, or a Promise for one of those things. If this property is set, CatalogItem's url is ignored.

dataCustodian

A description of the custodian of this data item. This property is an HTML string that must be sanitized before display to the user.

dataSourceUrl

The URL from which the TableCatalogItem's data was obtained. This is informational; it is not used. This propery is observable.

dataUrl

The URL from which this data item's raw data can be retrieved, or undefined if raw data for this data item is not available.

dataUrlComponent

The 'data' SDMX URL component, eg. 'data' in http://stats.oecd.org/sdmx-json/data/QNA. Defaults to 'data'.

dataUrlType

The type of the CatalogItem's dataUrl, or undefined if raw data for this data source is not available. Valid values are: * direct - A direct link to the data. * wfs - A Web Feature Service (WFS) base URL. If CatalogItem's dataUrl is not specified, the base URL will be this data item's URL. * wfs-complete - A complete, ready-to-use link to download features from a WFS server. * none - There is no data link.

dataflowUrlComponent

The 'dataflow' SDMX URL component, eg. 'dataflow' in http://stats.oecd.org/sdmx-json/dataflow/QNA. Defaults to 'dataflow'.

dateFormat

Options for formatting current time and timeline tic labels. Options are: currentTime // Current time in time slider will be shown in this format. For example "mmmm yyyy" for Jan 2016. timelineTic // Timeline tics will have this label. For example "yyyy" will cause each tic to be labelled with the year.

description

The description of the item.

displayChoicesBeforeLegend

A flag which determines whether the legend comes before (false) or after (true) the display variable choice. Default true.

displayPercent

Gets or sets whether to show percentages or raw values.

endTime

The endTime to use as part of the ?startTime=...&endTime=... query parameters. Currently a string, but could be extended to be an object with frequency codes as keys. By default this is undefined, and not used as part of the query.

featureInfoTemplate

A template to display message in a info box. May be a string or an object with template, name and/or partials properties.

forceProxy

Gets or sets whether or not this member should be forced to use a proxy. This property is not observable.

forceShowDimensionIds

An array of dimension ids which, if present, should be shown to the user, even if there is only one value. This is useful if the name of the dataset doesn't convey what is in it, but one of the dimension values does. Eg. ['MEASURE']. Default [].

frequencyDimensionId

The SDMX frequency dimension id. Defaults to 'FREQUENCY'.

hideSource

Indicates that the source of this data should be hidden from the UI (obviously this isn't super-secure as you can just look at the network requests).

id

An optional unique id for this member, that is stable across renames and moves. Use uniqueId to get the canonical unique id for this CatalogMember, which is present even if there is no id.

initialMessage

A message object that is presented to the user when an item or group is initially clicked The object is of the form {title:string, content:string, key: string, confirmation: boolean, confirmText: string, width: number, height: number}.

isEnabled

A value indicating whether this data item is enabled. An enabled data item appears in the "Now Viewing" pane, but is not necessarily shown on the map.

isHidden

A value indicating whether this item is hidden from the catalog. This property is observable.

isLegendVisible

A value indicating whether the legend for this data item is currently visible.

isLoading

A value indicating whether this data source is currently loading.

isMappable

A value indicating whether this data source can be shown on the map (as opposed to a time-series dataset, for instance, which can only be shown in a chart).

isPromoted

A value indicating whether this item is kept above other non-promoted items.

isSampled

A value indicating whether the rows correspond to "sampled" data. This only makes a difference if there is a time column and idColumns. In this case, if isSampled is true, then feature position, color and size are interpolated to produce smooth animation of the features over time. If isSampled is false, then times are treated as the start of periods, so that feature positions, color and size are kept constant from one time until the next, then change suddenly. Color and size are never interpolated when they are drawn from a text column.

isShown

A value indicating whether this data item is currently shown on the map. In order to be shown, the item must also be enabled.

isUserSupplied

A value indicating whether this member was supplied by the user rather than loaded from one of the Terria's initSources. User-supplied members must be serialized completely when, for example, serializing enabled members for sharing.

isWaitingForDisclaimer

Whether this catalog member is waiting for a disclaimer to be accepted before showing itself.

keepOnTop

Keeps the layer on top of all other imagery layers.

legendUrl

The URL of the legend to show when this catalog item is enabled. If there is more than one legend URL, this property returns the first one.

legendUrls

The URLs of the legends to show when this catalog item is enabled.

maximumShownFeatureInfos

The maximum number of features whose information can be shown at one time in the Feature Info Panel, from this item. Defaults to terria.configParameters.defaultMaximumShownFeatureInfos

measureDimensionId

The measure dimension id Defaults to 'MEASURE'.

metadataUrl

The URL from which this data item's metadata description can be retrieved, or undefined if metadata is not available for this data item. The format of the metadata depends on the type of data item. For example, Web Map Service (WMS) data items provide their metadata via their GetCapabilities document.

name

The name of the item.

nameInCatalog

The name of this catalog member in the catalog. By default this is just name, but can be overridden.

nowViewingIndex

The index of the item in the Now Viewing list. Setting this property does not automatically change the order. This property is used intenally to save/restore the Now Viewing order and is not intended for general use.

nowViewingMessage

A message to show when this item is enabled for the first time in order to call attention to the Now Viewing panel.

opacity

The opacity (alpha) of the data item, where 0.0 is fully transparent and 1.0 is fully opaque.

providerId

The provider id in the SDMX URL, eg. the final 'all' in http://stats.oecd.org/sdmx-json/data/QNA/.../all. Defaults to 'all'.

rectangle

The geographic rectangle (extent or bounding box) containing this data item.

regionDimensionId

The SDMX region dimension id, which is not displayed as a user-choosable dimension. Defaults to 'REGION'.

regionNameTemplate

A Mustache template used to turn the name of the region provided in the "regionType" variable into a csv-geo-au-compliant column name. The Mustache variable "{{name}}" holds the original name. You can use this to specify a year in the name, even if it is absent on the server. Eg. "{{name}}code_2016" converts STE to STE_code_2016. By default this is undefined. If it is undefined, the following rules are applied: - If there's a , replace the last one with code; else append code. So SA4 -> SA4_code; SA4_2011 -> SA4_code_2011. - If the name ends in 4 digits without an underscore, insert "_code", eg. LGA2011 -> LGA_code_2011.

regionType

The regiontype directly, which is an alternative to including a regiontype in the data. Eg. "cnt3" would tell us that we should use cnt3 as the table column name. By default this is undefined.

regionTypeDimensionId

The SDMX region-type dimension id used with the region code to set the region type. Usually defaults to 'REGIONTYPE'.

sdmxVersionNumber

The SDMX version number Defaults to 2.0.

selectedInitially

The concepts which are initially selected, eg. {"MEASURE": ["GDP", "GNP"], "FREQUENCY": ["A"]}. Defaults to the first value in each dimension (when undefined).

shortReport

A short report to show on the now viewing tab.

showWarnings

Should any warnings like failures in region mapping be displayed to the user?

showsInfo

A value indicating whether this data source should show an info icon.

sortValues

Gets or sets how to re-sort the values that appear in the SDMX-JSON response, in the Now Viewing panel. The default is null, so that the order is maintained (except for totalValueIds, which are moved to the top). By setting this to 'name' or 'id', the values are sorted into alphabetical and/or numerical order either by name or by id, respectively.

startTime

The startTime to use as part of the ?startTime=...&endTime=... query parameters. Currently a string, but could be extended to be an object with frequency codes as keys. By default this is undefined, and not used as part of the query.

timePeriodDimensionId

The SDMX time period dimension id, which is not displayed as a user-choosable dimension. Defaults to 'TIME_PERIOD'.

totalValueIds

Gets or sets value ids for each dimension which correspond to total values. Place the grand total first. If all dimensions (except region-type, region and frequency) have totals available, then a "Display as a percentage of regional total" option becomes available. Eg. Suppose AGE had "10" for 10 year olds, etc, plus "ALL" for all ages, "U21" and "21PLUS" for under and over 21 year olds. Then you would want to specify {"AGE": ["ALL", "U21", "21PLUS"]}. In this case, when the user selects one of these values, any other values will be unselected. And when the user selects any other value (eg. "10"), if any of these values were selected, they will be unselected. In addition, any values provided under a wildcard "" key are used for all dimensions, and are shown first in the list, if present, eg. {"": ["ALL"], "AGE": ["U21", "21PLUS"]}.

url

The URL of this data.

useOwnClock

A flag indicating whether imagery should be displayed using this item's own clock (currentTime, multiplier), or, if false, the terria clock (whose current time is shown in the timeline UI). Default false.

whitelist

Gets or sets each dimension's allowed values, by id. Eg. {"SUBJECT": ["GDP", "GNP"], "FREQUENCY": ["A"]}. If not defined, all values are allowed. If a dimension is not present, all values for that dimension are allowed. Note this will not be applied to regions or time periods. The expression is first matched as a regular expression (sandwiched between ^ and &); if that fails, it is matched as a literal string. So eg. "[0-9]+" will match 015 but not A015.

zoomOnEnable

A value indicating whether the map will automatically zoom to this catalog item when it is enabled.

Note that within a single init source:

  • Catalog items with both isEnabled and zoomOnEnable set to true will override the top-level initialCamera property.
  • If multiple catalog items have both isEnabled and zoomOnEnable set to true, it is undefined which one will affect the camera.

In the case of multiple init sources, however, the camera will reflect whatever happens in the last init source, whether it is a result of a zoomOnEnable or an initialCamera,