Skip to content

Paper TGDK 2024

Marcel R. Ackermann edited this page Mar 11, 2025 · 30 revisions

TGDK paper 2024 additional resources

Statistics Queries

The following queries are used in the TGDK Paper to create the key statistics about the dblp knowledge graph in section 2.2.

Count of the main dblp type entities

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dblp: <https://dblp.org/rdf/schema#>
PREFIX datacite: <http://purl.org/spar/datacite/>
SELECT ?type ?count (?count/?total * 100 as ?percentage) WHERE {
  {
    SELECT ?type (COUNT(?subject) as ?count) WHERE {
      VALUES ?type { dblp:Publication dblp:Creator dblp:Signature dblp:VersionRelation datacite:Identifier dblp:Stream} .
      ?subject rdf:type ?type .
    }
    GROUP BY ?type 
  }
  {
    SELECT (COUNT(?subject) as ?total) WHERE {
      VALUES ?type { dblp:Publication dblp:Creator dblp:Signature dblp:VersionRelation datacite:Identifier dblp:Stream} .
      ?subject rdf:type ?type .
    }
  }
}
ORDER BY DESC(?count)

Run this query

Count of the publication subtype entities

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?type ?count (?count/?total*100 as ?percentage) WHERE {
  {
    SELECT ?type (COUNT(?subject) as ?count) WHERE {
      ?type rdfs:subClassOf dblp:Publication . 
      ?subject rdf:type ?type .
    }
    GROUP BY ?type 
  }
  {
    SELECT (COUNT(?subject) as ?total) WHERE {
      ?type rdfs:subClassOf dblp:Publication . 
      ?subject rdf:type ?type .
    }
  
  }
}
ORDER BY DESC(?count) 

Run this query

Count of the creator subtype entities

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?type ?count (?count/?total*100 as ?percentage) WHERE {
  {
    SELECT ?type (COUNT(?subject) as ?count) WHERE {
      ?type rdfs:subClassOf dblp:Creator . 
      ?subject rdf:type ?type .
    }
	GROUP BY ?type 
  }
  {
    SELECT (COUNT(?subject) as ?total) WHERE {
      ?type rdfs:subClassOf dblp:Creator . 
      ?subject rdf:type ?type .
    }
  }
}
ORDER BY DESC(?count) 

Run this query

Count of the stream subtype entities

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?type ?count (?count/?total*100 as ?percentage) WHERE {
  {
    SELECT ?type (COUNT(?subject) as ?count) WHERE {
      ?type rdfs:subClassOf dblp:Stream . 
      ?subject rdf:type ?type .
    }
    GROUP BY ?type 
  }
  {
    SELECT (COUNT(?subject) as ?total) WHERE {
      ?type rdfs:subClassOf dblp:Stream . 
      ?subject rdf:type ?type .
    }
  }

}
ORDER BY DESC(?count) 

Run this query

Count of the external identifier entities by type

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dblp: <https://dblp.org/rdf/schema#>
PREFIX datacite: <http://purl.org/spar/datacite/>
SELECT ?scheme ?count (?count/?total*100 as ?percentage) WHERE {
  {
    SELECT ?scheme (COUNT(?subject) as ?count) WHERE {
      ?subject datacite:usesIdentifierScheme ?scheme .
      FILTER (?scheme != datacite:dblp-record ) . 
      FILTER (?scheme != datacite:dblp ) .
      FILTER (?scheme != datacite:dblp-stream ) .
    }
    GROUP BY ?scheme
  }
  {
    SELECT (COUNT(?subject) as ?total) WHERE {
      ?subject datacite:usesIdentifierScheme ?scheme .
      FILTER (?scheme != datacite:dblp-record ) . 
      FILTER (?scheme != datacite:dblp ) .
      FILTER (?scheme != datacite:dblp-stream ) .
    }
  }
}
ORDER BY DESC(?count) 

Run this query

Example Queries

A basic SPARQL query

PREFIX dblp: <https://dblp.org/rdf/schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?title ?author ?year WHERE {
  ?paper dblp:title ?title .
  ?paper dblp:authoredBy ?author_id .
  ?author_id rdfs:label ?author .
  ?paper dblp:yearOfPublication ?year .
  FILTER (?year <= "1940"^^xsd:gYear)
}
ORDER BY DESC(?year) ASC(?title)

Run this query

A more advanced SPARQL query

PREFIX dblp: <https://dblp.org/rdf/schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?paper (COUNT(?signature) AS ?num_authors) (COUNT(?orcid) AS ?num_orcid)
              (ROUND(100 * ?num_orcid / ?num_authors) AS ?perc) WHERE {
  ?paper dblp:publishedInStream <https://dblp.org/streams/conf/stoc> .
  ?paper dblp:yearOfEvent "2018"^^xsd:gYear .
  ?paper dblp:hasSignature ?signature .
  OPTIONAL { ?signature dblp:signatureOrcid ?orcid }
}
GROUP BY ?paper
ORDER BY DESC(?perc)

Run this query

A federated query

PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?author_dblp ?author_name ?num_papers ?location WHERE {
  { SELECT ?author_dblp (COUNT(?paper) AS ?num_papers) WHERE {
    ?paper dblp:authoredBy ?author_dblp .
    ?paper dblp:publishedInStream <https://dblp.org/streams/conf/sigir> .
  } GROUP BY ?author_dblp }
  ?author_dblp dblp:primaryCreatorName ?author_name .
  ?author_dblp dblp:wikidata ?person_wd .
  SERVICE <https://query.wikidata.org/sparql> {
    # ?person_wd wdt:P2456 [] .
    ?person_wd wdt:P19 ?place_of_birth .
    ?place_of_birth wdt:P625 ?location .
  }
}
ORDER BY DESC(?num_papers)

Run this query

Querying the dblp KG for citation data

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cito: <http://purl.org/spar/cito/>
PREFIX dblp: <https://dblp.org/rdf/schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT ?publ (COUNT(?cite) as ?count_cite) (SAMPLE(?label) as ?sample_label) WHERE {
  ?publ rdf:type dblp:Publication .
  ?publ dblp:authoredBy ?author .
  ?publ rdfs:label ?label .
  ?author dblp:creatorName "Donald E. Knuth" .
  ?publ dblp:omid ?omid .
  ?cite cito:hasCitedEntity ?omid .
}
GROUP BY ?publ
ORDER BY DESC(?count_cite)

Run this query

Performance Queries

All papers published in SIGIR

PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?paper ?title ?year WHERE {
  ?paper dblp:title ?title .
  ?paper dblp:publishedIn "SIGIR" .
  ?paper dblp:yearOfPublication ?year
}
ORDER BY DESC(?year)

Run this query

Number of papers by venue

PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?venue (COUNT(?paper) as ?count) WHERE {
  ?paper dblp:publishedIn ?venue .
}
GROUP BY ?venue
ORDER BY DESC(?count)

Run this query

Author names matching REGEX

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?author ?author_label ?count WHERE {
  { SELECT ?author ?author_label (COUNT(?paper) as ?count) WHERE {
    ?paper dblp:authoredBy ?author .
    ?paper dblp:publishedIn "SIGIR" .
    ?author rdfs:label ?author_label .
  } GROUP BY ?author ?author_label }
  FILTER REGEX(STR(?author_label), "M.*D.*", "i")
}
ORDER BY DESC(?count)

Run this query

All papers in DBLP until 1940

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dblp: <https://dblp.org/rdf/schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT ?title ?author ?author_label ?year WHERE {
  ?paper dblp:title ?title .
  ?paper dblp:authoredBy ?author .
  ?paper dblp:yearOfPublication ?year .
  ?author rdfs:label ?author_label .
  FILTER (?year <= "1940"^^xsd:gYear)
}
ORDER BY ASC(?year) ASC(?title)

Run this query

All papers with their title

PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?paper ?title WHERE {
  ?paper dblp:title ?title .
}

Run this query

All predicates ordered by size

SELECT ?predicate (COUNT(?subject) as ?count) WHERE {
  ?subject ?predicate ?object
}
GROUP BY ?predicate 
ORDER BY DESC(?count)

Run this query