@prefix this: . @prefix sub: . @prefix np: . @prefix grlc: . @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-activity-overview-of-space a grlc:grlc-query; dct:description "Returns one row per kind of activity (study) reported across the projects of a space: the kind with its label, how many activities of that kind there are, and how many projects report at least one. Activities are the resources typed obo:OBI_0000066 (study) that declare themselves part of the space itself or of a space whose IRI extends it with a slash, the same sub-space convention the sibling 'all projects' views use; the kind is any more specific type the study carries in addition to obo:OBI_0000066, such as the OBI investigation classes or the schema.org study classes offered by the 'Defining a study' template, labelled from the pubinfo of the study nanopublication, with studies carrying no more specific type reported as 'study (kind unspecified)'. A study with several specific types counts once under each of them, mirroring the sibling evidence overview query, whose shape this query follows. Only study nanopublications signed by a current admin, maintainer or member of a space in the subtree count, with invalidated, superseded and example nanopublications skipped; the membership lookup is a federated sub-select sharing no variables with the rest of the query, so it runs once."; dct:license ; rdfs:label "Get the activity kinds reported across the projects of a space"; grlc:endpoint ; grlc:sparql """prefix np: prefix npa: prefix npx: prefix gen: prefix dct: prefix rdfs: prefix obo: select ?activity_type (min(?typeLabel) as ?activity_type_label) (sum(?n) as ?activities) (count(distinct ?project) as ?projects) where { { select ?activity_type ?project (min(?typeLabel0) as ?typeLabel) (count(distinct ?study) as ?n) where { values ?_space_multi_iri {} { select (group_concat(?mpk; separator=\" \") as ?memberPubkeys) where { service { select ?mpk where { values ?_space_multi_iri {} graph npa:graph { npa:hasCurrentSpaceState ?stateG . } graph ?stateG { ?ri a gen:RoleInstantiation ; npa:forSpace ?sp ; npa:forAgent ?agent ; npa:hasRoleType ?roleType . filter(?roleType in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole)) ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk . } filter(?sp = ?_space_multi_iri || strstarts(str(?sp), concat(str(?_space_multi_iri), \"/\"))) } } } } graph npa:graph { ?studyNp np:hasAssertion ?studyA ; np:hasPublicationInfo ?studyPi ; npa:hasValidSignatureForPublicKeyHash ?studyPk . filter not exists { ?studyInv npx:invalidates ?studyNp ; npa:hasValidSignatureForPublicKeyHash ?studyPk } filter not exists { ?studySup npx:supersedes ?studyNp } filter not exists { ?studyNp npx:hasNanopubType npx:ExampleNanopub } } filter(contains(?memberPubkeys, ?studyPk)) graph ?studyA { ?study a obo:OBI_0000066 ; dct:isPartOf ?project . } filter(?project = ?_space_multi_iri || strstarts(str(?project), concat(str(?_space_multi_iri), \"/\"))) # The more specific kind is any further type the study carries; its label is # recorded in the pubinfo of the study nanopublication. optional { graph ?studyA { ?study a ?sub . filter(?sub != obo:OBI_0000066) } optional { graph ?studyPi { ?sub rdfs:label ?subLabel } } } bind(coalesce(?sub, obo:OBI_0000066) as ?activity_type) bind(coalesce(?subLabel, if(bound(?sub), replace(str(?sub), \"^.*[/#]\", \"\"), \"study (kind unspecified)\")) as ?typeLabel0) } group by ?activity_type ?project } } group by ?activity_type order by desc(?activities) ?activity_type_label""" . } 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-09-13T05:36:15Z"^^xsd:dateTime; dct:creator orcid:0000-0002-1267-0234; dct:license ; npx:embeds sub:get-activity-overview-of-space; rdfs:label "Get the activity kinds reported across the projects of a space"; nt:wasCreatedFromProvenanceTemplate ; nt:wasCreatedFromPubinfoTemplate , ; nt:wasCreatedFromTemplate . sub:sig npx:hasAlgorithm "RSA"; npx:hasPublicKey "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB"; npx:hasSignature "RjAmWzk4EeclRpiOBP2Tj0TbcIPEjMJ/WqLex5m58R1OuTy2yWx2tI6ZG0hWZYhBlhKvhp/RI6LP2X23Wo7IFXbAcfSiy1LklSL6FCkPrI3TrWjklLY+GQRXqQgxqcP3LJFC6ODZtW9c4N7eHReGSlLH7IRXIvQQtF3c/xR0JqI="; npx:hasSignatureTarget this:; npx:signedBy orcid:0000-0002-1267-0234 . }