Linked Data Mashups: From Query to Visualization Dominic DiFranzo.

Slides:



Advertisements
Similar presentations
Mashing Up Linked Open Government Data Li Ding Tetherless World Constellation Rensselaer Polytechnic Institute Nov 8, 2010.
Advertisements

CH-4 Ontologies, Querying and Data Integration. Introduction to RDF(S) RDF stands for Resource Description Framework. RDF is a standard for describing.
Using JavaScript in Linked Data Applications Oshani Seneviratne Oct 12, 2010.
ESDSWG2011 – Semantic Web session Semantic Web Sub-group Session ESDSWG 2011 Meeting – Semantic Web sub-group session Wednesday, November 2, 2011 Norfolk,
Semantic Web Introduction
JavaScript and Data Visualization Dominic DiFranzo.
Jena Sparql 4/11/2017.
 Copyright 2004 Digital Enterprise Research Institute. All rights reserved. SPARQL Query Language for RDF presented by Cristina Feier.
Chapter 3 Querying RDF stores with SPARQL. TL;DR We will want to query large RDF datasets, e.g. LOD SPARQL is the SQL of RDF SPARQL is a language to query.
Google Visualization ISYS 650. Google Visualization API We can use the Google Visualization.
CSCI 572 Project Presentation Mohsen Taheriyan Semantic Search on FOAF profiles.
A division of Publishing Technology Facet Building Web Pages With SPARQL SWIG-UK Event, HP Labs November 23 rd 2007 Leigh Dodds Chief Technology Officer,
L. Grewe. YQL – what is it Yahoo! Query Language.
Data.gov Wiki: A Semantic Web Approach to Government Data Li Ding, Dominic DiFranzo, Sarah Magidson, Jim Hendler Tetherless World Constellation Aug 7,
RDF: Building Block for the Semantic Web Jim Ellenberger UCCS CS5260 Spring 2011.
Dr. Jim Bowring Computer Science Department College of Charleston CSIS 690 (633) May Evening 2009 Semantic Web Principles and Practice Class 4: 20 May.
High Performance Faceted Interfaces Using S2S Eric Rozell, Tetherless World Constellation.
Using PHP in Linked Data Applications Jie Bao Oct 12.
Semantic Web Andrejs Lesovskis. Publishing on the Web Making information available without knowing the eventual use; reuse, collaboration; reproduction.
Semantic Web Bootcamp Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
Logics for Data and Knowledge Representation SPARQL Protocol and RDF Query Language (SPARQL) Feroz Farazi.
© 2006 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Publishing data on the Web (with.
1 Ontology Query and Reasoning Payam Barnaghi Institute for Communication Systems (ICS) Faculty of Engineering and Physical Sciences University of Surrey.
Rajashree Deka Tetherless World Constellation Rensselaer Polytechnic Institute.
SPARQL All slides are adapted from the W3C Recommendation SPARQL Query Language for RDF Web link:
The SADI plug-in to the IO Informatics’ Knowledge Explorer...a quick explanation of how we “boot-strap” semantics...
Introduction to SPARQL. Acknowledgements This presentation is based on the W3C Candidate Recommendation “SPARQL Query Language for RDF” from
Entity Recognition via Querying DBpedia ElShaimaa Ali.
Mash-up of Linked Government Data from Li Ding, Jim Hendler and Deborah L. McGuinness Tetherless World Constellation, Rensselaer Polytechnic.
SPARQL Semantic Web - Spring 2008 Computer Engineering Department Sharif University of Technology.
The Semantic Web Web Science Systems Development Spring 2015.
Chapter 3 Querying RDF stores with SPARQL. Why an RDF Query Language? Why not use an XML query language? XML at a lower level of abstraction than RDF.
Master Informatique 1 Semantic Technologies Part 11Direct Mapping Werner Nutt.
SPARQL W3C Simple Protocol And RDF Query Language
SPARQL AN RDF Query Language. SPARQL SPARQL is a recursive acronym for SPARQL Protocol And Rdf Query Language SPARQL is the SQL for RDF Example: PREFIX.
CC L A W EB DE D ATOS P RIMAVERA 2015 Lecture 2: RDF Model & Syntax Aidan Hogan
Turtle – RDF Graph. Turtle – Basic Syntax Triples are terminated with a full stop URLs are encoded in angle brackets ( ) Literals are enclosed by double.
1 SPARQL A. Emrah Sanön. 2 RDF RDF is quite committed to Semantic Web. Data model Serialization by means of XML Formal semantics Still something is missing!
Dr. Martin Zhao Sept 4, Topics HTML and related tutorials on w3schools.com Related HTML tags Adding interesting features using JavaScript What is.
Semantic Web Basics Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
Introduction to the Semantic Web and Linked Data Module 1 - Unit 2 The Semantic Web and Linked Data Concepts 1-1 Library of Congress BIBFRAME Pilot Training.
05/01/2016 SPARQL SPARQL Protocol and RDF Query Language S. Garlatti.
Doc.: IEEE /0169r0 Submission Joe Kwak (InterDigital) Slide 1 November 2010 Slide 1 Overview of Resource Description Framework (RFD/XML) Date:
Chapter 3 Querying RDF stores with SPARQL
Alexandra Cristea 1.  pronounced "sparkle“  recursive acronym for: ◦ SPARQL Protocol and RDF Query Language  a semantic query language  a query language.
Toward a framework for statistical data integration Ba-Lam Do, Peb Ruswono Aryan, Tuan-Dat Trinh, Peter Wetz, Elmar Kiesling, A Min Tjoa Linked Data Lab,
CC L A W EB DE D ATOS P RIMAVERA 2015 Lecture 7: SPARQL (1.0) Aidan Hogan
Semantic Web 06 T 0006 YOSHIYUKI Osawa. Problem of current web  limits of search engines Most web pages are only groups of character strings. Most web.
Open Government Data Dominic DiFranzo PhD Student/Research Assistant Rensselaer Polytechnic Institute Tetherless World Constellation.
Linked Open Data for European Earth Observation Products Carlo Matteo Scalzo CTO, Epistematica epistematica.
Semantic Web in Depth SPARQL Protocol and RDF Query Language Dr Nicholas Gibbins –
1 Mashup Workflow. 2 What We Have 3 Challenges with REST APIs * Only ask what its built to answer * No standard - must relearn each time * Opaque - no.
SPARQL Query Andy Seaborne. Apache Jena he.org/jena ● Open source - Apache License ● Apache Incubator (accepted November 2010) ●
SPARQLing SERVICES Leigh Dodds Engineering Manager, Ingenta XTech, May 2006.
CC La Web de Datos Primavera 2017 Lecture 7: SPARQL [i]
SPARQL.
Introduction to SPARQL
Data.gov: Web, Data Web, Social Data Web 7/22/2010 #health2stat.
SPARQL SPARQL Protocol and RDF Query Language
Semantic Database Builder
SPARQL: A query language for RDF
Logics for Data and Knowledge Representation
CC La Web de Datos Primavera 2016 Lecture 7: SPARQL (1.0)
JSON-LD 1.0 Yanan Zhang.
Semantic Annotation service
RDF and RDB 2 D2RQ.
RDFa: Embedding RDF Knowledge in HTML
JSON for Linked Data: a standard for serializing RDF using JSON
Logics for Data and Knowledge Representation
Triple Stores.
Presentation transcript:

Linked Data Mashups: From Query to Visualization Dominic DiFranzo

RDF Triple: Subject Predicate Object Use URI for universal naming New York has the postal abbreviation NY "NY".

Linking I found a new dataset and it has the following triple “The Empire State”. erName

owl:sameAS. meAshttp://dbpedia.org/page/New_York

What We Have

Current Technology Sunlight Foundation’s National Data Catalog, Socrata, Open311 API, and Microsoft’s Open Government Data Initiative, etc Store in some backend, release data through an API.

Challenges Only ask what its built to answer No standard - must relearn each time Opaque - no way for consumers to see, reuse or improve the data model Silos of Data - no linking at the data level VeryTop Down

What We Want

Linked Data decentralized - sources may be spread out and referenced across the Web modular - linked without advance planning or coordination scalable - once store in place, it’s easy to extend advantages hold even when definitions and structure of the data changes over time.

Sparql SPARQL is a query language for the Semantic Web.

Sparql

Long! SELECT ?node ?name WHERE{ ?node ?name. ?node.ntax-ns#type> < } LIMIT 10

Prefix PREFIX foaf: PREFIX rdf: 22-rdf- syntax-ns#> SELECT ?node ?name WHE WHERE{ ?node foaf:givenname ?name. ?node rdf:type foaf:Person. } LIMIT 10

Shortcuts PREFIX foaf: PREFIX rdf: 22-rdf- syntax-ns#> SELECT ?node ?name WHE WHERE{ ?node foaf:givenname ?name ; rdf:type foaf:Person. } LIMIT 10

Graphs

Named Graph PREFIX dc: SELECT ?graph ?node ?title WHERE{ GRAPH ?graph{ ?node dc:title ?title. } LIMIT 3

Named Graph PREFIX dc: SELECT ?node8 ?desc8 ?node401 ?desc401 WHERE{ GRAPH { ?node401 dc:description ?desc401. } GRAPH { ?node8 dc:description ?desc8. } LIMIT 3

Union PREFIX dc: SELECT ?node8 ?desc8 ?node401 ?desc401 WHERE{ { GRAPH { ?node401 dc:description ?desc401. } }UNION{ GRAPH { ?node8 dc:description ?desc8. } LIMIT 3

Optional PREFIX foaf: SELECT ?node ?name ?givenname WHERE{ ?node foaf:name ?name. OPTIONAL{ ?node foaf:givenname ?givenname. }

Filter PREFIX foaf: SELECT ?node ?name ?givenname WHERE{ ?node foaf:name ?name. ?node foaf:givenname ?givenname. FILTER regex(?name, "Biden"). }

SPARQLProxy This is a web service that allows you to query any SPARQL endpoint, and get back the results in any format you want. A RESTful way to query any endpoint in any environment.

SPARQLProxy Paramiters: query: [required] encoded String of SPARQL query query-uri :[required] URI of SPARQL query (use as an alternative to "query" parameter. These two parameters are mutul-exclusive)

SPARQLProxy service-uri: [required] URI of SPARQL Endpoint – default is the LOGD endpoint output: output format. ''xml'' - SPARQL/XML (default) : ''exhibit'' - JSON for MIT Exhibit : ''gvds'' - JSON for Google Visualization : ''csv'' - CSV : ''html'' - HTML table : “sparql” - SPARQL JSON

Example option=text&query=PREFIX+conversion%3A+%3C http%3A%2F%2Fpurl.org%2Ftwc%2Fvocab%2Fco nversion%2F%3E%0D%0ASELECT+%3Fg+sum%28 +%3Ftriples+%29+as+%3Festimated_triples%0D% 0AWHERE+{%0D%0A++GRAPH+%3Fg++{%0D%0A +++%3Fg+void%3Asubset+%3Fsubdataset+.%0D %0A+++%3Fsubdataset+conversion%3Anum_tripl es+%3Ftriples+.%0D%0A++}%0D%0A}+%0D%0AG ROUP+BY+%3Fg%0D%0A&service- uri=&output=html&callback=&tqx=&tp=

Example // compose query $sparqlproxy_uri = " $params = array(); $params["query-uri"] = " results/datagov-list-loaded-dataset.sparql"; $params["service-uri"] = " $params["output"] = "gvds"; $query= $sparqlproxy_uri."?". http_build_query($params,,'&') ; //specific for Drupal //show query result echo file_get_contents($query);

Visualizing The Data Many JavaScript API and Libraries to help make visualizations Trades in eases of use and control/customization. We will focus on the Google Visualization API, very easy to use out-of-the-box but almost impossible to customize outside of what they provide. /docs/gallery.html /docs/gallery.html

Visualization Example Start with a dataset(s) We will look into State Library Agency Survey: Fiscal Year 2006http://logd.tw.rpi.edu/source/data- gov/dataset/353/version/1st-anniversaryhttp://logd.tw.rpi.edu/source/data- gov/dataset/353/version/1st-anniversary and Tax Year 2007 County Income Data gov/dataset/1356/version/2009-Dec-03

Example Lets make a map of "Adjusted Gross Income(AGI) per Capita” a US map where each state is colored according to the average AGI per person living in that state. We obtain a state's AGI data from Dataset 1356 and a state's population data from Dataset 353.

Lets make a query visualizations/mashup-353-population agi.sparql visualizations/mashup-353-population agi.sparql

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " AGI per Capita Map AGI per Capita Map Loading Map...

// load google visualization packages - STEP 1 google.load('visualization', '1', {'packages': ['geomap']}); // set callback function for drawing visualizations - STEP 2 google.setOnLoadCallback(drawMap);

function drawMap() { //Query data - STEP 3 var sparqlproxy = " var queryloc = " visualizations/mashup-353-population-1356-agi.sparql"; var queryurl = sparqlproxy + "?" + "output=gvds” + “&query-option=uri” + "&query-uri=" + encodeURIComponent(queryloc) ; var query = new google.visualization.Query(queryurl); query.send(handleQueryResponse); }

function handleQueryResponse(response){ // Check for query response errors. - STEP 4 if (response.isError()) { alert('Error in query: ' + response.getMessage() + ' ' + esponse.getDetailedMessage()); return; }

// read data - STEP 5 var data = response.getDataTable(); // create new data - STEP 6 var newdata = new google.visualization.DataTable(); newdata.addColumn('string', 'State'); newdata.addColumn('number', 'AGI per Capita');

// populate each row - STEP 7 var rows = data.getNumberOfRows(); for (var i = 0; i < rows; i++ ) { var state = 'US-' + data.getValue(i, 0); // AGI figure uses thousand-dollar unit var value = Math.round(data.getValue(i, 1)*1000/ data.getValue(i, 2)); newdata.addRow([state, value]); }

// configure map options - STEP 8 var options = {}; options['region'] = 'US';// show US map options['dataMode'] = 'regions'; options['width'] = 900; options['height'] = 550;

// define geomap instance - STEP 9 var viz = document.getElementById('map_canvas'); new google.visualization.GeoMap(viz).draw(newdata, options ); }//end of handleQueryResponse function //end of JavaScript Tag

See Live Version - visualizations/agi-per-capita-v2.html