2.1.1 Support for qualitative data (observation values defined by non-numeric and coded measures) in the DE
Ticket dotstatsuite-core-transfer#124 (closed) implemented non-numeric and coded measures (observation values) in .Stat CORE. The objective of this ticket here is to enable the use of these "qualitative" non-numeric and coded measures (observation values) in the .Stat Data Explorer.
Notes:
- All observation values are always of the same type. A check for the type would need to be made only once.
- It is supposed that numeric observation values as well as numeric, non-numeric and coded attribute values are already supported in the DE. But this ticket should be used to make sure all of these work correctly.
- In the tables, string values are not transformed for decimals, scaling and thousand separators. They are displayed exactly as returned by the web service.
- For charts, only numeric observation values continue to be supported. When observation values are of a non-numeric type, then the charts will be disabled (chart menu is to be hidden).
Display rules for the different data types in the DE:
SDMX data type | Display format |
---|---|
Coded | string |
String (string allowing any character) | string |
Alpha (string which only allows A-z) | string |
AlphaNumeric (string which only allows A-z and 0-9) | string |
Numeric (string which only allows 0-9, but is not numeric so that is can having leading zeros) | string |
BigInteger (corresponds to XML Schema xs:integer datatype; infinite set of integer values) | integer |
Integer (corresponds to XML Schema xs:int datatype; between -2147483648 and +2147483647 (inclusive)) | integer |
Long (corresponds to XML Schema xs:long datatype; between -9223372036854775808 and +9223372036854775807 (inclusive)) | integer |
Short (corresponds to XML Schema xs:short datatype; between -32768 and -32767 (inclusive)) | integer |
Decimal (corresponds to XML Schema xs:decimal datatype; subset of real numbers that can be represented as decimals) | number |
Float (corresponds to XML Schema xs:float datatype; patterned after the IEEE single-precision 32-bit floating point type) | number |
Double (corresponds to XML Schema xs:double datatype; patterned after the IEEE double-precision 64-bit floating point type) | number |
Boolean (corresponds to the XML Schema xs:boolean datatype; support the mathematical concept of binary-valued logic: {true, false}) | localised "Yes", "No" |
URI (corresponds to the XML Schema xs:anyURI; absolute or relative Uniform Resource Identifier Reference) | string |
Count (an integer following a sequential pattern, increasing by 1 for each occurrence) | integer |
ObservationalTimePeriod (superset of StandardTimePeriod and TimeRange) | Current time period display, localised for months |
StandardTimePeriod (superset of BasicTimePeriod and ReportingTimePeriod) | Current time period display, localised for months |
BasicTimePeriod (superset of GregorianTimePeriod and DateTime) | Current time period display, localised for months |
GregorianTimePeriod (superset of GregorianYear, GregorianYearMonth, and GregorianDay) | Current time period display, localised for months |
GregorianYear (YYYY) | Current time period display, localised for months |
GregorianYearMonth / GregorianMonth (YYYY-MM) | Current time period display, localised for months |
GregorianDay (YYYY-MM-DD) | Current time period display, localised for months |
ReportingTimePeriod (superset of RepostingYear, ReportingSemester, ReportingTrimester, ReportingQuarter, ReportingMonth, ReportingWeek, ReportingDay) | Current time period display, localised for months |
ReportingYear (YYYY-A1 – 1 year period) | Current time period display, localised for months |
ReportingSemester (YYYY-Ss – 6 month period) | Current time period display, localised for months |
ReportingTrimester (YYYY-Tt – 4 month period) | Current time period display, localised for months |
ReportingQuarter (YYYY-Qq – 3 month period) | Current time period display, localised for months |
ReportingMonth (YYYY-Mmm – 1 month period) | Current time period display, localised for months |
ReportingWeek (YYYY-Www – 7 day period; following ISO 8601 definition of a week in a year) | Current time period display, localised for months |
ReportingDay (YYYY-Dddd – 1 day period) | Current time period display, localised for months |
DateTime (YYYY-MM-DDThh:mm:ss) | Current time period display, localised for months, plus time |
TimeRange (YYYY-MM-DD(Thh:mm:ss)?/) | Range of current time period display, localised for months, plus time |
Month (--MM; speicifies a month independent of a year; e.g. February is black history month in the United States) | MM |
MonthDay (--MM-DD; specifies a day within a month independent of a year; e.g. Christmas is December 25th; used to specify reporting year start day) | MM-DD |
Day (---DD; specifies a day independent of a month or year; e.g. the 15th is payday) | DD |
Time (hh:mm:ss; time independent of a date; e.g. coffee break is at 10:00 AM) | hh:mm:ss |
Duration (corresponds to XML Schema xs:duration datatype) | duration |
InclusiveValueRange (decimal number within a closed interval, whose bounds are specified in the SDMX representation by the facets minValue and maxValue) | number (DE support not required) |
ExclusiveValueRange (decimal number within an open interval, whose bounds are specified in the SDMX representation by the facets minValue and maxValue) | number (DE support not required) |
Incremental (decimal number the increased by a specific interval (defined by the interval facet), which is typically enforced outside of the XML validation) | number (DE support not required) |
Note that SDMX foresees the following properties for data types:
- minLength : positiveInteger
- maxLength : positveInteger
- minValue : Decimal
- maxValue : Decimal
- startValue : Decimal
- endValue : String
- pattern : String
- isSequence : Boolean (DE support not required)
- interval : Double (DE support not required)
- timeInterval : Duration (DE support not required)
- startTime : Date (DE support not required)
- endTime : Date (DE support not required)
Example use cases for non-numeric observation values:
- "low", "medium", "high" (poverty levels, where each country measures it differently, so a proxy is required)
- Also frequently have thresholds like: "<1"
- Also have binary responses: "Yes", "No"
Edited by Jens Dossé