当我在 dbpedia.org 上运行时,我的查询会显示结果。我想在 sgvizler 图表中显示这个结果。例如这是查询,我想在 sgvizler 图表中显示此查询结果
这是更新的查询。它仅在表中显示前两个查询结果。
<script type="text/javascript" src="http://mgskjaeveland.github.io/sgvizler/v/0.6/sgvizler.js"></script>
<script>
sgvizler
.defaultEndpointURL("https://dbpedia.org/sparql")
.defaultChartFunction("sgvizler.visualization.Table")
.defaultChartWidth(1000);
$(document).ready(function (){ sgvizler.containerDrawAll(); });
</script>
</head>
<body>
<div id="results"
data-sgvizler-query="SELECT DISTINCT ?concept WHERE { ?s a ?concept . } LIMIT 20">
</div>
<div id="results1"
data-sgvizler-query="SELECT DISTINCT ?property ?value {
{ <http://dbpedia.org/resource/Jönköping> ?property ?value. }
UNION
{ ?value ?property <http://dbpedia.org/resource/Jönköping>. }
}">
</div>
<div id="results3"
data-sgvizler-query='PREFIX db: <http://dbpedia.org/resource/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT ?name ?birth
WHERE
{
?person dbo:birthPlace db:Jönköping .
?person dbo:birthDate ?birth .
?person foaf:name ?name .
FILTER (?birth < "1900-01-01"^^xsd:date) .
}
ORDER BY ?birth'>
</div>
<div id="results4"
data-sgvizler-query='PREFIX db: <http://dbpedia.org/resource/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbo: <http://dbpedia.org/ontology/>
ASK WHERE{SELECT ?person WHERE{
?person a dbo:MusicalArtist .
?person dbo:birthPlace db:Jönköping .
}}'>
</div>
<div id="results5"
data-sgvizler-query='PREFIX db: <http://dbpedia.org/resource/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX dbo: <http://dbpedia.org/ontology/>
SELECT DISTINCT ?name ?person
WHERE
{
?person dbo:birthPlace db:Jönköping .
?person dbo:deathPlace ?deathPlace.
?person foaf:name ?name .
FILTER (?deathPlace != db:Jönköping) .
} ORDER BY ?name LIMIT 10 '>
</div>