SlideShare una empresa de Scribd logo
1 de 41
PUBLICANDO RDF
        Y LINKED DATA
       CON LODSPEAKR


Alvaro Graves - alvaro@graves - @alvarograves

Tetherless World Constellation -Rensselaer Polytechnic Institute
AGENDA
• Cómo      publicar datos en la Web?

• Qué     es Linked Data ...

 • ...y   porqué me debería importar?

• Publicando    datos con LODSPeaKr

• Trabajo    futuro

• Conclusiones
CÓMO PUBLICAMOS DATOS?
•   Subir archivos a un servidor WWW o FTP

    •   Fácil de publicar

    •   Difícil de encontrar o usar

•   Exportar página HTML

    •   Fácil de publicar y encontrar

    •   Difícil de usar

•   Publicar como Linked Data

    •   No tan fácil de publicar

    •   Fácil de usar y encontrar
¿QUÉ ES LINKED DATA?
• Setof best practices (based on Semantic Web technologies)
 to publish structured data on the Web

  • Use   of Web technologies (RDF, HTTP, URIs)

  • Connect   my data to other people’s data by links
¿QUÉ ES LINKED DATA? (2)



http://logd.tw.rpi.edu/id/us/state/New_York            rdfs:label   New York




                                   dcterms:identifier
                                                                      NY
¿QUÉ ES LINKED DATA? (2)
                                                                                                                                         http://www.ny.gov

                                                                                                     foaf:homepage

                                                       http://dbpedia.org/resource/New_York

                      owl:sameAs
                                                                                              dbpedia-owl:capital


                                                                                                                    http://dbpedia.org/resource/Albany,_New_York
http://logd.tw.rpi.edu/id/us/state/New_York                 rdfs:label            New York




                                   dcterms:identifier
                                                                                     NY
¿QUÉ ES LINKED DATA? (3)

• Cuando se intenta traer una URI, es necesario proveer
 información en
  •   HTML para humanos

  •   RDF para máquinas

• Enlazar
       a otras URIs relevantes (idealmente en otros datasets)
 de manera que la gente pueda descubrir más datos
¿CUÁL ES LA GRACIA?
• LOD hace más fácil accesar datos por aplicaciones
 (mecanismos estándares)

• “Breaks     the walls of data silos”, una Web de Datos

• Facilita   el descubrimiento de datos

• Facilita   la integración
DE LOS DATOS A APLICACIONES




                                                                                         fm:farmersMarket_4239 a fm:FarmersMarket ;
                                                                                                               con:address implicit_address:address_4239 ;
                                                                                                               dcterms:title "Troy Neighborhood Farmers Market - Downtown" ;
                                                                                                               wgs:lat "-73.68599"^^xsd:decimal ;
 State            Name               Address City Zipcode Lat Long
                                                                                                               wgs:long "42.73168"^^xsd:decimal ;

           Troy Neighborhood                                                                                   ov:csvRow "4239"^^xsd:integer .
New York   Farmers Market -         6th Ave          Troy    12180    -73.686 42.73168
           Downtown
                                                                                         fm:farmersMarket_4243 a fm:FarmersMarket ;
                                    The                                                                         con:address implicit_address:address_4243 ;
           Troy Neighborhood        MarketPlace, Hill                                                            dcterms:title "Troy Waterfront Farmers Market" ;
New York   Farmers Market- Little   Street, btw       Troy   12181   -73.6898 42.72478
           Italy                    Washington &                                                                wgs:lat "-73.68942"^^xsd:decimal ;
                                    Liberty Sts.                                                                wgs:long "42.73491"^^xsd:decimal ;
                                                                                                                ov:csvRow "4243"^^xsd:integer .




 Data                                                                                    Conversion
                                                                                                                                                                               Publication     Publication
Creation                                                                                  to RDF
                                                                                                                                                                                              Enhancements

                                                                                                                                                                                             LODSPeaKr
EJEMPLO: FARMERS MARKETS




   State            Name               Address          City Zipcode Lat        Long

             Troy Neighborhood
  New York   Farmers Market -         6th Ave          Troy    12180    -73.686 42.73168
             Downtown

                                      The
             Troy Neighborhood        MarketPlace, Hill
  New York   Farmers Market- Little   Street, btw       Troy   12181   -73.6898 42.72478
             Italy                    Washington &
                                      Liberty Sts.
Example: Data about Farmers Markets
           State             Name                 Address             City Zipcode    Lat        Long
                     Troy Neighborhood
          New York   Farmers Market -           6th Ave              Troy   12180    -73.68599   42.73168
                     Downtown


                                                  The MarketPlace,
                     Troy Neighborhood            Hill Street, btw
          New York                                                   Troy   12181    -73.68983   42.72478
                     Farmers Market- Little Italy Washington &
                                                  Liberty Sts.


     fm:farmersMarket_4239       a fm:FarmersMarket ;
                                 con:address implicit_address:address_4239 ;
                                 dcterms:title "Troy Neighborhood Farmers Market - Downtown" ;
                                 wgs:lat "-73.68599"^^xsd:decimal ;
                                 wgs:long "42.73168"^^xsd:decimal ;
                                 ov:csvRow "4239"^^xsd:integer .


     fm:farmersMarket_4243       a fm:FarmersMarket ;
                                     con:address implicit_address:address_4243 ;
                               dcterms:title "Troy Waterfront Farmers Market" ;
                                     wgs:lat "-73.68942"^^xsd:decimal ;
                                     wgs:long "42.73491"^^xsd:decimal ;
                                     ov:csvRow "4243"^^xsd:integer .




Buena idea: Subirlo a un triple store. Siguiente paso?
LODSPeaKr
Simple kit for Publishing Linked Open Data
LODSPeaKr
• Sitio   funcional en 1 minuto

• Publicar
        en varios formatos
  (RDF/XML, Turtle,
  RDFJSON, etc.)

• Altamente configurable
  (usando Haanga)

• Facilita   la exploración de
  datos
INSTALACIÓN
Redirección 303 en LODSPeaKr

                                  GET http://example.org/resource
                                 HTTP Accept: application/rdf+xml




• Los  datos dan forma
                                       HTTP Status: 303 See Other
                                Location: http://example.org/resource.rdf   LODSPeaKr



 al sitio
                                 GET http://example.org/resource.rdf
                                  HTTP Accept: application/rdf+xml


• AplicacionesLOD        User


 debiesen ser data-                 http://example.org/resource.rdf
                                  Content-type: application/rdf+xml


 céntricas


                                                                            Triple Store
Instalación básica de LODSPeaKr
http://graves.cl/farmersmarket/version/2010-Oct-22/farmersMarket_4243
...Y los datos?
$ curl http://graves.cl/farmersmarket/version/2010-Oct-22/farmersMarket_4239.rdf

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:ns0="http://purl.org/dc/terms/"
  xmlns:ns1="http://www.w3.org/2000/10/swap/pim/contact#"
  xmlns:ns2="http://www.w3.org/2003/01/geo/wgs84_pos#"
  xmlns:ns3="http://open.vocab.org/terms/">

  <rdf:Description rdf:about="http://graves.cl/farmersmarket/version/2010-Oct-22/
farmersMarket_4239">
    <ns0:isReferencedBy rdf:resource="http://graves.cl/farmersmarket/version/2010-Oct-22"/>
    <rdf:type rdf:resource="http://graves.cl/farmersmarket/vocab/FarmersMarket"/>
    <ns1:address rdf:resource="http://graves.cl/farmersmarket/version/2010-Oct-22/
http_www_w3_org_2000_10_swap_pim_contact_address/address_4239"/>
    <ns0:title>Troy Neighborhood Farmers Market - Downtown</ns0:title>
    <ns2:lat rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">-73.68599</ns2:lat>
    <ns2:long rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">42.73168</ns2:long>
    <ns3:csvRow rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">4239.0</ns3:csvRow>
  </rdf:Description>

</rdf:RDF>




             Data disponibles como RDFJSON, RDF/XML,
                        N-Triples y N3/Turtle
USO BÁSICO
LODSPeaKr   Triple Store




       Give me info
          about
http://example.org/john




              Client
What is
                            http://example.org/john ?




                LODSPeaKr                               Triple Store




       Give me info
          about
http://example.org/john




              Client
What is
                             http://example.org/john ?




                            http://example.org/john
                                  is a foaf:Person




                LODSPeaKr                                Triple Store




       Give me info
          about
http://example.org/john




              Client
What is
                             http://example.org/john ?




                            http://example.org/john
                                  is a foaf:Person




                                     QUERY FOR
                LODSPeaKr            foaf:Person         Triple Store




       Give me info
          about
http://example.org/john




              Client
What is
                                     http://example.org/john ?




                                    http://example.org/john
                                          is a foaf:Person




                                             QUERY FOR
                LODSPeaKr                    foaf:Person         Triple Store



                                                DATA

       Give me info
          about
http://example.org/john



                              Person
                             {{name}}
                          {{lastName}}




              Client
RECUPERAR DESDE
FUENTES MÚLTIPLES
Query for foaf:Person




                LODSPeaKr                           Triple Store




                                   DATA
       Give me info
          about
http://example.org/john




              Client
Query for foaf:Person




                                     http://example.org/john
                LODSPeaKr                  owl:sameAs Triple Store
                                   http://logd.tw.rpi.edu/john



                                   DATA
       Give me info
          about
http://example.org/john




              Client
LODSPeaKr                              Triple Store


                                           QUERY FOR
                                   http://logd.tw.rpi.edu/john
                            DATA
       Give me info
          about
http://example.org/john




                                                          LOGD




              Client
QUERY FOR
                              http://logd.tw.rpi.edu/john
                             http://logd.tw.rpi.edu/john
                                          owl:sameAs
                LODSPeaKr                                Triple Store
                            http://dbpedia.org/resource/john



                              DATA
       Give me info
          about
http://example.org/john




                                                             LOGD




              Client
LODSPeaKr                                      Triple Store


                                      QUERY FOR
                            http://dbpedia/org/resource/john

       Give me info
          about
http://example.org/john
                               DATA


                                                                 LOGD




              Client                                            DBpedia
LODSPeaKr                     Triple Store




       Give me info
          about
http://example.org/john


                            LOCAL   DBPEDIA
                                                LOGD

                                LOGD




              Client                           DBpedia
CREACIÓN DE WORKFLOWS

                  Endpoint A      Endpoint C
                                                   Endpoint F



    LODSPeaKr




                     Endpoint B
                                               Endpoint D




     Final Page
USING INFORMATION
   FROM DBPEDIA
SPECIAL URLs




• Documentos     que agregan información de varios recursos

• Por   defecto, URLs para clases disponibles e instancias de una clase

• Se   pueden crear nuevas URLs especiales
ESTRUCTURA BÁSICA
                                                                     LODSPeaKr

                    GET http://example.org/resource.rdf
                     HTTP Accept: application/rdf+xml




•3   Directorios      http://example.org/resource.rdf
                    Content-type: application/rdf+xml




 • Models
                                             <http://example.org/resource.rdf> rdf:type xyz:Class



                                                        <html>

 • Views
                                                                            SELECT ?s ?p ?o
                                                           <head>           WHERE{
                                                           </head>          ?s ?p ?o
                                                           <body>           }
                                                                            LIMIT 10
                                                        ….



 • Static
                                                   xyz:Class.view.rdf     xyz:Class.modelrdf
MODELS
• Archivo   (CURIE de clase) con consulta SPARQL

• Directorio   (CURIE de clase) donde dentro:

  • Archivo    con consulta SPARQL (cualquier nombre)

  • Directorio   (nombre SPARQL endpoint) con más consultas
   SPARQL

       SELECT ?s2 ?p2 ?s1 ?p1 WHERE {
               {
                       <{{uri}}> ?s1 ?p1 .
               }UNION{
                       ?s2 ?p2 <{{uri}}> .
               }
       }
VIEWS
                     (TEMPLATES DE HAANGA)

<table>
    {% for row in r %}
      {% if row.s1%}
      <tr>
        <td><a href='{{row.s1.value}}'>{{row.s1.curie}}</a></td>

         {% if row.p1.uri == 1 %}
         <td><a rel='{{row.s1.curie}}'
href='{{row.p1.value}}'>{{row.p1.curie}}</a></td>
         {% else %}
         <td><span property='{{row.s1.curie}}'>{{row.p1.value}}</
span></td>
         {% endif %}
         </tr>
      {% endif %}
    {% endfor %}
</table>
MODELS REVISITED
PREFIX owl:     <http://www.w3.org/2002/07/owl#>
PREFIX dbpedia: <http://dbpedia.org/resource/>

SELECT ?anotherUri WHERE{
  {%for row in r.details%}
    {%if forloop.first%}
  <{{row.state.value}}>
    {%endif%}
  {%endfor%}
           owl:sameAs ?anotherUri .
  FILTER(regex(str(?anotherUri),"http://dbpedia.org"))
}

          Valor se puede acceder como
   r.sameas.anotherUri.[value|curie]
FUTURO
• Más   azúcar sintáctico (ej. para primer/únicos valores)

• Agregar    la “C” en el MVC

  • Un   Framework para LODapps

  • No   sólo aplicaciones Read-only, sino Read/Write

• Replicar   aplicaciones (experimental)

  • Fork   de aplicación en vivo

  • Tracear   genealogía (bene gesserit)
CONCLUSIONES
• LODSPeaKr    hace fácil y rápida la publicación de Linked Data

• Es
   posible crear diversas aplicaciones usando Linked Open
 Data

  • Open   Data Portals

  • Machine-readable APIs

  • Mobile   webapps
LODSpeaKr
     http://lodspeakr.org

        Farmers Market
http://graves.cl/farmersmarket

      alvaro@graves.cl
       @alvarograves

Más contenido relacionado

Más de Alvaro Graves

Democratizing Open Data
Democratizing Open DataDemocratizing Open Data
Democratizing Open DataAlvaro Graves
 
Creating visualizations using Linked Data
Creating visualizations using Linked DataCreating visualizations using Linked Data
Creating visualizations using Linked DataAlvaro Graves
 
Creating Visualizations with Linked Open Data
Creating Visualizations with Linked Open DataCreating Visualizations with Linked Open Data
Creating Visualizations with Linked Open DataAlvaro Graves
 
Visualizations using Visualbox
Visualizations using VisualboxVisualizations using Visualbox
Visualizations using VisualboxAlvaro Graves
 
Como crear aplicaciones basadas en linked data usando lods pea kr
Como crear aplicaciones basadas en linked data usando lods pea krComo crear aplicaciones basadas en linked data usando lods pea kr
Como crear aplicaciones basadas en linked data usando lods pea krAlvaro Graves
 
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open DataExplotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open DataAlvaro Graves
 
Publishing Linked Data with LODSPeaKr
Publishing Linked Data with LODSPeaKrPublishing Linked Data with LODSPeaKr
Publishing Linked Data with LODSPeaKrAlvaro Graves
 
Open Data y participación ciudadana
Open Data y participación ciudadanaOpen Data y participación ciudadana
Open Data y participación ciudadanaAlvaro Graves
 
Web semántica y linked data la web como bd
Web semántica y linked data  la web como bdWeb semántica y linked data  la web como bd
Web semántica y linked data la web como bdAlvaro Graves
 
LODSPeaKr - Use cases Lighting Talk
LODSPeaKr - Use cases Lighting TalkLODSPeaKr - Use cases Lighting Talk
LODSPeaKr - Use cases Lighting TalkAlvaro Graves
 
Publishing Linked Open Data in 15 minutes
Publishing Linked Open Data in 15 minutesPublishing Linked Open Data in 15 minutes
Publishing Linked Open Data in 15 minutesAlvaro Graves
 
TWC LOGD: A Portal for Linking Government Data
TWC LOGD: A Portal for Linking Government DataTWC LOGD: A Portal for Linking Government Data
TWC LOGD: A Portal for Linking Government DataAlvaro Graves
 
POMELo: A PML Online Editor
POMELo: A PML Online EditorPOMELo: A PML Online Editor
POMELo: A PML Online EditorAlvaro Graves
 
Towards a better understanding of Social Machines
Towards a better understanding of Social MachinesTowards a better understanding of Social Machines
Towards a better understanding of Social MachinesAlvaro Graves
 

Más de Alvaro Graves (14)

Democratizing Open Data
Democratizing Open DataDemocratizing Open Data
Democratizing Open Data
 
Creating visualizations using Linked Data
Creating visualizations using Linked DataCreating visualizations using Linked Data
Creating visualizations using Linked Data
 
Creating Visualizations with Linked Open Data
Creating Visualizations with Linked Open DataCreating Visualizations with Linked Open Data
Creating Visualizations with Linked Open Data
 
Visualizations using Visualbox
Visualizations using VisualboxVisualizations using Visualbox
Visualizations using Visualbox
 
Como crear aplicaciones basadas en linked data usando lods pea kr
Como crear aplicaciones basadas en linked data usando lods pea krComo crear aplicaciones basadas en linked data usando lods pea kr
Como crear aplicaciones basadas en linked data usando lods pea kr
 
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open DataExplotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
Explotando la Web de Datos: Como crear aplicaciones usando Linked Open Data
 
Publishing Linked Data with LODSPeaKr
Publishing Linked Data with LODSPeaKrPublishing Linked Data with LODSPeaKr
Publishing Linked Data with LODSPeaKr
 
Open Data y participación ciudadana
Open Data y participación ciudadanaOpen Data y participación ciudadana
Open Data y participación ciudadana
 
Web semántica y linked data la web como bd
Web semántica y linked data  la web como bdWeb semántica y linked data  la web como bd
Web semántica y linked data la web como bd
 
LODSPeaKr - Use cases Lighting Talk
LODSPeaKr - Use cases Lighting TalkLODSPeaKr - Use cases Lighting Talk
LODSPeaKr - Use cases Lighting Talk
 
Publishing Linked Open Data in 15 minutes
Publishing Linked Open Data in 15 minutesPublishing Linked Open Data in 15 minutes
Publishing Linked Open Data in 15 minutes
 
TWC LOGD: A Portal for Linking Government Data
TWC LOGD: A Portal for Linking Government DataTWC LOGD: A Portal for Linking Government Data
TWC LOGD: A Portal for Linking Government Data
 
POMELo: A PML Online Editor
POMELo: A PML Online EditorPOMELo: A PML Online Editor
POMELo: A PML Online Editor
 
Towards a better understanding of Social Machines
Towards a better understanding of Social MachinesTowards a better understanding of Social Machines
Towards a better understanding of Social Machines
 

Último

PROYECTO FINAL. Tutorial para publicar en SlideShare.pptx
PROYECTO FINAL. Tutorial para publicar en SlideShare.pptxPROYECTO FINAL. Tutorial para publicar en SlideShare.pptx
PROYECTO FINAL. Tutorial para publicar en SlideShare.pptxAlan779941
 
How to use Redis with MuleSoft. A quick start presentation.
How to use Redis with MuleSoft. A quick start presentation.How to use Redis with MuleSoft. A quick start presentation.
How to use Redis with MuleSoft. A quick start presentation.FlorenciaCattelani
 
Innovaciones tecnologicas en el siglo 21
Innovaciones tecnologicas en el siglo 21Innovaciones tecnologicas en el siglo 21
Innovaciones tecnologicas en el siglo 21mariacbr99
 
Avances tecnológicos del siglo XXI 10-07 eyvana
Avances tecnológicos del siglo XXI 10-07 eyvanaAvances tecnológicos del siglo XXI 10-07 eyvana
Avances tecnológicos del siglo XXI 10-07 eyvanamcerpam
 
EVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptx
EVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptxEVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptx
EVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptxJorgeParada26
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITMaricarmen Sánchez Ruiz
 
Modulo-Mini Cargador.................pdf
Modulo-Mini Cargador.................pdfModulo-Mini Cargador.................pdf
Modulo-Mini Cargador.................pdfAnnimoUno1
 
EL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptx
EL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptxEL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptx
EL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptxMiguelAtencio10
 
Refrigerador_Inverter_Samsung_Curso_y_Manual_de_Servicio_Español.pdf
Refrigerador_Inverter_Samsung_Curso_y_Manual_de_Servicio_Español.pdfRefrigerador_Inverter_Samsung_Curso_y_Manual_de_Servicio_Español.pdf
Refrigerador_Inverter_Samsung_Curso_y_Manual_de_Servicio_Español.pdfvladimiroflores1
 
Avances tecnológicos del siglo XXI y ejemplos de estos
Avances tecnológicos del siglo XXI y ejemplos de estosAvances tecnológicos del siglo XXI y ejemplos de estos
Avances tecnológicos del siglo XXI y ejemplos de estossgonzalezp1
 
Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...
Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...
Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...JohnRamos830530
 

Último (11)

PROYECTO FINAL. Tutorial para publicar en SlideShare.pptx
PROYECTO FINAL. Tutorial para publicar en SlideShare.pptxPROYECTO FINAL. Tutorial para publicar en SlideShare.pptx
PROYECTO FINAL. Tutorial para publicar en SlideShare.pptx
 
How to use Redis with MuleSoft. A quick start presentation.
How to use Redis with MuleSoft. A quick start presentation.How to use Redis with MuleSoft. A quick start presentation.
How to use Redis with MuleSoft. A quick start presentation.
 
Innovaciones tecnologicas en el siglo 21
Innovaciones tecnologicas en el siglo 21Innovaciones tecnologicas en el siglo 21
Innovaciones tecnologicas en el siglo 21
 
Avances tecnológicos del siglo XXI 10-07 eyvana
Avances tecnológicos del siglo XXI 10-07 eyvanaAvances tecnológicos del siglo XXI 10-07 eyvana
Avances tecnológicos del siglo XXI 10-07 eyvana
 
EVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptx
EVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptxEVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptx
EVOLUCION DE LA TECNOLOGIA Y SUS ASPECTOSpptx
 
pruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNITpruebas unitarias unitarias en java con JUNIT
pruebas unitarias unitarias en java con JUNIT
 
Modulo-Mini Cargador.................pdf
Modulo-Mini Cargador.................pdfModulo-Mini Cargador.................pdf
Modulo-Mini Cargador.................pdf
 
EL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptx
EL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptxEL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptx
EL CICLO PRÁCTICO DE UN MOTOR DE CUATRO TIEMPOS.pptx
 
Refrigerador_Inverter_Samsung_Curso_y_Manual_de_Servicio_Español.pdf
Refrigerador_Inverter_Samsung_Curso_y_Manual_de_Servicio_Español.pdfRefrigerador_Inverter_Samsung_Curso_y_Manual_de_Servicio_Español.pdf
Refrigerador_Inverter_Samsung_Curso_y_Manual_de_Servicio_Español.pdf
 
Avances tecnológicos del siglo XXI y ejemplos de estos
Avances tecnológicos del siglo XXI y ejemplos de estosAvances tecnológicos del siglo XXI y ejemplos de estos
Avances tecnológicos del siglo XXI y ejemplos de estos
 
Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...
Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...
Resistencia extrema al cobre por un consorcio bacteriano conformado por Sulfo...
 

Publicando RDF y Linked Data con LODSPeaKr

  • 1. PUBLICANDO RDF Y LINKED DATA CON LODSPEAKR Alvaro Graves - alvaro@graves - @alvarograves Tetherless World Constellation -Rensselaer Polytechnic Institute
  • 2. AGENDA • Cómo publicar datos en la Web? • Qué es Linked Data ... • ...y porqué me debería importar? • Publicando datos con LODSPeaKr • Trabajo futuro • Conclusiones
  • 3. CÓMO PUBLICAMOS DATOS? • Subir archivos a un servidor WWW o FTP • Fácil de publicar • Difícil de encontrar o usar • Exportar página HTML • Fácil de publicar y encontrar • Difícil de usar • Publicar como Linked Data • No tan fácil de publicar • Fácil de usar y encontrar
  • 4. ¿QUÉ ES LINKED DATA? • Setof best practices (based on Semantic Web technologies) to publish structured data on the Web • Use of Web technologies (RDF, HTTP, URIs) • Connect my data to other people’s data by links
  • 5. ¿QUÉ ES LINKED DATA? (2) http://logd.tw.rpi.edu/id/us/state/New_York rdfs:label New York dcterms:identifier NY
  • 6. ¿QUÉ ES LINKED DATA? (2) http://www.ny.gov foaf:homepage http://dbpedia.org/resource/New_York owl:sameAs dbpedia-owl:capital http://dbpedia.org/resource/Albany,_New_York http://logd.tw.rpi.edu/id/us/state/New_York rdfs:label New York dcterms:identifier NY
  • 7. ¿QUÉ ES LINKED DATA? (3) • Cuando se intenta traer una URI, es necesario proveer información en • HTML para humanos • RDF para máquinas • Enlazar a otras URIs relevantes (idealmente en otros datasets) de manera que la gente pueda descubrir más datos
  • 8. ¿CUÁL ES LA GRACIA? • LOD hace más fácil accesar datos por aplicaciones (mecanismos estándares) • “Breaks the walls of data silos”, una Web de Datos • Facilita el descubrimiento de datos • Facilita la integración
  • 9. DE LOS DATOS A APLICACIONES fm:farmersMarket_4239 a fm:FarmersMarket ; con:address implicit_address:address_4239 ; dcterms:title "Troy Neighborhood Farmers Market - Downtown" ; wgs:lat "-73.68599"^^xsd:decimal ; State Name Address City Zipcode Lat Long wgs:long "42.73168"^^xsd:decimal ; Troy Neighborhood ov:csvRow "4239"^^xsd:integer . New York Farmers Market - 6th Ave Troy 12180 -73.686 42.73168 Downtown fm:farmersMarket_4243 a fm:FarmersMarket ; The con:address implicit_address:address_4243 ; Troy Neighborhood MarketPlace, Hill dcterms:title "Troy Waterfront Farmers Market" ; New York Farmers Market- Little Street, btw Troy 12181 -73.6898 42.72478 Italy Washington & wgs:lat "-73.68942"^^xsd:decimal ; Liberty Sts. wgs:long "42.73491"^^xsd:decimal ; ov:csvRow "4243"^^xsd:integer . Data Conversion Publication Publication Creation to RDF Enhancements LODSPeaKr
  • 10. EJEMPLO: FARMERS MARKETS State Name Address City Zipcode Lat Long Troy Neighborhood New York Farmers Market - 6th Ave Troy 12180 -73.686 42.73168 Downtown The Troy Neighborhood MarketPlace, Hill New York Farmers Market- Little Street, btw Troy 12181 -73.6898 42.72478 Italy Washington & Liberty Sts.
  • 11. Example: Data about Farmers Markets State Name Address City Zipcode Lat Long Troy Neighborhood New York Farmers Market - 6th Ave Troy 12180 -73.68599 42.73168 Downtown The MarketPlace, Troy Neighborhood Hill Street, btw New York Troy 12181 -73.68983 42.72478 Farmers Market- Little Italy Washington & Liberty Sts. fm:farmersMarket_4239 a fm:FarmersMarket ; con:address implicit_address:address_4239 ; dcterms:title "Troy Neighborhood Farmers Market - Downtown" ; wgs:lat "-73.68599"^^xsd:decimal ; wgs:long "42.73168"^^xsd:decimal ; ov:csvRow "4239"^^xsd:integer . fm:farmersMarket_4243 a fm:FarmersMarket ; con:address implicit_address:address_4243 ; dcterms:title "Troy Waterfront Farmers Market" ; wgs:lat "-73.68942"^^xsd:decimal ; wgs:long "42.73491"^^xsd:decimal ; ov:csvRow "4243"^^xsd:integer . Buena idea: Subirlo a un triple store. Siguiente paso?
  • 12. LODSPeaKr Simple kit for Publishing Linked Open Data
  • 13. LODSPeaKr • Sitio funcional en 1 minuto • Publicar en varios formatos (RDF/XML, Turtle, RDFJSON, etc.) • Altamente configurable (usando Haanga) • Facilita la exploración de datos
  • 15. Redirección 303 en LODSPeaKr GET http://example.org/resource HTTP Accept: application/rdf+xml • Los datos dan forma HTTP Status: 303 See Other Location: http://example.org/resource.rdf LODSPeaKr al sitio GET http://example.org/resource.rdf HTTP Accept: application/rdf+xml • AplicacionesLOD User debiesen ser data- http://example.org/resource.rdf Content-type: application/rdf+xml céntricas Triple Store
  • 18. ...Y los datos? $ curl http://graves.cl/farmersmarket/version/2010-Oct-22/farmersMarket_4239.rdf <?xml version="1.0" encoding="UTF-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:ns0="http://purl.org/dc/terms/" xmlns:ns1="http://www.w3.org/2000/10/swap/pim/contact#" xmlns:ns2="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:ns3="http://open.vocab.org/terms/"> <rdf:Description rdf:about="http://graves.cl/farmersmarket/version/2010-Oct-22/ farmersMarket_4239"> <ns0:isReferencedBy rdf:resource="http://graves.cl/farmersmarket/version/2010-Oct-22"/> <rdf:type rdf:resource="http://graves.cl/farmersmarket/vocab/FarmersMarket"/> <ns1:address rdf:resource="http://graves.cl/farmersmarket/version/2010-Oct-22/ http_www_w3_org_2000_10_swap_pim_contact_address/address_4239"/> <ns0:title>Troy Neighborhood Farmers Market - Downtown</ns0:title> <ns2:lat rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">-73.68599</ns2:lat> <ns2:long rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">42.73168</ns2:long> <ns3:csvRow rdf:datatype="http://www.w3.org/2001/XMLSchema#decimal">4239.0</ns3:csvRow> </rdf:Description> </rdf:RDF> Data disponibles como RDFJSON, RDF/XML, N-Triples y N3/Turtle
  • 20. LODSPeaKr Triple Store Give me info about http://example.org/john Client
  • 21. What is http://example.org/john ? LODSPeaKr Triple Store Give me info about http://example.org/john Client
  • 22. What is http://example.org/john ? http://example.org/john is a foaf:Person LODSPeaKr Triple Store Give me info about http://example.org/john Client
  • 23. What is http://example.org/john ? http://example.org/john is a foaf:Person QUERY FOR LODSPeaKr foaf:Person Triple Store Give me info about http://example.org/john Client
  • 24. What is http://example.org/john ? http://example.org/john is a foaf:Person QUERY FOR LODSPeaKr foaf:Person Triple Store DATA Give me info about http://example.org/john Person {{name}} {{lastName}} Client
  • 26. Query for foaf:Person LODSPeaKr Triple Store DATA Give me info about http://example.org/john Client
  • 27. Query for foaf:Person http://example.org/john LODSPeaKr owl:sameAs Triple Store http://logd.tw.rpi.edu/john DATA Give me info about http://example.org/john Client
  • 28. LODSPeaKr Triple Store QUERY FOR http://logd.tw.rpi.edu/john DATA Give me info about http://example.org/john LOGD Client
  • 29. QUERY FOR http://logd.tw.rpi.edu/john http://logd.tw.rpi.edu/john owl:sameAs LODSPeaKr Triple Store http://dbpedia.org/resource/john DATA Give me info about http://example.org/john LOGD Client
  • 30. LODSPeaKr Triple Store QUERY FOR http://dbpedia/org/resource/john Give me info about http://example.org/john DATA LOGD Client DBpedia
  • 31. LODSPeaKr Triple Store Give me info about http://example.org/john LOCAL DBPEDIA LOGD LOGD Client DBpedia
  • 32. CREACIÓN DE WORKFLOWS Endpoint A Endpoint C Endpoint F LODSPeaKr Endpoint B Endpoint D Final Page
  • 33. USING INFORMATION FROM DBPEDIA
  • 34. SPECIAL URLs • Documentos que agregan información de varios recursos • Por defecto, URLs para clases disponibles e instancias de una clase • Se pueden crear nuevas URLs especiales
  • 35. ESTRUCTURA BÁSICA LODSPeaKr GET http://example.org/resource.rdf HTTP Accept: application/rdf+xml •3 Directorios http://example.org/resource.rdf Content-type: application/rdf+xml • Models <http://example.org/resource.rdf> rdf:type xyz:Class <html> • Views SELECT ?s ?p ?o <head> WHERE{ </head> ?s ?p ?o <body> } LIMIT 10 …. • Static xyz:Class.view.rdf xyz:Class.modelrdf
  • 36. MODELS • Archivo (CURIE de clase) con consulta SPARQL • Directorio (CURIE de clase) donde dentro: • Archivo con consulta SPARQL (cualquier nombre) • Directorio (nombre SPARQL endpoint) con más consultas SPARQL SELECT ?s2 ?p2 ?s1 ?p1 WHERE { { <{{uri}}> ?s1 ?p1 . }UNION{ ?s2 ?p2 <{{uri}}> . } }
  • 37. VIEWS (TEMPLATES DE HAANGA) <table> {% for row in r %} {% if row.s1%} <tr> <td><a href='{{row.s1.value}}'>{{row.s1.curie}}</a></td> {% if row.p1.uri == 1 %} <td><a rel='{{row.s1.curie}}' href='{{row.p1.value}}'>{{row.p1.curie}}</a></td> {% else %} <td><span property='{{row.s1.curie}}'>{{row.p1.value}}</ span></td> {% endif %} </tr> {% endif %} {% endfor %} </table>
  • 38. MODELS REVISITED PREFIX owl: <http://www.w3.org/2002/07/owl#> PREFIX dbpedia: <http://dbpedia.org/resource/> SELECT ?anotherUri WHERE{ {%for row in r.details%} {%if forloop.first%} <{{row.state.value}}> {%endif%} {%endfor%} owl:sameAs ?anotherUri . FILTER(regex(str(?anotherUri),"http://dbpedia.org")) } Valor se puede acceder como r.sameas.anotherUri.[value|curie]
  • 39. FUTURO • Más azúcar sintáctico (ej. para primer/únicos valores) • Agregar la “C” en el MVC • Un Framework para LODapps • No sólo aplicaciones Read-only, sino Read/Write • Replicar aplicaciones (experimental) • Fork de aplicación en vivo • Tracear genealogía (bene gesserit)
  • 40. CONCLUSIONES • LODSPeaKr hace fácil y rápida la publicación de Linked Data • Es posible crear diversas aplicaciones usando Linked Open Data • Open Data Portals • Machine-readable APIs • Mobile webapps
  • 41. LODSpeaKr http://lodspeakr.org Farmers Market http://graves.cl/farmersmarket alvaro@graves.cl @alvarograves

Notas del editor

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n