Skip to content

Instantly share code, notes, and snippets.

View Open-University-LOD's full-sized avatar

Open-University-LOD Open-University-LOD

View GitHub Profile
@Open-University-LOD
Open-University-LOD / Courses available in Nigeria
Created January 9, 2014 11:38
This query lists all the Open University courses that can currently be registered to from Nigeria.
PREFIX mlo: <http://purl.org/net/mlo/>
PREFIX aiiso: <http://purl.org/vocab/aiiso/schema#>
SELECT ?course
FROM <http://data.open.ac.uk/context/course>
WHERE
{
?course mlo:location <http://sws.geonames.org/2328926/> .
?course a aiiso:Module
}
@Open-University-LOD
Open-University-LOD / Podcasts, OpenLearn units and the term “earthquake”
Created January 9, 2014 11:39
This query find any video podcast and OpenLearn units which descriptions contain the term “earthquake”.
PREFIX mlo: <http://purl.org/net/mlo/>
SELECT ?thing ?description
FROM <http://data.open.ac.uk/context/openlearn>
FROM <http://data.open.ac.uk/context/podcast>
where {
?thing <http://purl.org/dc/terms/description> ?description .
FILTER EXISTS {
{ ?thing a <http://data.open.ac.uk/openlearn/ontology/OpenLearnUnit> }
UNION
@Open-University-LOD
Open-University-LOD / Subjects of Podcasts
Created January 9, 2014 11:40
Subject headings used to describe a specific podcast. Created by @psychemedia
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select ?s ?y {
<http://data.open.ac.uk/podcast/9687b84ab18c389aace5b9fecdb42457> dct:isPartOf ?c .
?c dct:subject ?s . ?s rdfs:label ?y
}
@Open-University-LOD
Open-University-LOD / Subject headings used to describe all podcasts
Created January 9, 2014 11:41
Subject headings used to describe all podcasts. Created by @ppetej
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT DISTINCT ?tlabel
FROM <http://data.open.ac.uk/context/podcast>
FROM <http://data.open.ac.uk/context/topic>
WHERE {
@Open-University-LOD
Open-University-LOD / Course offers and prices
Created January 9, 2014 11:41
Prices (ordered) with currency of OU level 1 courses in Arts and Humanities as available in France.
select ?course ?price ?cur
from <http://data.open.ac.uk/context/course>
where {
?course <http://data.open.ac.uk/saou/ontology#OUCourseLevel> "1"^^<http://www.w3.org/2001/XMLSchema#string>.
?course <http://purl.org/dc/terms/subject> <http://data.open.ac.uk/topic/arts_and_humanities>.
?off <http://purl.org/goodrelations/v1#includes> ?course.
?off <http://purl.org/goodrelations/v1#hasPriceSpecification> ?ps.
?course <http://purl.org/net/mlo/location> <http://sws.geonames.org/3017382/>.
?off <http://purl.org/goodrelations/v1#availableAtOrFrom> <http://sws.geonames.org/3017382/>.
?ps <http://purl.org/goodrelations/v1#hasCurrencyValue> ?price.
@Open-University-LOD
Open-University-LOD / Course topic and avaibility
Created January 9, 2014 11:42
Spanish courses available in Germany.
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?c ?l WHERE {
?c <http://purl.org/dc/terms/subject> <http://data.open.ac.uk/topic/spanish> .
?c rdfs:label ?l .
?c <http://data.open.ac.uk/saou/ontology#isAvailableIn> <http://sws.geonames.org/2921044/>
}
@Open-University-LOD
Open-University-LOD / People names
Created January 9, 2014 11:42
People with more than one family name in oro.open.ac.uk
select distinct ?x
from <http://data.open.ac.uk/context/oro> {
?x <http://xmlns.com/foaf/0.1/familyName> ?y .
?x <http://xmlns.com/foaf/0.1/familyName> ?z .
filter(?z!=?y)
}
@Open-University-LOD
Open-University-LOD / Properties of OpenLearn units
Last active January 2, 2016 16:49
Properties that OpenLearn units (www.open.edu/openlearn) have.
select distinct ?property
from <http://data.open.ac.uk/context/openlearn>
where {
?subject a <http://data.open.ac.uk/openlearn/ontology/OpenLearnUnit> .
?subject ?property ?x
}
@Open-University-LOD
Open-University-LOD / Podcast tracks
Created January 9, 2014 11:44
Sorted tracks of a podcast. podcast.open.ac.uk
SELECT ?download ?published
FROM <http://data.open.ac.uk/context/podcast>
WHERE {
?podcast <http://purl.org/dc/terms/published> ?published .
?podcast <http://digitalbazaar.com/media/download> ?download .
?podcast <http://purl.org/dc/terms/isPartOf> <http://data.open.ac.uk/podcast/collection/58dbd5be4f01f4b1eec1df1e8f97eaad> .
} order by desc (?published)
PREFIX yt: <http://data.open.ac.uk/youtube/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX schema: <http://schema.org/>
SELECT
?code ?label (max(?published) as ?date)
FROM <http://data.open.ac.uk/context/youtube>
WHERE