Skip to content

Commit

Permalink
Merge branch 'cito/nanopubs'
Browse files Browse the repository at this point in the history
  • Loading branch information
fnielsen committed Mar 20, 2024
2 parents 56cd584 + 6c170e7 commit efbc664
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scholia/app/templates/cito-index_articles-by-year.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ select ?year (count(?work) as ?number_of_publications) ?role where {
{
select ?work (min(?years) as ?year) ?type_ ?venue where {
?work wdt:P577 ?dates ;
p:P2860 / pq:P3712 / wdt:P31 wd:Q96471816 .
p:P2860 ?citesStatement .
?citesStatement pq:P3712 / wdt:P31 wd:Q96471816 .
bind(str(year(?dates)) as ?years) .
OPTIONAL {
?work wdt:P31 wd:Q109229154 . bind("explicit" as ?type_)
?work wdt:P1433 ?venue_ . ?venue_ rdfs:label ?venue . FILTER (LANG(?venue) = "en")
MINUS { ?venue_ wdt:P31 wd:Q1143604 }
}
OPTIONAL {
bind("nanopub" as ?type_) bind("Nanopublication" as ?venue)
?citesStatement prov:wasDerivedFrom ?reference .
?reference pr:P854 ?referenceURL .
FILTER (
strstarts(str(?referenceURL), "https://w3id.org/np/") ||
strstarts(str(?referenceURL), "http://purl.org/np/")
)
}
}
group by ?work ?type_ ?venue
}
Expand Down
16 changes: 16 additions & 0 deletions scholia/app/templates/cito-index_statistics.sparql
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ WITH {
?citoDataset wdt:P31 wd:Q117357566 .
}
} AS %citoDatasets
WITH {
SELECT (COUNT(DISTINCT ?citoNanopub) AS ?count) WHERE {
?citoNanopub p:P2860 ?citationStatement .
?citationStatement pq:P3712 / wdt:P31 wd:Q96471816 ;
prov:wasDerivedFrom / pr:P854 ?referenceURL .
FILTER (
strstarts(str(?referenceURL), "https://w3id.org/np/") ||
strstarts(str(?referenceURL), "http://purl.org/np/")
)
}
} AS %citoNanopubs
WHERE {
{
INCLUDE %annotions
Expand Down Expand Up @@ -90,5 +101,10 @@ WHERE {
INCLUDE %citoJournalsExplicit
BIND("Number of venues with explicit CiTO annotation" AS ?description)
}
UNION
{
INCLUDE %citoNanopubs
BIND("Number of nanopublications with explicit CiTO annotation" AS ?description)
}
}
ORDER BY DESC(?count)

0 comments on commit efbc664

Please sign in to comment.