Skip to content

Instantly share code, notes, and snippets.

@northernjamie
Created November 24, 2016 13:11
Show Gist options
  • Save northernjamie/80efecbf506ae6645fd16f84f9b33214 to your computer and use it in GitHub Desktop.
Save northernjamie/80efecbf506ae6645fd16f84f9b33214 to your computer and use it in GitHub Desktop.
##### Very rough!!!!
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX sdmx: <http://purl.org/linked-data/sdmx/2009/concept#>
PREFIX data: <http://statistics.gov.scot/data/>
PREFIX sdmxd: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX mp: <http://statistics.gov.scot/def/measure-properties/>
PREFIX stat: <http://statistics.data.gov.uk/def/statistical-entity#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT ?areacode ?areaname ?percsmoking
WHERE {
?indicator qb:dataSet data:smoking-at-booking ;
sdmxd:refArea ?area ;
sdmxd:refPeriod ?period ;
<http://statistics.gov.scot/def/dimension/populationGroup> <http://statistics.gov.scot/def/concept/population-group/current-smoker> ;
mp:ratio ?percsmoking ;
<http://purl.org/linked-data/sdmx/2009/dimension#refPeriod> <http://reference.data.gov.uk/id/gregorian-interval/2013-01-01T00:00:00/P2Y> .
?area stat:code <http://statistics.gov.scot/id/statistical-entity/S13> ;
rdfs:label ?areaname ;
skos:notation ?areacode .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment