sparql timelinerの使い方
DESCRIPTION
http://uedayou.net/SPARQLTimeliner/TRANSCRIPT
![Page 1: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/1.jpg)
SPARQL Timeliner
使い方
上田洋
@uedayou
http://uedayou.net/SPARQLTimeliner/
![Page 2: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/2.jpg)
使い方
1. SPARQLクエリを作成する
2. SPARQLエンドポイントURLとSPARQL
クエリを入力する
3. 利用可能なデータか確認する
4. データを可視化する
5. 可視化ページを公開する
![Page 3: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/3.jpg)
(1) SPARQLクエリを作成
![Page 4: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/4.jpg)
(1)SPARQLクエリを作成
• SPARQL TimelinerはSPARQLクエリで得ら
れたデータをタイムラインと地図で可視化することができます
• SPARQLクエリで予め決められた変数内に
データを指定する必要があります
![Page 5: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/5.jpg)
SPARQLクエリのルール
• 左の表のルールに従って、SPARQLクエリを
作成してください
• ?title、?start、?lat、?long は必ず含
めてください
![Page 6: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/6.jpg)
必須変数
• ?title
– データのタイトル(文字列)
– rdfs:label, dc:title, dcterms:title など
• ?start
– データについての始まった日付
– 必ず西暦が入ったデータを入力してください
– 例:2013, 2013年, 2013-12-07,2013年12月07日
• ?lat, ?long
– データについてのWGS84の緯度(?lat)、経度(?long)
– geo:lat, geo:long
![Page 7: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/7.jpg)
任意変数• ?description
– データに対する説明– dc:description, dcterms:descriptionなど
• ?media (または?image)– データに対する画像や動画などのURL
– 画像、Flickr、YouTube、Dailymotion、Wikipediaに対応– 画像の場合、.jpgや.pngなど拡張子が明示されたURLを入力してください
• ?end– データについての終了した日付– データ型は ?start と同じ
• ?source– データの情報源のタイトル(文字列)
– ※?description, ?sourceurlが無いと表示されません
• ?sourceurl– データの情報源のURL
– ※ ?description, ?source が無いと表示されません
![Page 8: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/8.jpg)
?lat, ?long
?title ?start
?description ?media(?image)
?start
![Page 9: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/9.jpg)
?lat, ?long
?title
?start ?end
?description?source
?sourceurl
?start
![Page 10: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/10.jpg)
SPARQL Timeliner
で使えるクエリ例
![Page 11: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/11.jpg)
浮世絵LOD(SparqlEPCU)http://lodcu.cs.chubu.ac.jp/SparqlEPCU/RDFServer.jsp?reqtype=api&p
roject=toukaido
PREFIX schema: <http://schema.org/>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterm: <http://purl.org/dc/terms/>
select distinct
?title ?start ?lat ?long
?description ?image
where
{
?link a <toukaido:浮世絵浮世絵浮世絵浮世絵>;
rdfs:label ?title;
dcterm:created ?start;
schema:image ?image;
dcterm:description ?description;
geo:lat ?lat;
geo:long ?long.
}
LIMIT 100
![Page 12: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/12.jpg)
ヨコハマ・アート・LODhttp://archive.yafjp.org/test/inspection.php
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX schema: <http://schema.org/>
PREFIX event: <http://fp.yafjp.org/terms/event#>
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
SELECT * WHERE{
?sourceurl a event:Event;
schema:name ?title;
schema:name ?source;
schema:startDate ?start;
schema:endDate ?end;
event:location ?place.
?place rdfs:label ?description;
geo:lat ?lat;
geo:long ?long.
filter(lang(?description)="ja").
}
order by desc(?start)
LIMIT 200
![Page 13: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/13.jpg)
(2) SPARQLエンドポイントURLとSPARQLクエリを入力
![Page 14: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/14.jpg)
(2)エンドポイントとクエリを入力する
エンドポイントエンドポイントエンドポイントエンドポイントののののURLをををを入力入力入力入力
クエリクエリクエリクエリをををを入力入力入力入力
![Page 15: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/15.jpg)
▼を押すと、予め登録されたエンドポイントURLを簡単に
入力することができます
![Page 16: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/16.jpg)
• 「PREFIX」ボタン
を押すと、予め登録されたPREFIX
がリストとして表示されます。
• 各語を押すと、右側のクエリフォームの最初の行ににPREFIXが挿
入されます
![Page 17: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/17.jpg)
神奈川東海道五十三次浮世絵
可視化ページのタイトルを入力することもできます。
※無くても表示できます
![Page 18: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/18.jpg)
(3)利用可能なデータか確認
![Page 19: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/19.jpg)
利用可能データかどうか確認
• 「check」ボタンを押
すと、入力したクエリでどのようなデータが得られるか確認できます。
• 正しいデータであれば「利用できます」と表示されます
![Page 20: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/20.jpg)
利用可能な場合
![Page 21: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/21.jpg)
必須データが不足している場合(?lat がない)
![Page 22: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/22.jpg)
エラーの場合
![Page 23: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/23.jpg)
(4) データを可視化
![Page 24: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/24.jpg)
データを可視化
• データの確認ができたら、「Load>>」
ボタンを押してください
![Page 25: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/25.jpg)
このようなページが表示されれば完成です!
![Page 26: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/26.jpg)
(5)可視化ページを公開
![Page 27: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/27.jpg)
(5)可視化ページを公開
• ページのURLはパーマネントリンクになって
いるので、そのまま公開できます
例:http://uedayou.net/SPARQLTimeliner/view/?url=1386
206395-922.json
• データをサーバにキャッシュしているので、エンドポイントが停止されても可視化ページは表示できます
• iframeで自分のページに埋め込めます
![Page 28: SPARQL Timelinerの使い方](https://reader034.vdocuments.pub/reader034/viewer/2022042502/5488106bb4af9f8c0d8b55bc/html5/thumbnails/28.jpg)
iframeタグの作成方法
可視化ページの「Embed instructions」ボタンを押すとページのiframeタグが作成されます。自分のページに
埋め込むと、可視化ページを貼り付けることができます