Matches in Nanopublications for { <https://w3id.org/np/RAqLNf0-hUqFK9oAURrkWtF_AU27-u4unk5LJObU-U04s/get-weekly-active-user-count> ?p ?o ?g. }
Showing items 1 to 6 of
6
with 100 items per page.
- get-weekly-active-user-count type grlc-query assertion.
- get-weekly-active-user-count label "Get weekly active user count" assertion.
- get-weekly-active-user-count description "Returns the number of active users per week (Mon-Sun)." assertion.
- get-weekly-active-user-count sparql "prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix xsd: <http://www.w3.org/2001/XMLSchema#> prefix dct: <http://purl.org/dc/terms/> prefix prov: <http://www.w3.org/ns/prov#> prefix foaf: <http://xmlns.com/foaf/0.1/> select ?week (substr(str(min(?date)), 0, 11) as ?firstday) (count(distinct ?userid) as ?usercount) where { { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np dct:creator ?userid . ?np dct:created ?date . } } union { graph npa:graph { ?np npa:hasValidSignatureForPublicKey ?pubkey . ?np np:hasAssertion ?assertion . ?np np:hasProvenance ?prov . ?np dct:created ?date . ?np dct:creator ?tool . values ?tool { <https://fip-wizard.ds-wizard.org/wizard> } } graph ?prov { ?assertion prov:wasAttributedTo ?userid . } } filter not exists { graph npa:graph { ?np npa:hasSubIri ?userid . } } 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)" assertion.
- get-weekly-active-user-count endpoint full assertion.
- get-weekly-active-user-count license LICENSE-2.0 assertion.