Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

nested/hierarchical dimensions #10

Closed
nkrishnaswami opened this issue Aug 12, 2019 · 2 comments · Fixed by #32
Closed

nested/hierarchical dimensions #10

nkrishnaswami opened this issue Aug 12, 2019 · 2 comments · Fixed by #32

Comments

@nkrishnaswami
Copy link
Contributor

nkrishnaswami commented Aug 12, 2019

Many dimensions, for example state/county/city or sector/industry group/industry/subindustry (eg GICS), have parent/child or broader/narrower relationships between dimension values at each level. Other schemes like SKOS or DSPL 1.0 can model this, but DSPL 2.0 does not yet include such a facility.

In this issue, discuss what such an extension could look like.

@nkrishnaswami
Copy link
Contributor Author

Something like this, perhaps:

HierarchicalDimension

Type: Thing > Intangible > CategoricalDimension > HierarchicalDimension

Hierarchical dimensions define the categories that measures can apply to when these are nested within other dimensions. For instance, countries, industry/sector schemes, age groups, etc.

Property Expected type Description
parentDimension CategoricalDimension The ID of the parent or containing dimension.

When the codeList is a CSV table, it must include a column parent, which contains the codeValue of a DimensionValue defined in the parentDimension.

When the codeList is not a CSV table, each DimensionValue must include an additionalProperty with propertyID of parent and with value being the codeValue of a DimensionValue defined in the parentDimension.

@nkrishnaswami
Copy link
Contributor Author

After discussion, it adds unnecessary complexity to introduce a new type -- every property is optional in schema.org, so we can simply omit parentDimension when there is not one. Also schema:parent refers to the parents of beings, so we introduce 'parentValue' for a parent DimensionValue.
In keeping with "things not strings", the parentValue property has a range of DimensionValue, which can either be an object sharing a codeValue with or a URL referring by ID to the parent DimensionValue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant