Heres a quick SPARQL snippet to get a list of the worlds Newspapers along with their political stance. It is only a quick one, with a bit more work its possible to get the English titles of the Newspapers and the Political stances.

SELECT ?Newspaper ?Stance WHERE {
?Newspaper rdf:type dbpedia-owl:Newspaper;
<https://dbpedia.org/property/political> ?Stance}

Plug that into the DBPedia SPARQL interface: https://dbpedia.org/sparql

and get out the result for newspapers and their political perspective.

Tada! Quick bit of Semantic Web goodness!

Cheers,
Daniel

[update]fixed evil wordpress formatting on part of my sparql query[/update]

Yep, another SPARQL query. This time listing all UK Prime Ministers and their religions (in order of party). The results are here: “UK Prime Ministers and their Religions“, and here is the SPARQL for it:

SELECT ?PresidentName ?PartyName ?ReligionName
WHERE
{
?president
dbpprop:party ?Party;
dbpprop:order dbpedia:Prime_Minister_of_the_United_Kingdom;
<https://dbpedia.org/ontology/religion> ?Religion;
rdfs:label ?PresidentName.
FILTER (lang(?PresidentName) = "" || langMatches(lang(?PresidentName), "en")).
?Religion rdfs:label ?ReligionName.
FILTER (lang(?ReligionName) = "" || langMatches(lang(?ReligionName), "en")).
?Party rdfs:label ?PartyName.
FILTER (lang(?PartyName) = "" || langMatches(lang(?PartyName), "en"))
} ORDER BY ?PartyName

I was wondering about the , and wondered what their religions were. So I zipped up some SPARQL queries to run against DBpedia, they aren’t perfect (i.e. they don’t capture all of the presidents due to mislabeling and me not being too bothered about the answers), but it provides some answers.

The Democrats:

SELECT ?PresidentName ?ReligionName
WHERE
{
?president
dbpprop:party <https://dbpedia.org/resource/Democratic_Party_%28United_States%29>;
dbpprop:order dbpedia:President_of_the_United_States;
<https://dbpedia.org/ontology/religion> ?Religion;
rdfs:label ?PresidentName.
FILTER (lang(?PresidentName) = "" || langMatches(lang(?PresidentName), "en")).
?Religion rdfs:label ?ReligionName.
FILTER (lang(?ReligionName) = "" || langMatches(lang(?ReligionName), "en"))
} ORDER BY ?ReligionName

Which the answer is viewable “Democratic Presidents Religions”

The Republicans

SELECT ?PresidentName ?ReligionName
WHERE
{
?president
dbpprop:party <https://dbpedia.org/resource/Republican_Party_%28United_States%29>;
dbpprop:order dbpedia:President_of_the_United_States;
<https://dbpedia.org/ontology/religion> ?Religion;
rdfs:label ?PresidentName.
FILTER (lang(?PresidentName) = "" || langMatches(lang(?PresidentName), "en")).
?Religion rdfs:label ?ReligionName.
FILTER (lang(?ReligionName) = "" || langMatches(lang(?ReligionName), "en"))
} ORDER BY ?Religion

Which the answer is available directly here: “Republican Presidents religions”

Please note

  • It doesn’t return all presidents of the parties
  • It does use the DBPedia SPARQL engine (powered by OpenLink Virtuoso)
  • It does use some shortcuts (i.e. not defining PREFIXs and the FROM clause), as the DBPedia SPARQL engine provides these nice shortcuts.