. . . . "Returns a single row holding an SVG diagram of how the projects of a space cover the three One Health domains: three overlapping circles for Human, Animal and Environment, each region showing the number of projects tagged with exactly that combination of domains via the ZonMw One Health vocabulary (zonmw/r/onehealth/domain), and each domain heading showing how many of the space's projects and how many datasets are tagged with it. Projects are the gen:Project spaces whose IRI extends the given space, tagged or not, which gives the 'of N' denominator; entities are anything under the space's IRI that carries a domain tag, classified as project (gen:Project), dataset (ff:Dataset) or other. The per-entity domain flags are computed once and every count is a conditional sum over that one set of rows, so the figures never multiply each other. Only tags asserted in nanopublications signed by a current admin, maintainer or member of the space or one of its sub-spaces 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. The SVG uses explicit end tags and camelCase attributes and contains no data-derived text other than numbers, so it needs no escaping." . . . "Get a One Health coverage diagram for a space and its sub-spaces" . . "prefix np: \nprefix npa: \nprefix npx: \nprefix gen: \nprefix ff: \nprefix oh: \n\nselect ?svg\nwhere {\n # One row: how many projects and datasets sit in each region of the Human / Animal /\n # Environment diagram, computed from one set of per-entity domain flags so that the\n # sums never multiply each other.\n {\n select\n (sum(if(?kind = \"project\" && ?h = 1 && ?a = 0 && ?e = 0, 1, 0)) as ?pH)\n (sum(if(?kind = \"project\" && ?h = 0 && ?a = 1 && ?e = 0, 1, 0)) as ?pA)\n (sum(if(?kind = \"project\" && ?h = 0 && ?a = 0 && ?e = 1, 1, 0)) as ?pE)\n (sum(if(?kind = \"project\" && ?h = 1 && ?a = 1 && ?e = 0, 1, 0)) as ?pHA)\n (sum(if(?kind = \"project\" && ?h = 1 && ?a = 0 && ?e = 1, 1, 0)) as ?pHE)\n (sum(if(?kind = \"project\" && ?h = 0 && ?a = 1 && ?e = 1, 1, 0)) as ?pAE)\n (sum(if(?kind = \"project\" && ?h = 1 && ?a = 1 && ?e = 1, 1, 0)) as ?pHAE)\n (sum(if(?kind = \"project\" && ?h = 1, 1, 0)) as ?pHt)\n (sum(if(?kind = \"project\" && ?a = 1, 1, 0)) as ?pAt)\n (sum(if(?kind = \"project\" && ?e = 1, 1, 0)) as ?pEt)\n (sum(if(?kind = \"project\", 1, 0)) as ?pTagged)\n (sum(if(?kind = \"dataset\" && ?h = 1, 1, 0)) as ?dHt)\n (sum(if(?kind = \"dataset\" && ?a = 1, 1, 0)) as ?dAt)\n (sum(if(?kind = \"dataset\" && ?e = 1, 1, 0)) as ?dEt)\n (sum(if(?kind = \"dataset\", 1, 0)) as ?dTagged)\n (sum(if(?kind = \"other\" && ?h = 1, 1, 0)) as ?oHt)\n (sum(if(?kind = \"other\" && ?a = 1, 1, 0)) as ?oAt)\n (sum(if(?kind = \"other\" && ?e = 1, 1, 0)) as ?oEt)\n where {\n {\n select ?entity ?kind\n (max(if(?domain = oh:Human, 1, 0)) as ?h)\n (max(if(?domain = oh:Animal, 1, 0)) as ?a)\n (max(if(?domain = oh:Environment, 1, 0)) as ?e)\n where {\n values ?_space_multi_iri {}\n {\n select (group_concat(distinct ?mpk; separator=\" \") as ?memberPubkeys) where {\n service {\n select ?mpk where {\n values ?_space_multi_iri {}\n graph npa:graph { npa:hasCurrentSpaceState ?stateG . }\n graph ?stateG {\n ?ri a gen:RoleInstantiation ; npa:forSpace ?sp ; npa:forAgent ?agent ; npa:hasRoleType ?rt .\n filter(?rt in (gen:AdminRole, gen:MaintainerRole, gen:MemberRole))\n ?acct a npa:AccountState ; npa:agent ?agent ; npa:pubkey ?mpk .\n }\n filter(?sp = ?_space_multi_iri || strstarts(str(?sp), concat(str(?_space_multi_iri), \"/\")))\n }\n }\n }\n }\n graph npa:graph {\n ?np npa:hasValidSignatureForPublicKeyHash ?npPubkey .\n filter not exists { ?invNp npx:invalidates ?np ; npa:hasValidSignatureForPublicKeyHash ?npPubkey . }\n filter not exists { ?supNp npx:supersedes ?np . }\n filter not exists { ?np npx:hasNanopubType npx:ExampleNanopub . }\n ?np np:hasAssertion ?a0 .\n }\n filter(contains(?memberPubkeys, ?npPubkey))\n graph ?a0 { ?entity oh:domain ?domain . }\n filter(strstarts(str(?entity), concat(str(?_space_multi_iri), \"/\")))\n bind(if(exists { graph ?ta { ?entity a gen:Project } }, \"project\",\n if(exists { graph ?tb { ?entity a ff:Dataset } }, \"dataset\", \"other\")) as ?kind)\n }\n group by ?entity ?kind\n }\n }\n }\n # Denominator: every project space in the subtree, tagged or not.\n {\n select (count(distinct ?project) as ?pAll) where {\n values ?_space_multi_iri {}\n graph npa:graph { ?pnp np:hasAssertion ?pa . filter not exists { ?psup npx:supersedes ?pnp . } }\n graph ?pa { ?project a gen:Project . }\n filter(strstarts(str(?project), concat(str(?_space_multi_iri), \"/\")))\n }\n }\n bind(if(?pAll > 0, ?pAll, ?pTagged) as ?pTotal)\n bind(concat(\n '',\n '',\n '',\n '',\n 'Human',\n '', str(?pHt), ' of ', str(?pTotal), ' projects, ', str(?dHt), ' datasets',\n 'Animal',\n '', str(?pAt), ' of ', str(?pTotal), ' projects, ', str(?dAt), ' datasets',\n 'Environment',\n '', str(?pEt), ' of ', str(?pTotal), ' projects, ', str(?dEt), ' datasets',\n ' 0, '#222', '#aaa'), '\">', str(?pH), '',\n ' 0, '#222', '#aaa'), '\">', str(?pA), '',\n ' 0, '#222', '#aaa'), '\">', str(?pE), '',\n ' 0, '#222', '#aaa'), '\">', str(?pHA), '',\n ' 0, '#222', '#aaa'), '\">', str(?pHE), '',\n ' 0, '#222', '#aaa'), '\">', str(?pAE), '',\n ' 0, '#222', '#aaa'), '\">', str(?pHAE), '',\n 'Numbers: projects per region (', str(?pTagged), ' of ', str(?pTotal), ' projects tagged, ', str(?dTagged), ' datasets)',\n '') as ?svg)\n}" . . "Tobias Kuhn" . "2026-09-13T05:32:24Z"^^ . . . . "Get a One Health coverage diagram for a space and its sub-spaces" . . . . . "RSA" . "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCwUtewGCpT5vIfXYE1bmf/Uqu1ojqnWdYxv+ySO80ul8Gu7m8KoyPAwuvaPj0lvPtHrg000qMmkxzKhYknEjq8v7EerxZNYp5B3/3+5ZpuWOYAs78UnQVjbHSmDdmryr4D4VvvNIiUmd0yxci47dTFUj4DvfHnGd6hVe5+goqdcwIDAQAB" . "AYD3btJN+kkQKJvpMXgJW/WUcAdli1ctXlF7m/qLdpMAUczBZCbV7gXGERgd/w07RwUCMfWA5btJdEF8Us5dcIn7TovnxLKnUI4NgQLKAOrJhmOGNGFEtP5nUa06emfWuTgr82MipwphD1585Y3YOVpRaOGw5t7Nll+7Riuo1xY=" . . .