@prefix this: . @prefix sub: . @prefix np: . @prefix dct: . @prefix nt: . @prefix npx: . @prefix xsd: . @prefix rdfs: . @prefix orcid: . @prefix prov: . @prefix foaf: . sub:Head { this: a np:Nanopublication; np:hasAssertion sub:assertion; np:hasProvenance sub:provenance; np:hasPublicationInfo sub:pubinfo . } sub:assertion { sub:get-cumulative-user-count a ; dct:description "Returns the cumulative number of human users (with ORCID) who have published an introduction nanopub, per week (Mon-Sun)."; dct:license ; rdfs:label "Get cumulative user count by week"; ; """prefix np: prefix npa: prefix npx: prefix xsd: prefix dct: select ?week (substr(str(min(?fd1)), 0, 11) as ?firstday) (count(distinct ?u2) as ?totalusers) where { { select ?u1 ?fd1 ?w1 where { { select ?u1 (min(?d1) as ?fd1) where { graph npa:graph { ?np1 npa:hasValidSignatureForPublicKey ?pk1 . ?np1 dct:creator ?u1 . ?np1 dct:created ?d1 . ?np1 np:hasAssertion ?a1 . } graph ?a1 { ?decl1 npx:declaredBy ?agent1 . } filter(strstarts(str(?u1), \"https://orcid.org/\")) filter(?u1 != ) filter(?u1 != ) } group by ?u1 } bind(if(month(?fd1) <= 2, year(?fd1) - 1, year(?fd1)) as ?y1) bind(if(month(?fd1) <= 2, month(?fd1) + 9, month(?fd1) - 3) as ?m1) bind(365*?y1 + xsd:integer(?y1/4) - xsd:integer(?y1/100) + xsd:integer(?y1/400) + xsd:integer((153*?m1 + 2)/5) + day(?fd1) as ?dn1) bind(?dn1 + 1 - xsd:integer((?dn1 + 1) / 7) * 7 as ?dw1) bind(xsd:integer((?dn1 - ?dw1) / 7) as ?w1) } } { select ?u2 ?w2 where { { select ?u2 (min(?d2) as ?fd2) where { graph npa:graph { ?np2 npa:hasValidSignatureForPublicKey ?pk2 . ?np2 dct:creator ?u2 . ?np2 dct:created ?d2 . ?np2 np:hasAssertion ?a2 . } graph ?a2 { ?decl2 npx:declaredBy ?agent2 . } filter(strstarts(str(?u2), \"https://orcid.org/\")) filter(?u2 != ) filter(?u2 != ) } group by ?u2 } bind(if(month(?fd2) <= 2, year(?fd2) - 1, year(?fd2)) as ?y2) bind(if(month(?fd2) <= 2, month(?fd2) + 9, month(?fd2) - 3) as ?m2) bind(365*?y2 + xsd:integer(?y2/4) - xsd:integer(?y2/100) + xsd:integer(?y2/400) + xsd:integer((153*?m2 + 2)/5) + day(?fd2) as ?dn2) bind(?dn2 + 1 - xsd:integer((?dn2 + 1) / 7) * 7 as ?dw2) bind(xsd:integer((?dn2 - ?dw2) / 7) as ?w2) } } bind(?w1 as ?week) filter(?w2 <= ?week) } group by ?week order by desc(?week)""" . } sub:provenance { sub:assertion prov:wasAttributedTo orcid:0000-0002-1267-0234 . } sub:pubinfo { orcid:0000-0002-1267-0234 foaf:name "Tobias Kuhn" . this: dct:created "2026-03-19T10:27:00Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:introduces sub:get-cumulative-user-count; prov:wasDerivedFrom ; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "BwpFUU4JZY4RpRISX3y1EO87R8YiyGvurixNFvAUh0d9ut8tM1TkNMKP3JlqSV4kiq1aya9QXduR2Imr7Sw25UooQOjMxtrWgERNMv8uOtF96lb4J1cjn7lB9GNlvY+HVruTZ29w3pnwTbT3pX3PP9sBMgKy4K4NDfAcY3Ze00U="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }