Publicando RDF y Linked Data con LODSPeaKr

1,218 views

Published on

Published in: Technology, Education
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,218
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
15
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Publicando RDF y Linked Data con LODSPeaKr

    1. 1. PUBLICANDO RDF Y LINKED DATA CON LODSPEAKRAlvaro Graves - alvaro@graves - @alvarogravesTetherless World Constellation -Rensselaer Polytechnic Institute
    2. 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. 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. 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. 5. ¿QUÉ ES LINKED DATA? (2)http://logd.tw.rpi.edu/id/us/state/New_York rdfs:label New York dcterms:identifier NY
    6. 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_Yorkhttp://logd.tw.rpi.edu/id/us/state/New_York rdfs:label New York dcterms:identifier NY
    7. 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. 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. 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 PublicationCreation to RDF Enhancements LODSPeaKr
    10. 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. 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. 12. LODSPeaKrSimple kit for Publishing Linked Open Data
    13. 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
    14. 14. INSTALACIÓN
    15. 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
    16. 16. Instalación básica de LODSPeaKr
    17. 17. http://graves.cl/farmersmarket/version/2010-Oct-22/farmersMarket_4243
    18. 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
    19. 19. USO BÁSICO
    20. 20. LODSPeaKr Triple Store Give me info abouthttp://example.org/john Client
    21. 21. What is http://example.org/john ? LODSPeaKr Triple Store Give me info abouthttp://example.org/john Client
    22. 22. What is http://example.org/john ? http://example.org/john is a foaf:Person LODSPeaKr Triple Store Give me info abouthttp://example.org/john Client
    23. 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 abouthttp://example.org/john Client
    24. 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 abouthttp://example.org/john Person {{name}} {{lastName}} Client
    25. 25. RECUPERAR DESDEFUENTES MÚLTIPLES
    26. 26. Query for foaf:Person LODSPeaKr Triple Store DATA Give me info abouthttp://example.org/john Client
    27. 27. Query for foaf:Person http://example.org/john LODSPeaKr owl:sameAs Triple Store http://logd.tw.rpi.edu/john DATA Give me info abouthttp://example.org/john Client
    28. 28. LODSPeaKr Triple Store QUERY FOR http://logd.tw.rpi.edu/john DATA Give me info abouthttp://example.org/john LOGD Client
    29. 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 abouthttp://example.org/john LOGD Client
    30. 30. LODSPeaKr Triple Store QUERY FOR http://dbpedia/org/resource/john Give me info abouthttp://example.org/john DATA LOGD Client DBpedia
    31. 31. LODSPeaKr Triple Store Give me info abouthttp://example.org/john LOCAL DBPEDIA LOGD LOGD Client DBpedia
    32. 32. CREACIÓN DE WORKFLOWS Endpoint A Endpoint C Endpoint F LODSPeaKr Endpoint B Endpoint D Final Page
    33. 33. USING INFORMATION FROM DBPEDIA
    34. 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. 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. 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. 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. 38. MODELS REVISITEDPREFIX 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. 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. 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. 41. LODSpeaKr http://lodspeakr.org Farmers Markethttp://graves.cl/farmersmarket alvaro@graves.cl @alvarograves

    ×