我感兴趣的是从statistics.gov.scot获得一个可用的不同层次结构的列表。我想列出的最合适的层次结构如下:
http://statistics.gov.scot/def/hierarchy/best-fit#community-health-partnership
http://statistics.gov.scot/def/hierarchy/best-fit#council-area
http://statistics.gov.scot/def/hierarchy/best-fit#country可以通过API节获得这个样本地理。
期望的结果
我希望能够取得预期的结果:
community-health-partnership
council-area
country如何构造实际生成的查询,我可以通过以下方法获得可用所有地理区域的列表:
PREFIX sdmx: <http://purl.org/linked-data/sdmx/2009/dimension#>
SELECT DISTINCT ?framework
WHERE {
?a sdmx:refArea ?framework .
} LIMIT 10我在台词上试了点什么:
PREFIX fits: <http://statistics.gov.scot/def/hierarchy/best-fit#>
SELECT DISTINCT ?framework
WHERE {
?a fits ?framework .
} LIMIT 10但是,这种语法自然是不正确的。
发布于 2017-12-28 22:27:48
从他们的SPARQL端点开始,你可以这样做--
DESCRIBE <http://statistics.gov.scot/def/hierarchy/best-fit#country>然后,根据这些结果,你可能会尝试这样的结果,结果并不完全是你想要的,但可能会更好--
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?hierarchy
?label
WHERE
{ ?hierarchy rdfs:subPropertyOf <http://statistics.gov.scot/def/hierarchy/best-fit>
; rdfs:label ?label
}https://stackoverflow.com/questions/48014698
复制相似问题