Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# Number of accessed cells, sample query
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX cedar: <http://bit.ly/cedar#>
PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX sdmx-code: <http://purl.org/linked-data/sdmx/2009/code#>
SELECT (COUNT(?obs) as ?nobs)
FROM <urn:graph:cedar-mini:release>
WHERE { ?obs a qb:Observation .
?obs cedar:population ?pop .
?obs sdmx-dimension:refArea ?municipality .
?obs cedar:houseType ?house .
?slice a qb:Slice.
?slice qb:observation ?obs.
?slice sdmx-dimension:refPeriod ?year .
FILTER (?year IN (1859, 1869, 1879, 1889, 1899, 1909, 1920)) .
FILTER (?house IN (<http://bit.ly/cedar#house-BewoondeHuizen>, <http://bit.ly/cedar#house-BewoondeSchepen>)) .
FILTER (NOT EXISTS {?obs cedar:isTotal ?total }) .
}
# Accessed original sheets, sample query
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX cedar: <http://bit.ly/cedar#>
PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX sdmx-code: <http://purl.org/linked-data/sdmx/2009/code#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX tablink: <http://bit.ly/cedar-tablink#>
SELECT DISTINCT(?sheet)
FROM <urn:graph:cedar-mini:release>
FROM <urn:graph:cedar-mini:raw-data>
WHERE { ?obs a qb:Observation .
?obs cedar:population ?pop .
?obs sdmx-dimension:refArea ?municipality .
?obs cedar:houseType ?house .
?slice a qb:Slice.
?slice qb:observation ?obs.
?slice sdmx-dimension:refPeriod ?year .
?obs prov:wasDerivedFrom ?src .
?src tablink:sheet ?sheet .
FILTER (?year IN (1859, 1869, 1879, 1889, 1899, 1909, 1920)) .
FILTER (?house IN (<http://bit.ly/cedar#house-BewoondeHuizen>, <http://bit.ly/cedar#house-BewoondeSchepen>)) .
FILTER (NOT EXISTS {?obs cedar:isTotal ?total }) .
}
# Number of accessed sheets, sample query
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX cedar: <http://bit.ly/cedar#>
PREFIX sdmx-dimension: <http://purl.org/linked-data/sdmx/2009/dimension#>
PREFIX sdmx-code: <http://purl.org/linked-data/sdmx/2009/code#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX tablink: <http://bit.ly/cedar-tablink#>
SELECT (COUNT(DISTINCT(?sheet) AS ?ntab))
FROM <urn:graph:cedar-mini:release>
FROM <urn:graph:cedar-mini:raw-data>
WHERE { ?obs a qb:Observation .
?obs cedar:population ?pop .
?obs sdmx-dimension:refArea ?municipality .
?obs cedar:houseType ?house .
?slice a qb:Slice.
?slice qb:observation ?obs.
?slice sdmx-dimension:refPeriod ?year .
?obs prov:wasDerivedFrom ?src .
?src tablink:sheet ?sheet .
FILTER (?year IN (1859, 1869, 1879, 1889, 1899, 1909, 1920)) .
FILTER (?house IN (<http://bit.ly/cedar#house-BewoondeHuizen>, <http://bit.ly/cedar#house-BewoondeSchepen>)) .
FILTER (NOT EXISTS {?obs cedar:isTotal ?total }) .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment