SlideShare uma empresa Scribd logo
1 de 30
Yokohama Art Spot meets SPARQL


7/23/2011




            LinkedData.jp
✦

✦ twitter: @wintermelon
✦                         2011   4
✦

✦ LODAC

✦4        SPARQL
LODAC (Linked Open Data for ACademia)
✦ http://lod.ac
✦                                     Web


✦
    ✴              Linked Data(LOD)


    ✴

    ✴

✦
    ✴

    ✴ LODAC
LODAC Museum
✦
    ✴          LOD

✦
    ✴                 RDF

    ✴

    ✴                LOD

    ✴

✦
    ✴

    ✴ LODAC
LODAC Museum
✦
    ✴

    ✴

    ✴

    ✴      DBpedia Lite

    ✴ 15                  → 70

✦              13035604
✦ SPARQL                  http://lod.ac/sparql
Yokohama Art Spot
✦ http://lod.ac/apps/yas/
✦

✦ LODAC                ×    LOD
✦ LODAC
Yokohama Art Spot
1.
2.
3.




1.
2.


3.
1.
2.
3.




1.
2.


3.
✦       ID


    ✴

    ✴

    ✴

    ✴

    ✴

    ✴
Yokohama Art Spot

                    q_spt = """
                        PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-
                    ns#>
                        PREFIX foaf: <http://xmlns.com/foaf/0.1/>
                         PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
                         PREFIX dc: <http://purl.org/dc/terms/>
                        PREFIX omgeo: <http://www.ontotext.com/owlim/geo#>
                        PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
                        PREFIX lodac: <http://lod.ac/ns/lodac#>
                        PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>

                        SELECT distinct ?link ?title ?lat ?long ?postalcode ?
                    address ?access
                        WHERE {
                            ?link rdf:type foaf:Organization;
                            rdfs:label ?title;
                            dc:references ?ref
                            .
                            ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s
                    %(SW_long)s);
                            geo:lat ?lat;
                            geo:long ?long;
                            dc:source <http://place.yafjp.org/rdf/>;
                            vcard:postal-code ?postalcode;
                            <http://ocdi.jp/ns/pi#address> ?address
                            .
                            OPTIONAL{
                                ?ref dc:abstract ?access
                                .
                            }
Step1

        q_spt = """
            PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-
        ns#>
            PREFIX foaf: <http://xmlns.com/foaf/0.1/>
             PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
             PREFIX dc: <http://purl.org/dc/terms/>
            PREFIX omgeo: <http://www.ontotext.com/owlim/geo#>
            PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
            PREFIX lodac: <http://lod.ac/ns/lodac#>
            PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>

            SELECT distinct ?link ?title ?lat ?long ?postalcode ?
        address ?access
            WHERE {
                ?link rdf:type foaf:Organization;
                rdfs:label ?title;
                dc:references ?ref
                .
                ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s
        %(SW_long)s);
                geo:lat ?lat;
                geo:long ?long;
                dc:source <http://place.yafjp.org/rdf/>;
                vcard:postal-code ?postalcode;
                <http://ocdi.jp/ns/pi#address> ?address
                .
                OPTIONAL{
                    ?ref dc:abstract ?access
                    .
                }
Step2                                                                                         &

                           q_spt = """
                               PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-
                           ns#>
                               PREFIX foaf: <http://xmlns.com/foaf/0.1/>
                                PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
                                PREFIX dc: <http://purl.org/dc/terms/>
                               PREFIX omgeo: <http://www.ontotext.com/owlim/geo#>
                               PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
                               PREFIX lodac: <http://lod.ac/ns/lodac#>
                               PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>

                               SELECT distinct ?link ?title ?lat ?long ?postalcode ?
                           address ?access
                               WHERE {
                                   ?link rdf:type foaf:Organization;
                                   rdfs:label ?title;
                                   dc:references ?ref
                                   .
                                   ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s
                           %(SW_long)s);
                                   geo:lat ?lat;
                                   geo:long ?long;
                                   dc:source <http://place.yafjp.org/rdf/>;
                                   vcard:postal-code ?postalcode;
                                   <http://ocdi.jp/ns/pi#address> ?address
                                   .
                                   OPTIONAL{
                                       ?ref dc:abstract ?access
                                       .
                                   }




Python + SPARQLWrapper (http://sparql-wrapper.sourceforge.net/)

 from SPARQLWrapper import SPARQLWrapper, JSON

 sparql_wrapper = SPARQLWrapper(SPARQL                                                            URL)
 query = SPARQL
 sparql_wrapper.setQuery(query)
 sparql_wrapper.setReturnFormat(JSON)
 results = sparql_wrapper.query().convert()


                                                                                         SPARQL
Step2-1

          q_spt = """
              PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
              PREFIX foaf: <http://xmlns.com/foaf/0.1/>
              PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
              PREFIX dc: <http://purl.org/dc/terms/>
              PREFIX omgeo: <http://www.ontotext.com/owlim/geo#>
              PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
              PREFIX lodac: <http://lod.ac/ns/lodac#>
              PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>

              SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access
              WHERE {
                  ?link rdf:type foaf:Organization;
                  rdfs:label ?title;
                  dc:references ?ref
                  .
                  ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s);
                  geo:lat ?lat;
                  geo:long ?long;
                  dc:source <http://place.yafjp.org/rdf/>;
                  vcard:postal-code ?postalcode;
                  <http://ocdi.jp/ns/pi#address> ?address
                  .
                  OPTIONAL{
                      ?ref dc:abstract ?access
                      .
                  }
              }
              """ % locals()
PREFIX   rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
 PREFIX   foaf: <http://xmlns.com/foaf/0.1/>
 PREFIX   rdfs: <http://www.w3.org/2000/01/rdf-schema#>
 PREFIX   dc: <http://purl.org/dc/terms/>
 PREFIX   omgeo: <http://www.ontotext.com/owlim/geo#>
 PREFIX   geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
 PREFIX   lodac: <http://lod.ac/ns/lodac#>
 PREFIX   vcard: <http://www.w3.org/2006/vcard/ns#>



PREFIX

 ?link <http://purl.org/dc/terms/references> ?ref .




 ?link dc:references ?ref .
q_spt = """
    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    PREFIX dc: <http://purl.org/dc/terms/>
    PREFIX omgeo: <http://www.ontotext.com/owlim/geo#>
    PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
    PREFIX lodac: <http://lod.ac/ns/lodac#>
    PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>

    SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access
    WHERE {
        ?link rdf:type foaf:Organization;
        rdfs:label ?title;
        dc:references ?ref
        .
        ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s);
        geo:lat ?lat;
        geo:long ?long;
        dc:source <http://place.yafjp.org/rdf/>;
        vcard:postal-code ?postalcode;
        <http://ocdi.jp/ns/pi#address> ?address
        .
        OPTIONAL{
            ?ref dc:abstract ?access
            .
        }
    }
    """ % locals()
SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access
WHERE {
    ?link rdf:type foaf:Organization;          ?
    rdfs:label ?title;
    dc:references ?ref
    .
    ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s);
    geo:lat ?lat;
    geo:long ?long;                              ?    ?    ?      ;
    dc:source <http://place.yafjp.org/rdf/>;
                                                 ?    ?     ;
    vcard:postal-code ?postalcode;
    <http://ocdi.jp/ns/pi#address> ?address      ?    ?
    .                                            .
    OPTIONAL{
        ?ref dc:abstract ?access
        .
    }
}
SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access
WHERE {
    ?link rdf:type foaf:Organization;
    rdfs:label ?title;
    dc:references ?ref                               SELECT
    .
                                               ?link               URI
    ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s);
    geo:lat ?lat;                              ?title
    geo:long ?long;                            ?lat
    dc:source <http://place.yafjp.org/rdf/>;
    vcard:postal-code ?postalcode;
                                               ?long
    <http://ocdi.jp/ns/pi#address> ?address    ?postalcode
    .                                          ?address
    OPTIONAL{
                                               ?access
        ?ref dc:abstract ?access
        .
    }
}
SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access
WHERE {
    ?link rdf:type foaf:Organization;
    rdfs:label ?title;                      1.
    dc:references ?ref                                   ?link
    .
    ?ref omgeo:within(%(NE_lat)s %(NE_long)s2. ?link
                                             %(SW_lat)s %(SW_long)s);
    geo:lat ?lat;
    geo:long ?long;                            ?title
    dc:source <http://place.yafjp.org/rdf/>; ?ref
    vcard:postal-code ?postalcode;
    <http://ocdi.jp/ns/pi#address> ?address ※ LODAC      ?link
    .
                                               1      ?ref
    OPTIONAL{
        ?ref dc:abstract ?access               ?ref
        .
    }
}                                           3.        ?ref
LODAC                                                             2

                             crm:P55_has_current_location         dc:creator

                          dc:references                                        dc:references



             crm:P55_has_current_location                                 crm:P55_has_current_location
                                            dc:references           dc:references                        dc:creator
dc:creator



                              dc:references                                     dc:references




                                                            URI
                                                            URI
LODAC                                                             2

                             crm:P55_has_current_location         dc:creator

                          dc:references                                        dc:references



             crm:P55_has_current_location                                 crm:P55_has_current_location
                                            dc:references           dc:references                        dc:creator
dc:creator



                              dc:references                                     dc:references




                                                            URI
                                                            URI
SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access
WHERE {
    ?link rdf:type foaf:Organization;
    rdfs:label ?title;
    dc:references ?ref
    .
    ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s);
    geo:lat ?lat;
    geo:long ?long;
    dc:source <http://place.yafjp.org/rdf/>;
    vcard:postal-code ?postalcode; GET
    <http://ocdi.jp/ns/pi#address> ?address
    .                                                ?ref
    OPTIONAL{
        ?ref dc:abstract ?access
        .
    }
}
omgeo?
✦                         ?ref
    ?ref geo:lat ?lat;
    geo:long ?long.

    FILTER(?lat < 35.432916 && ?lat > 35.475012 &&
           ?long < 139.608699 && ?long > 139.652644)




✦ omgeo                     1

    ?ref omgeo:within(35.475012 139.652644 35.439216 139.608699).



    ✴ OWLIM
        virtuoso

    ✴              ●●km
SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access
WHERE {
    ?link rdf:type foaf:Organization;
    rdfs:label ?title;
    dc:references ?ref
    .
    ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s);
    geo:lat ?lat;
    geo:long ?long;
    dc:source <http://place.yafjp.org/rdf/>;
    vcard:postal-code ?postalcode;
    <http://ocdi.jp/ns/pi#address> ?address
    .
    OPTIONAL{
        ?ref dc:abstract ?access
                                   <http://place.yafjp.org/rdf/>
        .
    }
}
                           ?lat           ?postalcode
                           ?long          ?address
SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access
WHERE {
    ?link rdf:type foaf:Organization;
    rdfs:label ?title;
    dc:references ?ref
    .
    ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s);
    geo:lat ?lat;
    geo:long ?long;
    dc:source <http://place.yafjp.org/rdf/>;dc:abstract
                                      ?ref
    vcard:postal-code ?postalcode;               ?access
    <http://ocdi.jp/ns/pi#address> ?address
    .                                   OPTIONAL
    OPTIONAL{
        ?ref dc:abstract ?access
        .
    }
}
SPARQL                                      JSON

 {"spt": {"head": {"vars": ["link", "title", "lat", "long", "postalcode",
 "address", "access"]}, "results": {"bindings": [{"title": {"xml:lang": "ja",
 "type": "literal", "value": "u6a2au6d5cu7f8eu8853u9928"}, "long":
 {"datatype": "http://www.w3.org/2001/XMLSchema#float", "type": "typed-literal",
 "value": "139.63044"}, "access": {"type": "literal", "value": "u685cu6728u753a
 u99c5(JR)u4e0bu8ecau3001u52d5u304f
 u6b69u9053u3092u5229u7528u5f92u6b6910u5206u3002u307fu306au3068u307f
 u3089u3044u99c5(u307fu306au3068u307fu3089u3044u7dda)u4e0bu8eca
 u3001u300cu7f8eu8853u9928u53e3u300du3092u51fa
 u3066u5f92u6b693u5206u3002"}, "postalcode": {"type": "literal", "value":
 "220-0012"}, "link": {"type": "uri", "value": "http://lod.ac/id/3172"},
 "address": {"xml:lang": "ja", "type": "literal", "value": "u6a2au6d5c
 u5e02u897fu533au307fu306au3068u307fu3089u30443u4e01u76ee4-1"}, "lat":
 {"datatype": "http://www.w3.org/2001/XMLSchema#float", "type": "typed-literal",
 "value": "35.45722"}}, {"title": {"xml:lang": "ja", "type": "literal", "value":
 "u307fu306au3068u307fu3089u3044u30aeu30e3u30e9u30eau30fc"}, "long":
 {"datatype": "http://www.w3.org/2001/XMLSchema#float", "type": "typed-literal",
 "value": "139.6341"}, "postalcode": {"type": "literal", "value": "220-0012"},
 "link": {"type": "uri", "value": "http://lod.ac/id/530977"}, "address":
 {"xml:lang": "ja", "type": "literal", "value": "u795eu5948u5dddu770cu6a2a
 u6d5cu5e02u897fu533au307fu306au3068u307fu3089u30442u4e01u76ee3-5"},
 "lat": {"datatype": "http://www.w3.org/2001/XMLSchema#float", "type": "typed-
                                        …
SPARQL




         …
Step2-2
✦                                    ?link
    ?link ical:dtstart ?dtstart ;
    ical:dtend ?dtend .
    FILTER (
        (?dtstart > "%(dtstart)s"^^xsd:dateTime
         && ?dtstart < "%(dtend)s"^^xsd:dateTime)
         ||
        (?dtend > "%(dtstart)s"^^xsd:dateTime
         && ?dtend < "%(dtend)s"^^xsd:dateTime)
         ||
        (?dtstart < "%(dtstart)s"^^xsd:dateTime
         && ?dtend > "%(dtend)s"^^xsd:dateTime)
    )



✦                  …        dateTime         FILTER   0
        Sesame
Step3

                   q_spt = """
                       PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-
                   ns#>
                       PREFIX foaf: <http://xmlns.com/foaf/0.1/>
                        PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
                        PREFIX dc: <http://purl.org/dc/terms/>
                       PREFIX omgeo: <http://www.ontotext.com/owlim/geo#>
                       PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>
                       PREFIX lodac: <http://lod.ac/ns/lodac#>
                       PREFIX vcard: <http://www.w3.org/2006/vcard/ns#>

                       SELECT distinct ?link ?title ?lat ?long ?postalcode ?
                   address ?access
                       WHERE {
                           ?link rdf:type foaf:Organization;
                           rdfs:label ?title;
                           dc:references ?ref
                           .
                           ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s
                   %(SW_long)s);
                           geo:lat ?lat;
                           geo:long ?long;
                           dc:source <http://place.yafjp.org/rdf/>;
                           vcard:postal-code ?postalcode;
                           <http://ocdi.jp/ns/pi#address> ?address
                           .
                           OPTIONAL{
                               ?ref dc:abstract ?access
                               .
                           }




1.                                                                               1
2.                                       JSON
3.                        JSON

✦             or
     ON/OFF
✦
SPARQL              LOD
✦


     omgeo:within
✦ Semantic Media Wiki
    →   Wiki                              SPARQL


✦
    DBpedia    GeoNames
✦
                          dc:created
    1990   [1980]   1990        c. 1990   1980-90   55

Mais conteúdo relacionado

Mais procurados

Bio2 Rdf Presentation V3
Bio2 Rdf Presentation V3Bio2 Rdf Presentation V3
Bio2 Rdf Presentation V3nolmar01
 
20100614 ISWSA Keynote
20100614 ISWSA Keynote20100614 ISWSA Keynote
20100614 ISWSA KeynoteAxel Polleres
 
Cassandra introduction apache con 2014 budapest
Cassandra introduction apache con 2014 budapestCassandra introduction apache con 2014 budapest
Cassandra introduction apache con 2014 budapestDuyhai Doan
 
Accessing Databases from R
Accessing Databases from RAccessing Databases from R
Accessing Databases from RJeffrey Breen
 
The Cultural Linked Data Backbone
The Cultural Linked Data BackboneThe Cultural Linked Data Backbone
The Cultural Linked Data BackboneRichard Wallis
 
The Cultural Linked Data Backbone
The Cultural Linked Data BackboneThe Cultural Linked Data Backbone
The Cultural Linked Data BackboneRichard Wallis
 
Linked data: spreading data over the web
Linked data: spreading data over the webLinked data: spreading data over the web
Linked data: spreading data over the webshellac
 
Bigdive 2014 - RDF, principles and case studies
Bigdive 2014 - RDF, principles and case studiesBigdive 2014 - RDF, principles and case studies
Bigdive 2014 - RDF, principles and case studiesDiego Valerio Camarda
 
Cassandra introduction @ NantesJUG
Cassandra introduction @ NantesJUGCassandra introduction @ NantesJUG
Cassandra introduction @ NantesJUGDuyhai Doan
 

Mais procurados (12)

Bio2 Rdf Presentation V3
Bio2 Rdf Presentation V3Bio2 Rdf Presentation V3
Bio2 Rdf Presentation V3
 
20100614 ISWSA Keynote
20100614 ISWSA Keynote20100614 ISWSA Keynote
20100614 ISWSA Keynote
 
Cassandra introduction apache con 2014 budapest
Cassandra introduction apache con 2014 budapestCassandra introduction apache con 2014 budapest
Cassandra introduction apache con 2014 budapest
 
Accessing Databases from R
Accessing Databases from RAccessing Databases from R
Accessing Databases from R
 
The Cultural Linked Data Backbone
The Cultural Linked Data BackboneThe Cultural Linked Data Backbone
The Cultural Linked Data Backbone
 
The Cultural Linked Data Backbone
The Cultural Linked Data BackboneThe Cultural Linked Data Backbone
The Cultural Linked Data Backbone
 
Linked data: spreading data over the web
Linked data: spreading data over the webLinked data: spreading data over the web
Linked data: spreading data over the web
 
One PDB to go, please!
One PDB to go, please!One PDB to go, please!
One PDB to go, please!
 
cyclades eswc2016
cyclades eswc2016cyclades eswc2016
cyclades eswc2016
 
Bigdive 2014 - RDF, principles and case studies
Bigdive 2014 - RDF, principles and case studiesBigdive 2014 - RDF, principles and case studies
Bigdive 2014 - RDF, principles and case studies
 
Running R on Hadoop - CHUG - 20120815
Running R on Hadoop - CHUG - 20120815Running R on Hadoop - CHUG - 20120815
Running R on Hadoop - CHUG - 20120815
 
Cassandra introduction @ NantesJUG
Cassandra introduction @ NantesJUGCassandra introduction @ NantesJUG
Cassandra introduction @ NantesJUG
 

Destaque

Linked Open Dataによる博物館情報および地域情報の連携活用(じんもんこん2011)
Linked Open Dataによる博物館情報および地域情報の連携活用(じんもんこん2011)Linked Open Dataによる博物館情報および地域情報の連携活用(じんもんこん2011)
Linked Open Dataによる博物館情報および地域情報の連携活用(じんもんこん2011)Fuyuko Matsumura
 
Blimey - Smart Privacy Controls
Blimey - Smart Privacy ControlsBlimey - Smart Privacy Controls
Blimey - Smart Privacy Controlssmevarma
 
Vikrama Simha Audio Launch
Vikrama Simha Audio Launch Vikrama Simha Audio Launch
Vikrama Simha Audio Launch telugustop.com
 
外科術後患者の発熱のマネージメント
外科術後患者の発熱のマネージメント外科術後患者の発熱のマネージメント
外科術後患者の発熱のマネージメントSentaro Iwabuchi
 
90octane Overview
90octane Overview90octane Overview
90octane Overviewjimgrinney
 
ಮುಹರ್ರಮ್ ಒಂದು ಪವಿತ್ರ ಮಾಸ 2
ಮುಹರ್ರಮ್ ಒಂದು ಪವಿತ್ರ ಮಾಸ 2ಮುಹರ್ರಮ್ ಒಂದು ಪವಿತ್ರ ಮಾಸ 2
ಮುಹರ್ರಮ್ ಒಂದು ಪವಿತ್ರ ಮಾಸ 2FAHIM AKTHAR ULLAL
 
Translated copy of ch15-16x
Translated copy of ch15-16xTranslated copy of ch15-16x
Translated copy of ch15-16xdesgreene
 
Susan Siegel resume 2016
Susan Siegel resume 2016Susan Siegel resume 2016
Susan Siegel resume 2016Susan Siegel
 
1 el pensamiento militar
1 el pensamiento militar1 el pensamiento militar
1 el pensamiento militararmando1957
 
Linked Open DataチャレンジJapanを中心としたLODの事例紹介
Linked Open DataチャレンジJapanを中心としたLODの事例紹介Linked Open DataチャレンジJapanを中心としたLODの事例紹介
Linked Open DataチャレンジJapanを中心としたLODの事例紹介Kouji Kozaki
 
カークパトリック4レベルと成功事例法を応用した医療教育・訓練
カークパトリック4レベルと成功事例法を応用した医療教育・訓練カークパトリック4レベルと成功事例法を応用した医療教育・訓練
カークパトリック4レベルと成功事例法を応用した医療教育・訓練Takahiro Matsumoto
 
3 guerras venezolanas
3 guerras venezolanas3 guerras venezolanas
3 guerras venezolanasarmando1957
 
Introduction to immunology
Introduction to immunologyIntroduction to immunology
Introduction to immunologyDr Alok Tripathi
 

Destaque (20)

Linked Open Dataによる博物館情報および地域情報の連携活用(じんもんこん2011)
Linked Open Dataによる博物館情報および地域情報の連携活用(じんもんこん2011)Linked Open Dataによる博物館情報および地域情報の連携活用(じんもんこん2011)
Linked Open Dataによる博物館情報および地域情報の連携活用(じんもんこん2011)
 
Blimey - Smart Privacy Controls
Blimey - Smart Privacy ControlsBlimey - Smart Privacy Controls
Blimey - Smart Privacy Controls
 
Vikrama Simha Audio Launch
Vikrama Simha Audio Launch Vikrama Simha Audio Launch
Vikrama Simha Audio Launch
 
Inglesiii
InglesiiiInglesiii
Inglesiii
 
Presentationmiriadax
PresentationmiriadaxPresentationmiriadax
Presentationmiriadax
 
resume 1
resume 1resume 1
resume 1
 
外科術後患者の発熱のマネージメント
外科術後患者の発熱のマネージメント外科術後患者の発熱のマネージメント
外科術後患者の発熱のマネージメント
 
90octane Overview
90octane Overview90octane Overview
90octane Overview
 
C:\fakepath\web 2.0
C:\fakepath\web 2.0C:\fakepath\web 2.0
C:\fakepath\web 2.0
 
ಮುಹರ್ರಮ್ ಒಂದು ಪವಿತ್ರ ಮಾಸ 2
ಮುಹರ್ರಮ್ ಒಂದು ಪವಿತ್ರ ಮಾಸ 2ಮುಹರ್ರಮ್ ಒಂದು ಪವಿತ್ರ ಮಾಸ 2
ಮುಹರ್ರಮ್ ಒಂದು ಪವಿತ್ರ ಮಾಸ 2
 
トーゴーの日2014ポスター
トーゴーの日2014ポスタートーゴーの日2014ポスター
トーゴーの日2014ポスター
 
News SA 47 2016
News SA 47 2016News SA 47 2016
News SA 47 2016
 
9 120614
9 1206149 120614
9 120614
 
Translated copy of ch15-16x
Translated copy of ch15-16xTranslated copy of ch15-16x
Translated copy of ch15-16x
 
Susan Siegel resume 2016
Susan Siegel resume 2016Susan Siegel resume 2016
Susan Siegel resume 2016
 
1 el pensamiento militar
1 el pensamiento militar1 el pensamiento militar
1 el pensamiento militar
 
Linked Open DataチャレンジJapanを中心としたLODの事例紹介
Linked Open DataチャレンジJapanを中心としたLODの事例紹介Linked Open DataチャレンジJapanを中心としたLODの事例紹介
Linked Open DataチャレンジJapanを中心としたLODの事例紹介
 
カークパトリック4レベルと成功事例法を応用した医療教育・訓練
カークパトリック4レベルと成功事例法を応用した医療教育・訓練カークパトリック4レベルと成功事例法を応用した医療教育・訓練
カークパトリック4レベルと成功事例法を応用した医療教育・訓練
 
3 guerras venezolanas
3 guerras venezolanas3 guerras venezolanas
3 guerras venezolanas
 
Introduction to immunology
Introduction to immunologyIntroduction to immunology
Introduction to immunology
 

Semelhante a Yokohama Art Spot meets SPARQL

Semantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLSemantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLJerven Bolleman
 
SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)andyseaborne
 
Semantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLSemantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLDaniel D.J. UM
 
RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031kwangsub kim
 
GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelabCAMELIA BOBAN
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011sesam4able
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011Robert Engels
 
Creating APIs over RDF
Creating APIs over RDFCreating APIs over RDF
Creating APIs over RDFLeigh Dodds
 
Creating APIs over RDF
Creating APIs over RDFCreating APIs over RDF
Creating APIs over RDFLeigh Dodds
 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic webMarakana Inc.
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLMyungjin Lee
 
Intro to Linked, Dutch Ships and Sailors and SPARQL handson
Intro to Linked, Dutch Ships and Sailors and SPARQL handson Intro to Linked, Dutch Ships and Sailors and SPARQL handson
Intro to Linked, Dutch Ships and Sailors and SPARQL handson Victor de Boer
 
SPARQLing Services
SPARQLing ServicesSPARQLing Services
SPARQLing ServicesLeigh Dodds
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebShamod Lacoul
 
SWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQLSWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQLMariano Rodriguez-Muro
 

Semelhante a Yokohama Art Spot meets SPARQL (20)

Semantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQLSemantic Variation Graphs the case for RDF & SPARQL
Semantic Variation Graphs the case for RDF & SPARQL
 
SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)SPARQL 1.1 Update (2013-03-05)
SPARQL 1.1 Update (2013-03-05)
 
Semantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQLSemantic Web(Web 3.0) SPARQL
Semantic Web(Web 3.0) SPARQL
 
RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031RDF Tutorial - SPARQL 20091031
RDF Tutorial - SPARQL 20091031
 
GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelab
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011
 
Sesam4 project presentation sparql - april 2011
Sesam4   project presentation sparql - april 2011Sesam4   project presentation sparql - april 2011
Sesam4 project presentation sparql - april 2011
 
Querying Linked Data
Querying Linked DataQuerying Linked Data
Querying Linked Data
 
Creating APIs over RDF
Creating APIs over RDFCreating APIs over RDF
Creating APIs over RDF
 
Creating APIs over RDF
Creating APIs over RDFCreating APIs over RDF
Creating APIs over RDF
 
A hands on overview of the semantic web
A hands on overview of the semantic webA hands on overview of the semantic web
A hands on overview of the semantic web
 
The Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQLThe Semantic Web #10 - SPARQL
The Semantic Web #10 - SPARQL
 
Intro to Linked, Dutch Ships and Sailors and SPARQL handson
Intro to Linked, Dutch Ships and Sailors and SPARQL handson Intro to Linked, Dutch Ships and Sailors and SPARQL handson
Intro to Linked, Dutch Ships and Sailors and SPARQL handson
 
Bio2RDF@BH2010
Bio2RDF@BH2010Bio2RDF@BH2010
Bio2RDF@BH2010
 
SPARQLing Services
SPARQLing ServicesSPARQLing Services
SPARQLing Services
 
A Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic WebA Hands On Overview Of The Semantic Web
A Hands On Overview Of The Semantic Web
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
Introduction to SPARQL
Introduction to SPARQLIntroduction to SPARQL
Introduction to SPARQL
 
SWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQLSWT Lecture Session 4 - SW architectures and SPARQL
SWT Lecture Session 4 - SW architectures and SPARQL
 
Data in RDF
Data in RDFData in RDF
Data in RDF
 

Último

Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfTechSoup
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 

Último (20)

Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdfInclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
Inclusivity Essentials_ Creating Accessible Websites for Nonprofits .pdf
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptxYOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
YOUVE_GOT_EMAIL_PRELIMS_EL_DORADO_2024.pptx
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 

Yokohama Art Spot meets SPARQL

  • 1. Yokohama Art Spot meets SPARQL 7/23/2011 LinkedData.jp
  • 2. ✦ ✦ twitter: @wintermelon ✦ 2011 4 ✦ ✦ LODAC ✦4 SPARQL
  • 3. LODAC (Linked Open Data for ACademia) ✦ http://lod.ac ✦ Web ✦ ✴ Linked Data(LOD) ✴ ✴ ✦ ✴ ✴ LODAC
  • 4. LODAC Museum ✦ ✴ LOD ✦ ✴ RDF ✴ ✴ LOD ✴ ✦ ✴ ✴ LODAC
  • 5. LODAC Museum ✦ ✴ ✴ ✴ ✴ DBpedia Lite ✴ 15 → 70 ✦ 13035604 ✦ SPARQL http://lod.ac/sparql
  • 6. Yokohama Art Spot ✦ http://lod.ac/apps/yas/ ✦ ✦ LODAC × LOD ✦ LODAC
  • 10. ID ✴ ✴ ✴ ✴ ✴ ✴
  • 11. Yokohama Art Spot q_spt = """ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax- ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dc: <http://purl.org/dc/terms/> PREFIX omgeo: <http://www.ontotext.com/owlim/geo#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX lodac: <http://lod.ac/ns/lodac#> PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> SELECT distinct ?link ?title ?lat ?long ?postalcode ? address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; dc:source <http://place.yafjp.org/rdf/>; vcard:postal-code ?postalcode; <http://ocdi.jp/ns/pi#address> ?address . OPTIONAL{ ?ref dc:abstract ?access . }
  • 12. Step1 q_spt = """ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax- ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dc: <http://purl.org/dc/terms/> PREFIX omgeo: <http://www.ontotext.com/owlim/geo#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX lodac: <http://lod.ac/ns/lodac#> PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> SELECT distinct ?link ?title ?lat ?long ?postalcode ? address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; dc:source <http://place.yafjp.org/rdf/>; vcard:postal-code ?postalcode; <http://ocdi.jp/ns/pi#address> ?address . OPTIONAL{ ?ref dc:abstract ?access . }
  • 13. Step2 & q_spt = """ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax- ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dc: <http://purl.org/dc/terms/> PREFIX omgeo: <http://www.ontotext.com/owlim/geo#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX lodac: <http://lod.ac/ns/lodac#> PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> SELECT distinct ?link ?title ?lat ?long ?postalcode ? address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; dc:source <http://place.yafjp.org/rdf/>; vcard:postal-code ?postalcode; <http://ocdi.jp/ns/pi#address> ?address . OPTIONAL{ ?ref dc:abstract ?access . } Python + SPARQLWrapper (http://sparql-wrapper.sourceforge.net/) from SPARQLWrapper import SPARQLWrapper, JSON sparql_wrapper = SPARQLWrapper(SPARQL URL) query = SPARQL sparql_wrapper.setQuery(query) sparql_wrapper.setReturnFormat(JSON) results = sparql_wrapper.query().convert() SPARQL
  • 14. Step2-1 q_spt = """ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dc: <http://purl.org/dc/terms/> PREFIX omgeo: <http://www.ontotext.com/owlim/geo#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX lodac: <http://lod.ac/ns/lodac#> PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; dc:source <http://place.yafjp.org/rdf/>; vcard:postal-code ?postalcode; <http://ocdi.jp/ns/pi#address> ?address . OPTIONAL{ ?ref dc:abstract ?access . } } """ % locals()
  • 15. PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dc: <http://purl.org/dc/terms/> PREFIX omgeo: <http://www.ontotext.com/owlim/geo#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX lodac: <http://lod.ac/ns/lodac#> PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> PREFIX ?link <http://purl.org/dc/terms/references> ?ref . ?link dc:references ?ref .
  • 16. q_spt = """ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dc: <http://purl.org/dc/terms/> PREFIX omgeo: <http://www.ontotext.com/owlim/geo#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX lodac: <http://lod.ac/ns/lodac#> PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; dc:source <http://place.yafjp.org/rdf/>; vcard:postal-code ?postalcode; <http://ocdi.jp/ns/pi#address> ?address . OPTIONAL{ ?ref dc:abstract ?access . } } """ % locals()
  • 17. SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access WHERE { ?link rdf:type foaf:Organization; ? rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; ? ? ? ; dc:source <http://place.yafjp.org/rdf/>; ? ? ; vcard:postal-code ?postalcode; <http://ocdi.jp/ns/pi#address> ?address ? ? . . OPTIONAL{ ?ref dc:abstract ?access . } }
  • 18. SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref SELECT . ?link URI ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; ?title geo:long ?long; ?lat dc:source <http://place.yafjp.org/rdf/>; vcard:postal-code ?postalcode; ?long <http://ocdi.jp/ns/pi#address> ?address ?postalcode . ?address OPTIONAL{ ?access ?ref dc:abstract ?access . } }
  • 19. SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; 1. dc:references ?ref ?link . ?ref omgeo:within(%(NE_lat)s %(NE_long)s2. ?link %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; ?title dc:source <http://place.yafjp.org/rdf/>; ?ref vcard:postal-code ?postalcode; <http://ocdi.jp/ns/pi#address> ?address ※ LODAC ?link . 1 ?ref OPTIONAL{ ?ref dc:abstract ?access ?ref . } } 3. ?ref
  • 20. LODAC 2 crm:P55_has_current_location dc:creator dc:references dc:references crm:P55_has_current_location crm:P55_has_current_location dc:references dc:references dc:creator dc:creator dc:references dc:references URI URI
  • 21. LODAC 2 crm:P55_has_current_location dc:creator dc:references dc:references crm:P55_has_current_location crm:P55_has_current_location dc:references dc:references dc:creator dc:creator dc:references dc:references URI URI
  • 22. SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; dc:source <http://place.yafjp.org/rdf/>; vcard:postal-code ?postalcode; GET <http://ocdi.jp/ns/pi#address> ?address . ?ref OPTIONAL{ ?ref dc:abstract ?access . } }
  • 23. omgeo? ✦ ?ref ?ref geo:lat ?lat; geo:long ?long. FILTER(?lat < 35.432916 && ?lat > 35.475012 && ?long < 139.608699 && ?long > 139.652644) ✦ omgeo 1 ?ref omgeo:within(35.475012 139.652644 35.439216 139.608699). ✴ OWLIM virtuoso ✴ ●●km
  • 24. SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; dc:source <http://place.yafjp.org/rdf/>; vcard:postal-code ?postalcode; <http://ocdi.jp/ns/pi#address> ?address . OPTIONAL{ ?ref dc:abstract ?access <http://place.yafjp.org/rdf/> . } } ?lat ?postalcode ?long ?address
  • 25. SELECT distinct ?link ?title ?lat ?long ?postalcode ?address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; dc:source <http://place.yafjp.org/rdf/>;dc:abstract ?ref vcard:postal-code ?postalcode; ?access <http://ocdi.jp/ns/pi#address> ?address . OPTIONAL OPTIONAL{ ?ref dc:abstract ?access . } }
  • 26. SPARQL JSON {"spt": {"head": {"vars": ["link", "title", "lat", "long", "postalcode", "address", "access"]}, "results": {"bindings": [{"title": {"xml:lang": "ja", "type": "literal", "value": "u6a2au6d5cu7f8eu8853u9928"}, "long": {"datatype": "http://www.w3.org/2001/XMLSchema#float", "type": "typed-literal", "value": "139.63044"}, "access": {"type": "literal", "value": "u685cu6728u753a u99c5(JR)u4e0bu8ecau3001u52d5u304f u6b69u9053u3092u5229u7528u5f92u6b6910u5206u3002u307fu306au3068u307f u3089u3044u99c5(u307fu306au3068u307fu3089u3044u7dda)u4e0bu8eca u3001u300cu7f8eu8853u9928u53e3u300du3092u51fa u3066u5f92u6b693u5206u3002"}, "postalcode": {"type": "literal", "value": "220-0012"}, "link": {"type": "uri", "value": "http://lod.ac/id/3172"}, "address": {"xml:lang": "ja", "type": "literal", "value": "u6a2au6d5c u5e02u897fu533au307fu306au3068u307fu3089u30443u4e01u76ee4-1"}, "lat": {"datatype": "http://www.w3.org/2001/XMLSchema#float", "type": "typed-literal", "value": "35.45722"}}, {"title": {"xml:lang": "ja", "type": "literal", "value": "u307fu306au3068u307fu3089u3044u30aeu30e3u30e9u30eau30fc"}, "long": {"datatype": "http://www.w3.org/2001/XMLSchema#float", "type": "typed-literal", "value": "139.6341"}, "postalcode": {"type": "literal", "value": "220-0012"}, "link": {"type": "uri", "value": "http://lod.ac/id/530977"}, "address": {"xml:lang": "ja", "type": "literal", "value": "u795eu5948u5dddu770cu6a2a u6d5cu5e02u897fu533au307fu306au3068u307fu3089u30442u4e01u76ee3-5"}, "lat": {"datatype": "http://www.w3.org/2001/XMLSchema#float", "type": "typed- …
  • 27. SPARQL
  • 28. Step2-2 ✦ ?link ?link ical:dtstart ?dtstart ; ical:dtend ?dtend . FILTER ( (?dtstart > "%(dtstart)s"^^xsd:dateTime && ?dtstart < "%(dtend)s"^^xsd:dateTime) || (?dtend > "%(dtstart)s"^^xsd:dateTime && ?dtend < "%(dtend)s"^^xsd:dateTime) || (?dtstart < "%(dtstart)s"^^xsd:dateTime && ?dtend > "%(dtend)s"^^xsd:dateTime) ) ✦ … dateTime FILTER 0 Sesame
  • 29. Step3 q_spt = """ PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax- ns#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> PREFIX dc: <http://purl.org/dc/terms/> PREFIX omgeo: <http://www.ontotext.com/owlim/geo#> PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> PREFIX lodac: <http://lod.ac/ns/lodac#> PREFIX vcard: <http://www.w3.org/2006/vcard/ns#> SELECT distinct ?link ?title ?lat ?long ?postalcode ? address ?access WHERE { ?link rdf:type foaf:Organization; rdfs:label ?title; dc:references ?ref . ?ref omgeo:within(%(NE_lat)s %(NE_long)s %(SW_lat)s %(SW_long)s); geo:lat ?lat; geo:long ?long; dc:source <http://place.yafjp.org/rdf/>; vcard:postal-code ?postalcode; <http://ocdi.jp/ns/pi#address> ?address . OPTIONAL{ ?ref dc:abstract ?access . } 1. 1 2. JSON 3. JSON ✦ or ON/OFF ✦
  • 30. SPARQL LOD ✦ omgeo:within ✦ Semantic Media Wiki → Wiki SPARQL ✦ DBpedia GeoNames ✦ dc:created 1990 [1980] 1990 c. 1990 1980-90 55