def get_authors(): global endpoint query = """select ?autor, COUNT(?autor) as ?pubcount from <http://pebbie.net/bibint/1/> where { ?doc dc:creator ?autor. } GROUP BY ?autor ORDER BY DESC(?pubcount) LIMIT 100""" return run_sparql(endpoint, query)
def get_years(): global endpoint query = """ SELECT ?year, COUNT(?year) as ?yearlycount from <http://pebbie.net/bibint/1/> where { ?doc dcterms:issued ?year. } GROUP BY ?year ORDER BY DESC(?year) """ return run_sparql(endpoint, query)