Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
Permalink
Browse files

Merge pull request #953 from fnielsen/more-stats

more stats on homepage, as per #336
  • Loading branch information...
Daniel-Mietchen committed Nov 30, 2019
2 parents 5c4a88f + 850be9b commit c9056a8de64919254877b8a2464b348a4e4cb24b
Showing with 28 additions and 88 deletions.
  1. +28 −88 scholia/app/templates/index.html
@@ -184,96 +184,36 @@ <h2>Statistics</h2>
statisticsSparql = `
SELECT ?count ?description
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] ?p [] . }
} AS %triples
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P50 []. }
} AS %authors
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P225 []. }
} AS %taxa
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P356 []. }
} AS %dois
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P496 []. }
} AS %orcids
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P625 []. }
} AS %geoloc
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P698 []. }
} AS %pmids
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P921 []. }
} AS %topics
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P932 []. }
} AS %pmcids
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P2093 []. }
} AS %authorstrings
WITH {
SELECT (COUNT(*) AS ?count) WHERE { [] wdt:P2860 [] . }
} AS %cites
WHERE {
{
INCLUDE %triples
BIND("Total number of triples" AS ?description)
}
UNION
{
INCLUDE %pmids
BIND("Items with a PubMed ID" AS ?description)
}
UNION
{
INCLUDE %pmcids
BIND("Items with a PubMed Central ID" AS ?description)
}
UNION
{
INCLUDE %dois
BIND("Items with a DOI" AS ?description)
}
UNION
{
INCLUDE %cites
BIND("Citations" AS ?description)
}
UNION
{
INCLUDE %authors
BIND("Links from items about works to items about their authors" AS ?description)
}
UNION
{
INCLUDE %authorstrings
BIND("Author name strings on items about works" AS ?description)
}
UNION
{
INCLUDE %orcids
BIND("Items about authors with an ORCID ID" AS ?description)
}
UNION
{
INCLUDE %taxa
BIND("Items with a taxon name" AS ?description)
}
UNION
{
INCLUDE %geoloc
BIND("Items with a geolocation" AS ?description)
}
UNION
{
INCLUDE %topics
BIND("Links from items about works to items about their main subjects" AS ?description)
}
{ {SELECT (COUNT(*) AS ?c) WHERE {?s ?p ?o} } BIND("Total number of triples" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {?p a wikibase:Property} } BIND("Total number of properties" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P50 []} } BIND("Links from works to authors" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P69 []} } BIND("Links from people to where they were educated" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P108 []} } BIND("Links from people to employers" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P166 []} } BIND("Links from people to awards" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P212 []} } BIND("ISBN 13 book numbers" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P225 []} } BIND("Taxon names" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P234 []} } BIND("InChIs" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P236 []} } BIND("ISSNs" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P496 []} } BIND("ORCIDs" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P625 []} } BIND("Geolocations" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P638 []} } BIND("Protein Data Bank IDs" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P686 []} } BIND("Gene Ontology IDs" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P698 []} } BIND("PubMed ID" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P818 []} } BIND("arXiv IDs" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P859 []} } BIND("Links to sponsors" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P921 []} } BIND("Links from works to their main subjects" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P932 []} } BIND("Items with a PubMed Central ID" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P356 []} } BIND("Items with a DOI" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P1416 []} } BIND("Links from people to their affiliations" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P2093 []} } BIND("Author name strings" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P2427 []} } BIND("Items with a GRID ID" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P2860 []} } BIND("Citations" AS ?d)} UNION
{ {SELECT (COUNT(*) AS ?c) WHERE {[] wdt:P31 wd:Q13442814.} } BIND("Scholarly articles" AS ?d)}
BIND (?c AS ?count)
BIND (?d AS ?description)
}
ORDER BY DESC(?count)
ORDER BY DESC(?c)
`
$(document).ready(function() {

0 comments on commit c9056a8

Please sign in to comment.
You can’t perform that action at this time.