cubiql
cubiql copied to clipboard
Search hierarchical data
Search data of a specific hierarchical level (e.g. council areas, electoral wards etc).
Expected GraphQL queries:
{ datasets(data: {
or/and: [ { dimension:"http://purl.org/linked-data/sdmx/2009/dimension#refArea”
level:”http://statistics.gov.scot/id/statistical-entity/S12”} //council areas
{ dimension:"http://purl.org/linked-data/sdmx/2009/dimension#refArea”
level:”http://statistics.gov.scot/id/statistical-entity/S13”} ]}) { //electoral wards
title
}}
Required changes at schema: the same as #30
This would require some agreed data model for the hierarchical dataset. In PublishMyData, we've been using a particular approach to 'collections' of geographical areas or organisations - the 'feature of interest' of an observation. This is quite flexible and could be widely used, but currently is only implemented by Swirrl. GraphQL methods could be written to make use of these collections to allow filtering of data or datasets - and Swirrl will probably want such methods when using GraphQL with PublishMyData, but other people might have other approaches to representing their hierarchies.
I agree that there should be an agreed data model for representing hierarchical data. This is highly related with the best practices for publishing data cubes.
However, since there is no such agreed model, at the implementation I temporarily use the PublishMyData approach. If we agree on a common model we can adapt the implementation to follow this model.