@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-weekly-nanopub-count a ; dct:description "Returns the number of nanopublications published per week (Mon-Sun)."; dct:license ; rdfs:label "Get weekly nanopub count"; ; """prefix np: prefix npa: prefix npx: prefix xsd: prefix dct: select ?week (substr(str(min(?date)), 0, 11) as ?firstday) (count(?np) as ?nanopubcount) where { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:created ?date . } bind(if(month(?date) <= 2, year(?date) - 1, year(?date)) as ?y) bind(if(month(?date) <= 2, month(?date) + 9, month(?date) - 3) as ?m) bind(365*?y + xsd:integer(?y/4) - xsd:integer(?y/100) + xsd:integer(?y/400) + xsd:integer((153*?m + 2)/5) + day(?date) as ?daynum) bind(?daynum + 1 - xsd:integer((?daynum + 1) / 7) * 7 as ?dow) bind(xsd:integer((?daynum - ?dow) / 7) as ?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-04-01T16:30:36Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-weekly-nanopub-count; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "RnAYCwVb3rD6qp39Gmw4e7bUWNuHGcoPl18GHUCDXdz0+kn8w6u+KlGscDJKfsuUub3xvj+coma09INfkQ4aK0qbwkRrqqNDSNhFkeaEw03Aw9oZ7ByGzjJiz+yOpyDZvyMyG7ZPtH+CiEnYPDZ7B6Vs6eLksyyQrMWipCRtgjU="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }