BioHackathon-RDF

提供:TogoWiki

(版間での差分)
移動: 案内, 検索
7行: 7行:
== SPARQL ==
== SPARQL ==
-
==== イベントに関して ====
+
==== イベントに関するクエリ ====
* 2011年開催のBioHackathonの情報 [http://sparql-support.dbcls.jp/?query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0APREFIX+time%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2006%2Ftime%23%3E%0APREFIX+vcard%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2006%2Fvcard%2Fns%23%3E%0APREFIX+event%3A+%3Chttp%3A%2F%2Fpurl.org%2FNET%2Fc4dm%2Fevent.owl%23%3E%0A%0ASELECT+%3Flabel+%28COUNT%28%3Fagent%29+AS+%3Fnumber_of_participants%29+%3Fplace_label+%3Fbegin_date+%3Fend_date+%3Faddress_string+%3Flat+%3Flon%0AFROM+%3Chttp%3A%2F%2Fbiohackathon.org%2F%3E%0AWHERE+%7B%0A++%3Fbh+a+event%3AEvent+.%0A++%3Fbh+event%3Aagent+%3Fagent+.%0A++%3Fbh+rdfs%3Alabel+%3Flabel+.%0A++%3Fbh+time%3Ayear+2011+.%0A++%3Fbh+event%3Atime+%3Finterval+.%0A++%3Finterval+time%3AhasBeginning+%3Fbegin+.%0A++%3Fbegin+time%3AinXSDDate+%3Fbegin_date+.%0A++%3Finterval+time%3AhasEnd+%3Fend+.%0A++%3Fend+time%3AinXSDDate+%3Fend_date+.%0A++%3Fbh+event%3Aplace+%3Fplace+.%0A++%3Fplace+rdfs%3Alabel+%3Fplace_label+.%0A++%3Fplace+vcard%3Aaddress+%3Faddress+.%0A++%3Faddress+rdfs%3Alabel+%3Faddress_string+.%0A++%3Fplace+vcard%3AhasGeo+%3Fgeo+.%0A++%3Fgeo+vcard%3Alatitude+%3Flat+.%0A++%3Fgeo+vcard%3Alongitude+%3Flon+.%0A%7D+%0A&endpoint=http%3A%2F%2Fep.dbcls.jp%2Fsparql71tmp exec]
* 2011年開催のBioHackathonの情報 [http://sparql-support.dbcls.jp/?query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0APREFIX+time%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2006%2Ftime%23%3E%0APREFIX+vcard%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2006%2Fvcard%2Fns%23%3E%0APREFIX+event%3A+%3Chttp%3A%2F%2Fpurl.org%2FNET%2Fc4dm%2Fevent.owl%23%3E%0A%0ASELECT+%3Flabel+%28COUNT%28%3Fagent%29+AS+%3Fnumber_of_participants%29+%3Fplace_label+%3Fbegin_date+%3Fend_date+%3Faddress_string+%3Flat+%3Flon%0AFROM+%3Chttp%3A%2F%2Fbiohackathon.org%2F%3E%0AWHERE+%7B%0A++%3Fbh+a+event%3AEvent+.%0A++%3Fbh+event%3Aagent+%3Fagent+.%0A++%3Fbh+rdfs%3Alabel+%3Flabel+.%0A++%3Fbh+time%3Ayear+2011+.%0A++%3Fbh+event%3Atime+%3Finterval+.%0A++%3Finterval+time%3AhasBeginning+%3Fbegin+.%0A++%3Fbegin+time%3AinXSDDate+%3Fbegin_date+.%0A++%3Finterval+time%3AhasEnd+%3Fend+.%0A++%3Fend+time%3AinXSDDate+%3Fend_date+.%0A++%3Fbh+event%3Aplace+%3Fplace+.%0A++%3Fplace+rdfs%3Alabel+%3Fplace_label+.%0A++%3Fplace+vcard%3Aaddress+%3Faddress+.%0A++%3Faddress+rdfs%3Alabel+%3Faddress_string+.%0A++%3Fplace+vcard%3AhasGeo+%3Fgeo+.%0A++%3Fgeo+vcard%3Alatitude+%3Flat+.%0A++%3Fgeo+vcard%3Alongitude+%3Flon+.%0A%7D+%0A&endpoint=http%3A%2F%2Fep.dbcls.jp%2Fsparql71tmp exec]
52行: 52行:
-
==== 参加者に関して ====
+
==== 参加者に関するクエリ ====
* 参加者一覧(参加回数順)[http://sparql-support.dbcls.jp/?query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0APREFIX+event%3A+%3Chttp%3A%2F%2Fpurl.org%2FNET%2Fc4dm%2Fevent.owl%23%3E%0APREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0A%0ASELECT+%3Fperson+%3Fname+%28COUNT%28%3Fbh%29+AS+%3Fbh%29+%0AFROM+%3Chttp%3A%2F%2Fbiohackathon.org%2F%3E%0AWHERE+%7B%0A++%3Fbh+event%3Aagent+%3Fparticipant+.%0A++%3Fparticipant+rdfs%3AseeAlso+%3Fperson+.%0A++%3Fperson+foaf%3Aname+%3Fname+.%0A%7D+ORDER+BY+DESC+%28%3Fbh%29%0A%0A&endpoint=http%3A%2F%2Fep.dbcls.jp%2Fsparql71tmp exec]
* 参加者一覧(参加回数順)[http://sparql-support.dbcls.jp/?query=PREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E%0APREFIX+event%3A+%3Chttp%3A%2F%2Fpurl.org%2FNET%2Fc4dm%2Fevent.owl%23%3E%0APREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E%0A%0ASELECT+%3Fperson+%3Fname+%28COUNT%28%3Fbh%29+AS+%3Fbh%29+%0AFROM+%3Chttp%3A%2F%2Fbiohackathon.org%2F%3E%0AWHERE+%7B%0A++%3Fbh+event%3Aagent+%3Fparticipant+.%0A++%3Fparticipant+rdfs%3AseeAlso+%3Fperson+.%0A++%3Fperson+foaf%3Aname+%3Fname+.%0A%7D+ORDER+BY+DESC+%28%3Fbh%29%0A%0A&endpoint=http%3A%2F%2Fep.dbcls.jp%2Fsparql71tmp exec]

2017年9月5日 (火) 02:31時点における版

目次

RDF

test endpoint


グラフ構造 (TripleDataProfilerの結果を加工して、GraphVizで描画したもの)


SPARQL

イベントに関するクエリ

  • 2011年開催のBioHackathonの情報 exec
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix bh: <http://purl.jp/bio/10/bh/>
prefix bho: <http://purl.jp/bio/10/bh/ontology#>
prefix event: <http://purl.org/NET/c4dm/event.owl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix vcard: <http://www.w3.org/2006/vcard/ns#>
prefix time: <http://www.w3.org/2006/time#>
prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
prefix skos: <http://www.w3.org/2004/02/skos/core#>

SELECT ?label (COUNT(?agent) AS ?number_of_participants) ?place_label ?begin_date ?end_date ?address_string ?lat ?lon
FROM <http://biohackathon.org/>
WHERE {
  ?bh a event:Event .
  ?bh event:agent ?agent .
  ?bh rdfs:label ?label .
  ?bh time:year 2011 .
  ?bh event:time ?interval .
  ?interval time:hasBeginning ?begin .
  ?begin time:inXSDDate ?begin_date .
  ?interval time:hasEnd ?end .
  ?end time:inXSDDate ?end_date .
  ?bh event:place ?place .
  ?place rdfs:label ?place_label .
  ?place vcard:address ?address .
  ?address rdfs:label ?address_string .
  ?place vcard:hasGeo ?geo .
  ?geo vcard:latitude ?lat .
  ?geo vcard:longitude ?lon .
} 


  • 2011年の参加国 exec


  • BioHackathon一覧 exec

各回の参加者数、そのうち海外からの参加者数、計何カ国が参加したかなど


参加者に関するクエリ

  • 参加者一覧(参加回数順)exec
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
prefix owl: <http://www.w3.org/2002/07/owl#>
prefix xsd: <http://www.w3.org/2001/XMLSchema#>
prefix bh: <http://purl.jp/bio/10/bh/>
prefix bho: <http://purl.jp/bio/10/bh/ontology#>
prefix event: <http://purl.org/NET/c4dm/event.owl#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix foaf: <http://xmlns.com/foaf/0.1/>
prefix vcard: <http://www.w3.org/2006/vcard/ns#>
prefix time: <http://www.w3.org/2006/time#>
prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
prefix skos: <http://www.w3.org/2004/02/skos/core#>

SELECT ?person ?name (COUNT(?bh) AS ?bh) 
FROM <http://biohackathon.org/>
WHERE {
  ?bh event:agent ?participant .
  ?participant rdfs:seeAlso ?person .
  ?person foaf:name ?name .
} ORDER BY DESC (?bh)


  • 参加者一覧 (with 国, 参加した年) exec


  • 特定の人の参加歴 (例: Rutger) exec


  • ボトル一覧 exec


Stanza

個人用ツール