====== [General] Linked Open Data - demo ====== ===== Zespół ===== * Piotr Hołda, Tomasz Szymula ===== Opis ===== Co możemy ciekawego znaleźć w Linked Open Data? Jak te dane się ze sobą łączą? Kilkanaście przypadków użycia (zapytania SPARQL) łączących różne zbiory danych. ===== Wymagania ===== * min. 15 przykładów, każdy wg schematu: * pomysł na to co chcemy osiągnąć * wykorzystywane zbiory danych (bardzo krótko) + co z nich wyciągamy i dlaczego * zapytanie SPARQL * najlepiej parametryzowane: użytkownik coś podaje, np. nazwę zespołu muzycznego / swoją lokalizację (wyciągniętą z modułu GPS) i na ten temat szukamy informacji i łączymy je ze sobą * otrzymane wyniki (wystarczy tabela zwracana przez jakiś silnik SPARQL, np. Twinkle) * interpretacja wyników (jeżeli nie są trywialne i nagłówki tabeli wynikowej nie pomagają) * (co najmniej) 5 przykładów łączy informację z 3 lub więcej źródeł * wykorzystywane jest co najmniej 15 różnych zbiorów danych ===== Spotkania ===== ===== Projekt ===== Część zapytań robiona była z wykorzystaniem Twinkle, część poprzez interfejsy SPARQL (endpoint). Natomiast najlepszym narzędziem okazało się [[http://yasgui.laurensrietveld.nl/|YASGUI]]. * **Wyszukanie najmniejszych krajów na świecie** * zbiór danych to Cia World Factbook. Zawiera on informacje o historii, narodach, rządach, ekonomii itp. 267 krajów. * zapytanie SPARQL: SELECT ?name ?area WHERE{ ?country factbook:countryname_conventionalshortform ?name . ?country factbook:area_total ?area . FILTER ( xsd:decimal(?area) < 100 ) } ORDER BY ?area * wyniki ^ name ^ area ^ | Holy See (Vatican City) | 0.44 | | Monaco | 1.95 | | Tokelau | 10 | | Cocos (Keeling) Islands | 14 | * **Informacje o obozach koncentracyjnych** * zbiór danych “Shoah victims’ names” * zapytanie SPARQL: PREFIX rdfs: PREFIX rdf: select distinct ?label ?type where { ?a a ; rdfs:label ?label; rdf:type ?type. } * wyniki: ^ # ^ label ^ type ^ | 1 | Auschwitz | http://dati.cdec.it/lod/shoah/NaziCamp | | 2 | Mauthausen | http://dati.cdec.it/lod/shoah/NaziCamp | | 3 | Sachsenhausen | http://dati.cdec.it/lod/shoah/NaziCamp | | 4 | Kaufering | http://dati.cdec.it/lod/shoah/NaziCamp | * **Wybranie ludzkich genów znajdujących się w chromosimie Y** * Zbiór danych: linkedlifedata * Zapytanie: PREFIX rdf: PREFIX gene: PREFIX uniprot: PREFIX core: SELECT ?genedescription ?taxonomy WHERE { ?geneid gene:description ?genedescription . ?geneid gene:uniprotAccession ?uniprotaccession . ?geneid gene:chromosome 'Y' . ?uniprotaccession core:organism ?taxonomy . ?taxonomy core:scientificName 'Homo sapiens' . } * wyniki: ^ # ^ genedescription ^ taxonomy ^ | 1 | lysine (K)-specific demethylase 5D | http://purl.uniprot.org/taxonomy/9606 | | 2 | zinc finger protein, Y-linked | http://purl.uniprot.org/taxonomy/9606 | | 3 | ubiquitously transcribed tetratricopeptide repeat containing, Y-linked | http://purl.uniprot.org/taxonom/9606 | | 4 | DEAD (Asp-Glu-Ala-Asp) box polypeptide 3, Y-linked | http://purl.uniprot.org/taxonomy/9606 | | 5 | protocadherin 11 Y-linked | http://purl.uniprot.org/taxonomy/9606 | | 6 | neuroligin 4, Y-linked | http://purl.uniprot.org/taxonomy/9606 | * **Informacje o stacjach meteorologicznych** * Zbiór danych: AEMET metereological dataset * Zapytanie PREFIX rdf: PREFIX geo: prefix aemetonto: select ?stationName ?lat ?long where { ?a a aemetonto:WeatherStation; aemetonto:stationName ?stationName; geo:location ?location. ?location geo:lat ?lat; geo:long ?long. } limit 1000 * Wyniki ^ # ^ stationName ^ lat ^ long ^ | 1 | POBRA DE TRIVES,SAN MAMEDE | 42.3405555556 | -7.28055555556 | | 2 | BARDENAS REALES | 42.195 | -1.4725 | | 3 | BUJARALOZ | 41.5236111111 | -0.173333333333 | | 4 | CALANDA | 40.9408333333 | -0.236388888889 | * **Uzyskanie informacji o zawartości tłuszczu w różnych posiłkach** * zbiór danych z world.openfoodfacts.org. Zawiera informacje o składzie sposiłków, ocenach itp. * Zapytanie SPARQL SELECT ?name ?fat WHERE { ?product food:fatPer100g ?fat . ?product food:name ?name . } LIMIT 5 * wyniki ^ name ^ fat ^ | Courgettes | 0.4 | | Cinnamon sugar | 0 | | Sweet Chili Sauce | 0 | | White Balsamic Condiment | 0 | | Flaked Almonds | 55.8 | * **Informacje o aktach prawnych dotyczących EWWiS** * Zbiór danych: PreLex * Zapytanie SPARQL select ?title ?date where { ?a a ; ; ?title; ?date. } limit 100 * wyniki ^ # ^ title ^ date ^ | 1 | Consultation Agreement between the Swiss Confederation and the High Authority of the European Coal and Steel Community | 1956-05-07 | | 2 | Agreement on the introduction of through international railway tariffs for the carriage of coal and steel through Swiss territory | 1956-07-28 | | 3 | Agreement between the Austrian Federal Government, of the one part, and the Governments of the Member States of the European Coal and Steel Community and the High Authority of the European Coal and Steel Community, of the other part, on the introduction of through international railway tariffs for the carriage of coal and steel through the territory of the Republic of Austria | 1957-07-26 | * **Informacje o językach, ich kodach** * Zbiór danych lingvoj.org * Zapytanie SELECT ?label ?code2 ?code3 WHERE { ?lingvo rdfs:label ?label . ?lingvo lvont:iso639P1Code ?code2 . ?lingvo lvont:iso639P2BCode ?code3 . } LIMIT 5 * wyniki ^ label ^ code2 ^ code3 ^ | Danish | da | dan | | Interlingua (International Auxiliary Language Association) | ia | ina | | Twi | tw | twi | | Assamese | as | asm | | Uighur | ug | uig | * **Austriaccy narciarze alpejscy** * zbiór danych z vocabulary.semantic-web.at/AustrianSkiTeam.html * zapytanie: SELECT ?name WHERE { ?l skos:prefLabel ?name; } * wyniki: ^ name ^ | "Schild Bernadette"@de | | "A-Kader"@de | | "B-Kader"@de | | "C-Kader"@de | | "Aktiver Sportler"@de | | "Sieber Bjoern"@de | | "Ehemalig aktiver Sportler"@de | | "Herrenteam"@de | | "Damenteam"@de | * **Dostępne książki w języku fińskim w Projekcie Gutenberg** * zbiór danych to metadane dostępne w “Project Gutenberg” na temat książek nie ograniczonych licencjami. * Zapytanie SPARQL SELECT DISTINCT ?label ?lang WHERE { ?a rdfs:label ?label. ?a dc:language ?lang. filter (?lang = "fi") } LIMIT 5 * wyniki ^ label ^ lang ^ | "Sulhasen luona Yksinäytöksinen laulunsekainen huvinäytelmä" | "fi" | | "Helsinkiin" | "fi" | | "Itämeren risteilijä" | "fi" | | "John Jagon henki tahi kuollutko vai elävä?" | "fi" | | "Muistoja lapsen ja hopeahapsen 1 Kuvauksia" | "fi" | * **Programy UE dotyczące równego traktowania** * Zbiór danych: N-lex * Zapytanie SPARQL select * where { ?a a ; ; ?title } limit 100 * Wyniki ^ # ^ title ^ | 1 | General Programme for the abolition of restrictions on freedom to provide services | * **Dowiedzieć się jakie lekarstwa/narkotyki nie oddziałujące na zwierzęta i ludzi są nielegalne** * Zbiór danych: Bio2RDF::Drugbank * zapytanie SPARQL: PREFIX void: PREFIX dv: PREFIX dbv: SELECT ?title, ?group, ?ao WHERE { ?a a dbv:Drug; dbv:group ?group; dbv:affected-organism ?ao; dcterms:title ?title. filter (?group = dbv:Illicit). filter (?ao != dbv:Humans-and-other-mammals). } * wyniki: brak * wnioski: tylko ludzie i zwierzęta są prawnie chronieni przed następstwami lekarstw/narkotyków. * **aktorzy grający w filmach przygodowych** * zbiór danych: Linked Movie DataBase * zapytanie SPARQL: PREFIX rdf: PREFIX rdfs: PREFIX foaf: PREFIX movie: PREFIX owl: select distinct ?actor ?name where { ?m a movie:film; movie:genre ; movie:actor ?actor. ?actor rdfs:label ?name. } * wyniki: ^ # ^ actor ^ name ^ | 1 | http://data.linkedmdb.org/resource/actor/29458 | Fay Wray (Actor) | | 2 | http://data.linkedmdb.org/resource/actor/35173 | Bruce Cabot (Actor) | | 3 | http://data.linkedmdb.org/resource/actor/835 | Robert Armstrong (Actor) | * **Licencje zezwalające na kopiowanie** * zbiór danych: http://purl.org/NET/rdflicense (informacje w formie RDF nt 126 licencji) * zapytanie SPARQL PREFIX odrl: PREFIX rdfs: select ?l where { ?l a ; odrl:permission ?node. ?node odrl:action . } * wyniki ^ # ^ label ^ | 1 | http://purl.org/NET/rdflicense/licCOLORIURIS | | 2 | http://purl.org/NET/rdflicense/licGNU-LGPL | | 3 | http://purl.org/NET/rdflicense/licGOVTRACK | | 4 | http://purl.org/NET/rdflicense/licMIT | | 5 | http://purl.org/NET/rdflicense/licNDL | | 6 | http://purl.org/NET/rdflicense/licOGL | | 7 | http://purl.org/NET/rdflicense/licOL | | 8 | http://purl.org/NET/rdflicense/licORACLE | * **Informacje o ostatnich laureatach nagrody Nobla w powiązaniu z informacjami o krajach pochodzenia** * zbiór danych to http://dbpedia.org, eurostat i nobelprize.org * zapytanie SPARQL PREFIX owl: PREFIX rdf: PREFIX rdfs: PREFIX dbpedia: PREFIX dbpedia-owl: PREFIX dcterms: PREFIX nobel: PREFIX eurostat: PREFIX dbpprop: select distinct ?laureat ?year ?country ?populationCensus ?death_rate ?electricity_consumption_GWh ?electricity_production_capacity_MWh where { service { ?countryx a ; dcterms:subject . OPTIONAL {?countryx dbpprop:populationCensus ?populationCensus }. }. service { ?countryz owl:sameAs ?countryx. OPTIONAL {?countryz eurostat:death_rate ?death_rate }. OPTIONAL {?countryz eurostat:electricity_consumption_GWh ?electricity_consumption_GWh}. OPTIONAL {?countryz eurostat:electricity_production_capacity_MWh ?electricity_production_capacity_MWh}. }. ?a rdf:type ; rdfs:label ?laureat; nobel:laureateAward ?award. ?award nobel:year ?year. ?a dbpedia-owl:birthPlace ?country. ?country a . ?country owl:sameAs ?countryx. } order by desc(?year) * Wyniki: ^ laureat ^ year ^ country ^ populationCensus ^ death_rate ^ electricity_consumption_GWh ^ electricity_production_capacity_MWh ^ |Patrick Modiano | 2014 | http://data.nobelprize.org/resource/country/France | | | 350410 | 11935100 | | Stefan W. Hell | 2014 | http://data.nobelprize.org/resource/country/Romania | 20121641 | | | | | Martin Karplus | 2013 | http://data.nobelprize.org/resource/country/Austria | 8504850 | 0.607 | 47905 | 17520 | * **Informacje o najbliższych WiFi-AP w centrum Andory** * dane: OpenMobileNetwork * zapytanie SPARQLPREFIX rdf: PREFIX dbpedia-owl: PREFIX lgdo: PREFIX owl: PREFIX dcterms: PREFIX category: PREFIX rdfs: PREFIX geo: PREFIX dbpedia: PREFIX xsd: select ?wifiap ?SSID ?lat2 ?long2 where { service { geo:lat ?lat1; geo:long ?long1. } ?wifiap a ; geo:lat ?lat2; geo:long ?long2; omn-owl:hasSSID ?SSID. } order by (xsd:float(?lat1 - ?lat2)*xsd:float(?lat1 - ?lat2) + xsd:float(?long1 - ?long2)*xsd:float(?long1 - ?long2)) * wyniki ^ # ^ wifiap ^ SSID ^ lat2 ^ long2 ^ | 1 | http://www.openmobilenetwork.org/resource/wifiap-1062888254 | WLAN_905F | 41.4037 | 2.1734 | | 2 | http://www.openmobilenetwork.org/resource/wifiap1814240623 | PM-SF3 | 41.4037 | 2.17349 | | 3 | http://www.openmobilenetwork.org/resource/wifiap1112433173 | ONOE983 | 41.4037 | 2.17349 | | 4 | http://www.openmobilenetwork.org/resource/wifiap880011342 | ONO836C | 41.4037 | 2.17349 | | 5 | http://www.openmobilenetwork.org/resource/wifiap1869454230 | Barcelona WiFi | 41.4037 | 2.17352 | ===== Sprawozdanie ===== ===== Materiały =====