semantic web intro - st. patrick's day 2016 update

143
©2016 Eric Axel Franzon Introduction to Semantic Web (Meets St. Patrick’s Day) Eric Franzon Smart Data SEO

Upload: eric-franzon

Post on 12-Apr-2017

650 views

Category:

Data & Analytics


1 download

TRANSCRIPT

Page 1: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Introduction to Semantic Web(Meets St. Patrick’s Day)

Eric FranzonSmart Data SEO

Page 2: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Semantic Webis like the harmonica

Page 3: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Easy to play; takes work to master.

Page 4: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What we’ll discuss•What is Semantic Web?•Who’s using it?•What makes it work?•What can you do with it?

Page 5: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What is Semantic Web?

• A Web-scale architecture• A metadata technology• A layer of meaning on the Web• In use TODAY!

Page 6: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What is it not?• A software package

• Something that will ever be “done”

• A replacement for the current Web$19.99

Page 7: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What is it not?• Limited to the public WWW

• A pipe dream

• A silver bullet

• HAL 9000 or Skynet $19.99

Page 8: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

• Globally• Inexpensively• In Real-Time

Behind the Firewall

(public)WorldWideWeb

HTTP

HTML

Based on W3C Standards

Page 9: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

• Globally• Inexpensively• In Real-Time

Behind the Firewall

SemanticWeb

RDF

SPARQL

OWL

Based on W3C Standards

Page 10: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

History…

Page 11: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 12: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 13: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 14: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 15: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 16: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 17: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel FranzonIoT Enhancements by Eric Franzon

IoT

Page 18: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

• to connect DATA• to make information interpretable by machines

Semantic Web Standardsare used…

Page 19: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Machine Interpretationas the Web Evolves…

Page 20: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Web 1.0 – Linking Documents

Page 21: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Web 1.0

“I see: characters + formatting + images” --my Computer

Page 22: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Web 1.0 – Linking DocumentsWeb 2.0 – Linking People

Page 23: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Web 2.0

“I see: characters + formatting + images” --my Computer

Page 24: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

It’s hard to interpret meaning when all you see are characters,

images, and formatting.

Context is critical.

Page 25: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Web 1.0 – Linking DocumentsWeb 2.0 – Linking PeopleWeb 3.0 – Linking Data

Page 26: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Web 3.0 – Linking DataTitle

Price

Format

Cover

Band“I see: things + relationships. This is about a collection of music.”

Page 27: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Linking Open Data

Page 28: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Linking Open Data ProjectMay, 2007

Page 29: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon July 2009

Page 30: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

September 2011

Page 31: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

August 2014

Page 32: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Data from these trusted sourcesis available for you

to use in your applications TODAY.

Data you can LINK to.

Page 33: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Semantic Data that is machine READABLE.

…and machine INTERPRETABLE!

Page 34: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Who’s Using Semantic Web Standards?

Page 35: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

• Healthcare / Life Sciences• Financial Services• Manufacturing / Retail• Marketing, Advertising• SEO/SEM• Libraries• Archives• Museums • Governments• Enterprise Software Vendors

Who’s Using Sem Web?

Page 36: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Who’s Using Sem Web?

Page 37: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Who’s Using Sem Web?

Page 38: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Who’s Using Sem Web?

Page 39: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What is schema.org?

“…A collection of schemas, i.e., html tags, that webmasters can use to markup their pages in ways recognized by major search providers.”

Page 40: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

e.g. Product Markup

Page 41: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What is schema.org?

“…A collection of schemas, i.e., html tags, that webmasters can use to markup their pages in ways recognized by major search providers.”

Page 42: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What it looks like

Page 43: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What is schema.org?

“…A collection of schemas, i.e., html tags, that webmasters can use to markup their pages in ways recognized by major search providers.”

Page 44: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What it looks like

Page 45: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

e.g. TV Episode Markup

Page 46: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What it looks like

Page 47: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What it looks like

Page 48: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What it looks like

Page 49: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What makes SemWeb work?

Page 50: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

The Technologies of RDBMS

• Data• Schemas• Query Language

Page 51: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

RDBMS Datat_people

Name

City State

Post code

Sean Bozeman MT 59715Erika Missoula MT 59801

Page 52: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

RDBMS Schema

Page 53: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

RDBMS Query Language: SQL

SELECT isbn, title, price, price * 0.06 AS sales_tax FROM Book WHERE price > 100.00 ORDER BY title;

Page 54: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

The Technologies of SemWeb

• Data• Schemas• Query Language

Page 55: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

The Data Language

ResourceDescriptio

nFramewor

k

Page 56: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

“RDF is good for distributing dataacross the Web and pretendingit’s in one place.”-Dean Allemang, Author, Semantic Web for the Working Ontologist

Page 57: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

• to connect DATA• to make it interpretableby machines

RDF is used…

Page 58: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

1. By uniquely identifying THINGS2. By uniquely identifying

RELATIONSHIPS3. By using TRIPLES

Machine Interpretable - How?

(RDF is made up of triples!)

Page 59: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

So, what’s a THING?

1. By uniquely identifying THINGS

Machine Interpretable - How?

Page 60: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

A THING is anything that can be uniquely identified by a URI or a literal (string)

MeMy postal codeThe White HouseL.A. County’s sales tax rate

http://about.me/eric.franzon#mehttp://www.city-data.com/zips/59801.html

Lat: 38.89859 Long: -77.0359719.750 %

http://ericfranzon.com/harpcase.jpg

Page 61: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

This is a collection of THINGS:

t_peopleName

City State

Post code

Sean Bozeman MT 59715Erika Missoula MT 59801

Page 62: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Who’s your daddy?

1. By uniquely identifying THINGS2. By uniquely identifying

RELATIONSHIPS

Machine Interpretable - How?

Page 63: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Is Father of

<owl:ObjectProperty rdf:ID="isFather"> <rdfs:domain rdf:resource="#Person"/> <rdfs:range rdf:resource="#Person"/></owl:ObjectProperty>

http://ericaxel.com/eric.rdf#me ns:isFather

ns:isFather

SPOILER

ALERT!!

Page 64: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

1. By uniquely identifying THINGS2. By uniquely identifying

RELATIONSHIPS3. By using TRIPLES

What’s a triple?

Machine Interpretable - How?

Page 65: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

The Building block of RDF

The Triple

Page 66: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Subject ObjectPredicate

Triples? It’s Elementary! (School)

song has title.

This a

Thing ThingRelationshipThat is a Triple!

Page 67: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

“This band recorded a song.”

“This recording is part of a collection.”

“This item has a barcode.”

“I like blues.”

“I like B.L.U.E.S.”

“This image can be used non-commercially.”

“My email address is [email protected].”

Triples? It’s Elementary!

Page 68: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Song

Author Wrote

Written by

Title

Has Title

Publisher

Has PublisherLyrics Has Lyrics

A Simple Graph

Page 69: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Visualization of graph from Pharma space- Cytoscape.org

Page 70: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Where does one store triples?

In a “triple store”• Native Semantic Web stores• RDBMS databases• As native files (.rdf)• Woven into documents (RDFa)• Generated on the fly

Page 71: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Just so you know…There are many ways of representing RDF:

• RDF/XML• N3• JSON-LD

• N-Triples • Turtle• RDFa

Each has pros and cons, but they all connect THINGS and RELATIONSHIPS into TRIPLES

Page 72: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

The Technologies of SemWeb

• Data• Schemas• Query Language

Page 73: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

The Schemata

Linked Data schemas consist of:

Your RDF relationships (predicates)+

Relationship descriptions

Page 74: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SemWeb Schemataid First Name Last Name

1 Tom Stockburger

SchemaData

Initial Schema

hasIDhasFirstName hasLastName

Tom Stockburger1

owl:sameAs

hasSurnameRelationship description

Page 75: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

1. Resource Description Framework Schema (RDFS): Simple, hierarchical classes

2. Simple Knowledge Organization System (SKOS): Port taxonomies to the Semantic Web

3. Web Ontology Language (OWL): Complex logical relationships

Relationship Descriptions

Page 76: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Worldcat.org

• A project of the OCLC

Page 77: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Vocabulary Combination “in the wild”

Page 78: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Vocabulary Combination “in the wild”

Page 79: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

The Technologies of SemWeb

• Data• Schemas• Query Language(…or “What can you do with it?”)

Page 80: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

The query language

SPARQLProtocolAndRDFQueryLanguage

SPARQL

Page 81: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL allows us to:• Pull values from structured & semi-structured data• Explore data by querying unknown relationships• Perform complex joins of disparate databases in a single, simple query• Transform RDF data from one vocabulary to another--Lee Feigenbaum, Cambridge Semantics

Page 82: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Eric

Page 83: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

<hasDepiction>

Eric

Page 84: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

<hasLicense>

<hasDepiction>

Eric

Page 85: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

<hasLicense>

<hasDepiction>

<likes>

Eric

Page 86: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

<hasLicense>

<hasDepiction>

<likes>

<likes>

Eric

Page 87: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

<hasLicense>

<hasDepiction>

<likes>

<likes>

<likes>

Eric

Page 88: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Chicago, Illinois

On the shores of Lake Michigan, Chicago is one of the major…

<hasLicense>

<wrote><hasDepiction>

<likes>

<likes>

<likes>

Eric

Ann

Page 89: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Chicago, Illinois

On the shores of Lake Michigan, Chicago is one of the major…

<hasLicense>

<wrote>

<isAbout>

<hasDepiction>

<likes>

<likes>

<likes>

Eric

Ann

Page 90: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Chicago, Illinois

On the shores of Lake Michigan, Chicago is one of the major…

<hasLicense>

<wrote>

<isAbout>

<hasDepiction>

<likes>

<likes>

<likes>

Eric

Ann<hasLicense>

Page 91: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Chicago, Illinois

On the shores of Lake Michigan, Chicago is one of the major…

<hasLicense>

<hasLicense> <wrote>

<isAbout>

<livedIn>

<hasDepiction>

<likes>

<likes>

<likes>

Eric

Ann

Page 92: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

What can we ask of a system like this?

Page 93: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Chicago, Illinois

On the shores of Lake Michigan, Chicago is one of the major…

<hasLicense>

<hasLicense> <wrote>

<isAbout>

<livedIn>

<hasDepiction>

<likes>

<likes>

<likes>

Eric

Ann

Page 94: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Chicago, Illinois

On the shores of Lake Michigan, Chicago is one of the major…

<hasLicense>

<hasLicense> <wrote>

<isAbout>

<livedIn>

<hasDepiction>

<likes>

<likes>

<likes>

What does Eric Like?

Eric

Ann

Page 95: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Chicago, Illinois

On the shores of Lake Michigan, Chicago is one of the major…

<hasLicense>

<hasLicense> <wrote>

<isAbout>

<livedIn>

<hasDepiction>

<likes>

<likes>

<likes>

What has a Creative Commons License?

Eric

Ann

Page 96: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Chicago, Illinois

On the shores of Lake Michigan, Chicago is one of the major…

<hasLicense>

<hasLicense> <wrote>

<isAbout>

<livedIn>

<hasDepiction>

<likes>

<likes>

<likes>

What license does THIS document have?

Eric

Ann

Page 97: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Chicago, Illinois

On the shores of Lake Michigan, Chicago is one of the major…

<hasLicense>

<hasLicense> <wrote>

<isAbout>

<livedIn>

<hasDepiction>

<likes>

<likes>

<likes>

What is liked by anyone who has lived somewhere

that is the subject of a document Ann has written?

Eric

Ann

Page 98: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

A quick note about database types…

Page 99: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Trees and Tablest_people

Name City State Post codeBob Cat

Bozeman MT 59715

Monte Missoula MT 59801people

MonteBob Cat

Bozeman MT 59715

CityState Post

codeMissoula MT 59801

CityState Post

code

Page 100: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Trees and Tables – Problem 1

t_peopleName City State Post

codeflag

Bob Cat

Bozeman MT 59715 1

Monte Missoula MT 59801people

MonteBob Cat

Bozeman MT 59715

CityState Post

codeMissoula MT 59801

CityState Post

code

flag1

Adding partial data totables leads to sparseness

Page 101: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Trees and Tables – Problem 2

t_peopleName

City State

Post code

Monte

Missoula MT 59801

Erika Missoula MT 59801people

ErikaMonte

Missoula MT 59801

CityState Post

codeMissoula MT 59801

CityState Post

code

Common data leads to (lots!) of duplication

Page 102: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Graphspeople

ErikaMonteCity

State

Postcode

Missoula

MT

59801

City

State

Postcode

flag1

Page 103: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 104: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Queries

Page 105: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #1(specific endpoint – dbPedia)

Artists/Albums produced by PharrellPREFIX d: <http://dbpedia.org/ontology/>SELECT ?artistName ?albumNameWHERE { ?album d:producer :Pharrell_Williams . ?album d:musicalArtist ?artist . ?album rdfs:label ?albumName . ?artist rdfs:label ?artistName . FILTER ( lang(?artistName) = "en" ) FILTER (lang(?albumName) = "en" )}

Page 106: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #1

Page 107: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #1

Page 108: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 109: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #2(specific endpoint – dbPedia)

Musical artists who were born in or have a hometown in Irelandand the acts they performed with.

Page 110: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #2(specific endpoint – dbPedia)

PREFIX dbo: <http://dbpedia.org/ontology/>

SELECT DISTINCT ?name ?person ?artist WHERE { ?person foaf:name ?name . ?person rdf:type <http://dbpedia.org/ontology/MusicalArtist> . ?person <http://dbpedia.org/ontology/associatedMusicalArtist> ?artist . { ?person dbo:hometown <http://dbpedia.org/resource/Republic_of_Ireland> . } UNION { ?person dbo:birthPlace <http://dbpedia.org/resource/Republic_of_Ireland> . }}ORDER BY ?name

Page 111: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #2

Page 112: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #2

A major retailer ran this query…

associated it with the catalog of albums it sells…

and delivered a set of recommended purchases for St. Patrick’s Day!

Page 113: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 114: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 115: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

• Show me all landlocked countries• With populations > 50,000• Display the country names in English• Eliminate duplicates

PREFIX type: <http://dbpedia.org/class/yago/>PREFIX prop: <http://dbpedia.org/property/>SELECT ?country_name ?populationWHERE { ?country a type:LandlockedCountries ; rdfs:label ?country_name ; prop:populationEstimate ?population . FILTER (?population > 15000000 && langMatches(lang(?country_name), "EN")) .} ORDER BY DESC(?population)

SPARQL Query #3

Page 116: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Query #3 Results

Page 117: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

• Show me all landlocked countries• With populations > 50,000• Display the country names in English• Eliminate duplicates

PREFIX type: <http://dbpedia.org/class/yago/>PREFIX prop: <http://dbpedia.org/property/>SELECT ?country_name ?populationWHERE { ?country a type:LandlockedCountries ; rdfs:label ?country_name ; prop:populationEstimate ?population . FILTER (?population > 15000000 && langMatches(lang(?country_name), "RU")) .} ORDER BY DESC(?population)

SPARQL Query #3

Russian

Page 118: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Query #3 Results

Page 119: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

• 8 KB text file with the .rdf extension• Hosted on my website• Information on me, my interests, and people I know

My FOAF Profile

Page 120: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #4(generic endpoint)

FOAF (some people that Eric Franzon knows) PREFIX foaf: <http://xmlns.com/foaf/0.1/>SELECT ?nameFROM <http://ericaxel.com/eric.rdf>WHERE {    ?knower foaf:knows ?known .    ?known foaf:name ?name .}

Page 121: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #4

Page 122: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Example #4 - Results

Page 123: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

2 Disparate Data Sources:2 FOAF Profiles

Page 124: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #5Querying two FOAF Profiles

PREFIX foaf: <http://xmlns.com/foaf/0.1/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>SELECT ?nameFROM <http://ericaxel.com/eric.rdf>FROM <http://bosatsu.net/foaf/brian.rdf>WHERE { ?x rdf:type foaf:Person . ?x foaf:name ?name .}

Page 125: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Where’s the Data?

What’sThe

Question?

Page 126: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Example #5 - Results

Page 127: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Another Benefit of querying Linked Data…

Data link to other data!

SPARQL Example #6

Page 128: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

1. Find these pieces of information:• Episode number• Airdate • Guest star • Chalkboard gag • Couch gag

2. Order them by Episode number

SPARQL Example #6

Page 129: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Bart Simpson's Linked Data (DBPedia)

 SELECT ?epnum ?airdate ?guest_star ?chalkboard_gag ?couch_gag WHERE { ?s dbpedia2:airdate ?airdate . ?s dbpedia2:blackboard ?chalkboard_gag . ?s dbpedia2:guestStar ?guest_star . ?s dbpedia2:episodeNo ?epnum . ?s dbpedia2:couchGag ?couch_gag . } order by ?epnum

SPARQL Example #6

Page 130: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

SPARQL Example #6

Page 131: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Example #6 - Results

Page 132: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Following the Trail…

Page 133: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Following the Trail…

Page 134: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Following the Trail…

Page 135: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Following the Trail…

Page 136: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

And that is how you get from The Simpsons to the

London School of Economics.

Page 137: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 138: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Wikidata

Page 139: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

One More Thing…

Page 140: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

A little bit can be powerful!

Page 141: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Questions? Operators are standing by.

THANK YOU!

[email protected]@EricAxel http://linkedin.com/in/ericfranzonhttps://plus.google.com/+EricFranzon

Page 142: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Page 143: Semantic Web Intro - St. Patrick's Day 2016 Update

©2016 Eric Axel Franzon

Resourceshttps://flic.kr/p/6krdsMhttps://flic.kr/p/p9jiDKhttps://flic.kr/p/3q8afLhttps://flic.kr/p/brJs4Ghttps://flic.kr/p/78rsTchttps://flic.kr/p/bpSeR2https://flic.kr/p/pQcWQthttps://flic.kr/p/daKwMLhttps://flic.kr/p/8bpMhFhttp://www.flickr.com/photos/dawnmanser/3532853278/http://www.flickr.com/photos/artolog/3983764041/http://www.flickr.com/photos/97964364@N00/59780745/http://www.flickr.com/photos/starwarsblog/http://aldobucchi.comhttp://www.addletters.com/pictures/bart-simpson-generator/3024046.htmhttp://richard.cyganiak.de/2007/10/lod/