| DBpedia Japanese SPARQLエンドポイント |
|
情報組織化研究グループ SPARQLエンドポイント
※ http://lod.hozo.jp/repositories/ ※ http://lodcu.cs.chubu.ac.jp/SparqlEPCU/api/josoken_test |
| DBpedia Japanese SPARQLエンドポイント |
(1) シンプルなクエリ
SELECT ?s ?p ?o WHERE
{
?s ?p ?o.
}
(2) 述語が<http://www.w3.org/2000/01/rdf-schema#label>であるトリプルを取得
SELECT ?s ?o WHERE
{
?s <http://www.w3.org/2000/01/rdf-schema#label> ?o .
}
(3) DBpediaのデフォルトのクエリ
select distinct * where
{
<http://ja.dbpedia.org/resource/東京都> ?p ?o .
}
(4) 東京都に隣接する県の名前
SELECT DISTINCT ?pref ?label WHERE
{
<http://ja.dbpedia.org/resource/東京都> <http://ja.dbpedia.org/property/隣接都道府県> ?pref.
?pref <http://www.w3.org/2000/01/rdf-schema#label> ?label.
}
(5) 「東京都に隣接する県の名前」のクエリを省略して書くと…
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbpedia-ja: <http://ja.dbpedia.org/resource/>
PREFIX prop-ja: <http://ja.dbpedia.org/property/>
SELECT DISTINCT ?pref ?label WHERE
{
dbpedia-ja:東京都 prop-ja:隣接都道府県 ?pref .
?pref rdfs:label ?label .
}
(6) 同一主語の省略
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbpedia-ja: <http://ja.dbpedia.org/resource/>
PREFIX prop-ja: <http://ja.dbpedia.org/property/>
SELECT DISTINCT ?pref ?label WHERE {
dbpedia-ja:東京都 rdfs:label ?label ;
prop-ja:隣接都道府県 ?pref .
}
|
| DBpedia Japanese SPARQLエンドポイント |
鉄道駅の駅名と位置データ(緯度・経度)を取得
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX dbpedia-owl: <http://dbpedia.org/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select * where {
?link a dbpedia-owl:Station;
rdfs:label ?title;
geo:lat ?lat;
geo:long ?long.
}
|
| LODチャレンジJapan応募作品エンドポイント試行版 |
鉄道駅の駅名と位置データ(緯度・経度)を取得
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdag2: <http://RDVocab.info/ElementsGr2/>
PREFIX dcterms: <http://purl.org/dc/terms/>
select distinct *
from <http://purl.org/net/aozora/resources>
where{
?title_uri dcterms:creator ?creator_uri;
dcterms:title [rdf:value ?title].
?creator_uri rdag2:dateOfBirth ?date.
filter(?date > "1800-12-31"^^xsd:date)
}
http://lodc.jp/ にクエリ例がいくつかあります
|
| 青空文庫LOD SPARQLエンドポイント |
1600年以前に生まれた作者の作品
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdag2: <http://RDVocab.info/ElementsGr2/>
PREFIX dcterms: <http://purl.org/dc/terms/>
select distinct *
from <http://purl.org/net/aozora/resources>
where{
?title_uri dcterms:creator ?creator_uri;
dcterms:title [rdf:value ?title].
?creator_uri rdag2:dateOfBirth ?date.
filter(?date < "1800-12-31"^^xsd:date)
}
http://mdlab.slis.tsukuba.ac.jp/lodc2012/aozoralod/aozoralod_search.html にクエリ例がいくつかあります
|
| 京都国際マンガミュージアム書誌情報LOD SPARQLエンドポイント |
マンガ著作とそのマンガ家を表示するSPARQL文
PREFIX rda: <http://rdvocab.info/Elements#>
PREFIX rdaG2: <http://rdvocab.info/ElementsGr2#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX kmm: <http://mdlab.tsukuba.ac.jp/lodc2012/kmm/>
PREFIX frbrer: <http://iflastandards.info/ns/fr/frbr/frbrer#>
select distinct ?mangalabel ?creator ?name
from <http://purl.org/net/mdlab/kmm>
where {
?manga rda:titleProper ?mangalabel;
rdf:type kmm:Wmanga;
frbrer:isCreatedByPerson ?creator.
?creator rdaG2:preferredNameForThePerson ?name.
}
ORDER BY ?manga
http://mdlab.slis.tsukuba.ac.jp/lodc2012/kmm/example.html にクエリ例がいくつかあります
|
| LODAC Museum SPARQLエンドポイント |
横浜美術館が所蔵している日本画の作品
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX dc11: <http://purl.org/dc/elements/1.1/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX lodac: <http://lod.ac/ns/lodac#>
PREFIX lodacid: <http://lod.ac/id/>
SELECT ?work ?title ?creator ?created ?genre ?material ?size
WHERE {
lodacid:3172 lodac:isProviderOf ?work .
?work rdfs:label ?title;
dc:references ?workRef .
?workRef lodac:genre "日本画"@ja;
dc11:creator ?creator;
dc:medium ?material;
dc:extent ?size .
OPTIONAL{ ?workRef dc:created ?created . }
}
LIMIT 100
http://lod.ac/wiki/SPARQLスニペット にクエリ例がたくさんあります
|
| Web NDL Authorities |
「夏目漱石」の典拠情報URI、名称実体URI、生年、没年、標目、標目カナヨミを調べる
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rda: <http://RDVocab.info/ElementsGr2/>
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX xl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX ndl: <http://ndl.go.jp/dcndl/terms/>
SELECT * WHERE {
?uri1 foaf:primaryTopic ?uri2.
?uri1 xl:prefLabel [ xl:literalForm ?heading; ndl:transcription ?yomi ].
?uri2 rda:dateOfBirth ?birth.
?uri2 rda:dateOfDeath ?death.
?uri2 foaf:name "夏目漱石".
FILTER (lang(?yomi) = 'ja-Kana').
}
|
| Europeana SPARQLエンドポイント |
Europeana にコンテンツを提供する機関
PREFIX edm: <http://www.europeana.eu/schemas/edm/>
SELECT DISTINCT ?DataProvider
WHERE {
?Aggregation edm:dataProvider ?DataProvider .
}
http://europeana.ontotext.com/sparql にクエリ例がたくさんあります
|
| The British National Bibliography SPARQLエンドポイント |
ISBN「9780729408745」の本を検索
PREFIX bibo: <http://purl.org/ontology/bibo/>
PREFIX blt: <http://www.bl.uk/schemas/bibliographic/blterms#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?book ?bnb ?title WHERE {
?book bibo:isbn13 "9780729408745";
blt:bnb ?bnb;
dct:title ?title.
}
http://bnb.data.bl.uk/flint-sparql にクエリ例がいくつかあります
|
| booksearch-sparql-js ソースコード |
| サンプルアプリ(京都に出てくる本のデータを検索) |
| 雛形HTMLファイル(ファイルをダウンロードして利用してください) |
| sgvizler 0.5 chart type 一覧 |
| 京都が出てくる本のデータ:著者トップ10 |
| 京都が出てくる本のデータ:出版年ランキング |
| 京都が出てくる本のデータ:おすすめ度ランキング |
| 京都が出てくる本のデータ:出版社別ランキング |
| 京都が出てくる本のデータ:カテゴリ別ランキング |
DBpedia:隣接都道府県グラフ
グラフの書き方(棒グラフ・円グラフの場合)
PREFIX dcterms: <http://purl.org/dc/terms/>
SELECT ?year (COUNT(?uri) AS ?noOfUri)
WHERE {
?uri dcterms:issued ?year.
}
GROUP BY ?year
ORDER BY DESC(?noOfUri)
グラフの書き方(無指向グラフの場合)
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema>
SELECT DISTINCT ?alabel ?blabel WHERE
{
?s <http://ja.dbpedia.org/property/隣接都道府県> ?o.
?s rdfs:label ?alabel.
?o rdfs:label ?blabel.
}
|
| leaflet-simple-sparql ソースコード |
| サンプルアプリ(DBpedia) |
| サンプルアプリ(大阪市オープンデータ) |
| サンプルアプリ(LODチャレンジ応募作品SPARQLエンドポイント試行版) |
| fullcalendar-sparql-js ソースコード |
| サンプルアプリ(ヨコハマ・アート・LOD) |
| SPARQL Timeliner |
| SPARQL Timeliner ソースコード |
| 今まで作成された SPARQL Timeliner アプリ一覧 |