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.

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).

colors

The array of color strings used for chart lines. TODO: make this customizable, eg. use colormap / colorPalette.

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.

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.

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.

idColumns

The column identifiers (names or indices), so we can identify individual features within a table with a time column, or across multiple polled lat/lon files. Eg. ['lat', 'lon'] for immobile features, or ['identifier'] if a unique identifier is provided (where these are column names in the table; column numbers work as well). For region-mapped files, the region identifier is used instead. For non-spatial files, the x-column is used instead.

info

The array of section titles and contents for display in the layer info panel. In future this may replace 'description' above - this list should not contain sections named 'description' or 'Description' if the 'description' property is also set as both will be displayed. The object is of the form {name:string, content:string}. Content will be rendered as Markdown with HTML.

infoSectionOrder

The array of section titles definining the display order of info sections. If this property is not defined, DataPreviewSections's DEFAULT_SECTION_ORDER is used.

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 is mappable and should therefore include a Zoom To button.

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

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.

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'.

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'.

selectedInitially

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

shareKeys

An array of all possible keys that can be used to match to this catalog member when specified in a share link - used for maintaining backwards compatibility when adding or changing CatalogMember's id.

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.

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'.

url

The URL of this data.

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.

zoomOnEnable

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