Computes an SVG summary diagram of a FAIR project: the studies and other activities in the middle, the reused datasets that feed them on the left, the outputs they produce on the right, the findings and insights they yield above, and the people and their institutions below. Every box links to the resource it stands for.
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> prefix dct: <http://purl.org/dc/terms/> prefix np: <http://www.nanopub.org/nschema#> prefix npa: <http://purl.org/nanopub/admin/> prefix npx: <http://purl.org/nanopub/x/> prefix gen: <https://w3id.org/kpxl/gen/terms/> prefix ff: <https://w3id.org/fair/ff/terms/> prefix obo: <http://purl.obolibrary.org/obo/> prefix hycl: <http://purl.org/petapico/o/hycl#> prefix cito: <http://purl.org/spar/cito/> prefix foaf: <http://xmlns.com/foaf/0.1/> select (concat( ' ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 46) + (floor((?nppl + 2) / 3) * 36) + 38) + (floor((?ninst + 2) / 3) * 36) + 12)), '" width="', str(700 * 3 / 2), '" height="', str(((((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 46) + (floor((?nppl + 2) / 3) * 36) + 38) + (floor((?ninst + 2) / 3) * 36) + 12) * 3 / 2), '" font-family="sans-serif">', ' KNOWLEDGE ', '<g transform="translate(13,', str(26), ')">', ?boxeskno, '</g>', ' INPUTS ', '<g transform="translate(0,', str((26 + (floor((?nkno + 1) / 2) * 36) + 46)), ')">', ?boxesin, '</g>', ' ACTIVITIES ', '<g transform="translate(250,', str((26 + (floor((?nkno + 1) / 2) * 36) + 46)), ')">', ?boxesact, '</g>', ' OUTPUTS ', '<g transform="translate(500,', str((26 + (floor((?nkno + 1) / 2) * 36) + 46)), ')">', ?boxesout, '</g>', ' ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 46) - 10), '" text-anchor="middle" font-size="11" font-weight="bold" fill="#444" letter-spacing="0.8">PEOPLE ', '<g transform="translate(12,', str(((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 46)), ')">', ?boxesppl, '</g>', ' ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 46) + (floor((?nppl + 2) / 3) * 36) + 38) - 10), '" text-anchor="middle" font-size="11" font-weight="bold" fill="#444" letter-spacing="0.8">INSTITUTIONS ', '<g transform="translate(12,', str((((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 46) + (floor((?nppl + 2) / 3) * 36) + 38)), ')">', ?boxesinst, '</g>', ' ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3)), '" x2="238" y2="', str(((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3)), '" stroke="#666" stroke-width="1.5"> ', ' ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3)), ' L 236 ', str(((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3) - 5), ' L 236 ', str(((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3) + 5), ' Z" fill="#666"> ', ' ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3)), '" x2="488" y2="', str(((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3)), '" stroke="#666" stroke-width="1.5"> ', ' ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3)), ' L 486 ', str(((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3) - 5), ' L 486 ', str(((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) / 2 - 3) + 5), ' Z" fill="#666"> ', ' ', ' ', ' ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 46) - 24), '" x2="350" y2="', str((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 2), '" stroke="#bbb" stroke-width="1.5" stroke-dasharray="3 3"> ', ' ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 46) + (floor((?nppl + 2) / 3) * 36) + 38) - 24), '" x2="350" y2="', str(((26 + (floor((?nkno + 1) / 2) * 36) + 46) + ((if(?nin > ?nact, if(?nin > ?nout, ?nin, ?nout), if(?nact > ?nout, ?nact, ?nout))) * 36) + 46) + (floor((?nppl + 2) / 3) * 36) + 2), '" stroke="#bbb" stroke-width="1.5" stroke-dasharray="3 3"> ', ' ') as ?svg) ("FAIR project summary" as ?title) where { { select (group_concat(distinct ?boxkno; separator="") as ?boxeskno) (count(*) as ?nkno) where { { select ?irikno (min(?labelkno) as ?lblkno) (min(?iconkno) as ?icokno) (group_concat(distinct ?typekno; separator=" / ") as ?typkno) (count(distinct ?okno) as ?iykno) where { values ?_project_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . } values ?_project_multi_iri {} graph ?stateG { ?_project_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; 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 . } } } graph npa:graph { ?npskno np:hasAssertion ?askno ; npa:hasValidSignatureForPublicKeyHash ?pkskno . filter not exists { ?ixskno npx:invalidates ?npskno ; npa:hasValidSignatureForPublicKeyHash ?pkskno . } filter not exists { ?sxskno npx:supersedes ?npskno . } } graph ?askno { ?studykno a obo:OBI_0000066 ; dct:isPartOf ?_project_multi_iri . } graph npa:graph { ?npkno np:hasAssertion ?akno ; np:hasPublicationInfo ?pikno ; npa:hasValidSignatureForPublicKeyHash ?pkkno . filter not exists { ?ixkno npx:invalidates ?npkno ; npa:hasValidSignatureForPublicKeyHash ?pkkno . } filter not exists { ?sxkno npx:supersedes ?npkno . } } graph ?akno { ?irikno a hycl:AIDA-Sentence ; cito:obtainsSupportFrom ?studykno . } optional { graph ?pikno { ?npkno rdfs:label ?lpkno } } bind(coalesce(?lpkno, "(finding)") as ?labelkno) bind("finding" as ?typekno) bind("💡" as ?iconkno) filter(contains(?memberPubkeys, ?pkkno)) optional { graph npa:graph { ?onpskno np:hasAssertion ?oaskno ; npa:hasValidSignatureForPublicKeyHash ?opkskno . filter not exists { ?oixskno npx:invalidates ?onpskno ; npa:hasValidSignatureForPublicKeyHash ?opkskno . } filter not exists { ?osxskno npx:supersedes ?onpskno . } } graph ?oaskno { ?ostudykno a obo:OBI_0000066 ; dct:isPartOf ?_project_multi_iri . } graph npa:graph { ?onpkno np:hasAssertion ?oakno ; np:hasPublicationInfo ?opikno ; npa:hasValidSignatureForPublicKeyHash ?opkkno . filter not exists { ?oixkno npx:invalidates ?onpkno ; npa:hasValidSignatureForPublicKeyHash ?opkkno . } filter not exists { ?osxkno npx:supersedes ?onpkno . } } graph ?oakno { ?okno a hycl:AIDA-Sentence ; cito:obtainsSupportFrom ?ostudykno . } filter(str(?okno) < str(?irikno) && contains(?memberPubkeys, ?opkkno)) } } group by ?irikno } bind((?iykno - floor(?iykno / 2) * 2) * 344 as ?bxkno) bind(floor(?iykno / 2) * 36 as ?bykno) bind(if(strlen(?lblkno) > 49, concat(substr(?lblkno, 1, 48), "…"), ?lblkno) as ?tkno) bind(replace(replace(replace(?tkno, "&", "&"), "<", "<"), ">", ">") as ?esckno) bind(replace(replace(replace(?lblkno, "&", "&"), "<", "<"), ">", ">") as ?fullkno) bind(concat('', ' ', ?fullkno, ' ', ' ', ' ', ?icokno, ' ', ?esckno, ' ', ' ', ?typkno, ' ', '') as ?boxkno) } } { select (group_concat(distinct ?boxin; separator="") as ?boxesin) (count(*) as ?nin) where { { select ?iriin (min(?labelin) as ?lblin) (min(?iconin) as ?icoin) (group_concat(distinct ?typein; separator=" / ") as ?typin) (count(distinct ?oin) as ?iyin) where { values ?_project_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . } values ?_project_multi_iri {} graph ?stateG { ?_project_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; 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 . } } } graph npa:graph { ?npin np:hasAssertion ?ain ; np:hasPublicationInfo ?piin ; npa:hasValidSignatureForPublicKeyHash ?pkin . filter not exists { ?ixin npx:invalidates ?npin ; npa:hasValidSignatureForPublicKeyHash ?pkin . } filter not exists { ?sxin npx:supersedes ?npin . } } graph ?ain { ?_project_multi_iri ff:reuses ?iriin . } optional { graph ?ain { ?iriin rdfs:label ?lain } } optional { graph ?piin { ?iriin foaf:name ?lfin } } optional { graph ?piin { ?iriin rdfs:label ?lqin } } bind(coalesce(?lain, ?lfin, ?lqin, replace(str(?iriin), "^.*[/#]", "")) as ?labelin) bind("reused dataset" as ?typein) bind("💾" as ?iconin) filter(contains(?memberPubkeys, ?pkin)) optional { graph npa:graph { ?onpin np:hasAssertion ?oain ; np:hasPublicationInfo ?opiin ; npa:hasValidSignatureForPublicKeyHash ?opkin . filter not exists { ?oixin npx:invalidates ?onpin ; npa:hasValidSignatureForPublicKeyHash ?opkin . } filter not exists { ?osxin npx:supersedes ?onpin . } } graph ?oain { ?_project_multi_iri ff:reuses ?oin . } filter(str(?oin) < str(?iriin) && contains(?memberPubkeys, ?opkin)) } } group by ?iriin } bind((?iyin - floor(?iyin / 1) * 1) * 214 as ?bxin) bind(floor(?iyin / 1) * 36 as ?byin) bind(if(strlen(?lblin) > 27, concat(substr(?lblin, 1, 26), "…"), ?lblin) as ?tin) bind(replace(replace(replace(?tin, "&", "&"), "<", "<"), ">", ">") as ?escin) bind(replace(replace(replace(?lblin, "&", "&"), "<", "<"), ">", ">") as ?fullin) bind(concat('', ' ', ?fullin, ' ', ' ', ' ', ?icoin, ' ', ?escin, ' ', ' ', ?typin, ' ', '') as ?boxin) } } { select (group_concat(distinct ?boxact; separator="") as ?boxesact) (count(*) as ?nact) where { { select ?iriact (min(?labelact) as ?lblact) (min(?iconact) as ?icoact) (group_concat(distinct ?typeact; separator=" / ") as ?typact) (count(distinct ?oact) as ?iyact) where { values ?_project_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . } values ?_project_multi_iri {} graph ?stateG { ?_project_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; 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 . } } } graph npa:graph { ?npact np:hasAssertion ?aact ; np:hasPublicationInfo ?piact ; npa:hasValidSignatureForPublicKeyHash ?pkact . filter not exists { ?ixact npx:invalidates ?npact ; npa:hasValidSignatureForPublicKeyHash ?pkact . } filter not exists { ?sxact npx:supersedes ?npact . } } graph ?aact { ?iriact a obo:OBI_0000066 ; dct:isPartOf ?_project_multi_iri . } optional { graph ?aact { ?iriact rdfs:label ?laact } } optional { graph ?aact { ?iriact a ?subact . filter(?subact != obo:OBI_0000066 && strstarts(str(?subact), "http://purl.obolibrary.org/obo/OBI_")) } graph ?piact { ?subact rdfs:label ?sublact } } bind(coalesce(?laact, replace(str(?iriact), "^.*[/#]", "")) as ?labelact) bind(coalesce(replace(?sublact, " .*", ""), "study") as ?typeact) bind("🧪" as ?iconact) filter(contains(?memberPubkeys, ?pkact)) optional { graph npa:graph { ?onpact np:hasAssertion ?oaact ; np:hasPublicationInfo ?opiact ; npa:hasValidSignatureForPublicKeyHash ?opkact . filter not exists { ?oixact npx:invalidates ?onpact ; npa:hasValidSignatureForPublicKeyHash ?opkact . } filter not exists { ?osxact npx:supersedes ?onpact . } } graph ?oaact { ?oact a obo:OBI_0000066 ; dct:isPartOf ?_project_multi_iri . } filter(str(?oact) < str(?iriact) && contains(?memberPubkeys, ?opkact)) } } group by ?iriact } bind((?iyact - floor(?iyact / 1) * 1) * 214 as ?bxact) bind(floor(?iyact / 1) * 36 as ?byact) bind(if(strlen(?lblact) > 27, concat(substr(?lblact, 1, 26), "…"), ?lblact) as ?tact) bind(replace(replace(replace(?tact, "&", "&"), "<", "<"), ">", ">") as ?escact) bind(replace(replace(replace(?lblact, "&", "&"), "<", "<"), ">", ">") as ?fullact) bind(concat('', ' ', ?fullact, ' ', ' ', ' ', ?icoact, ' ', ?escact, ' ', ' ', ?typact, ' ', '') as ?boxact) } } { select (group_concat(distinct ?boxout; separator="") as ?boxesout) (count(*) as ?nout) where { { select ?iriout (min(?labelout) as ?lblout) (min(?iconout) as ?icoout) (group_concat(distinct ?typeout; separator=" / ") as ?typout) (count(distinct ?oout) as ?iyout) where { values ?_project_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . } values ?_project_multi_iri {} graph ?stateG { ?_project_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; 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 . } } } graph npa:graph { ?npout np:hasAssertion ?aout ; np:hasPublicationInfo ?piout ; npa:hasValidSignatureForPublicKeyHash ?pkout . filter not exists { ?ixout npx:invalidates ?npout ; npa:hasValidSignatureForPublicKeyHash ?pkout . } filter not exists { ?sxout npx:supersedes ?npout . } } graph ?aout { ?_project_multi_iri ?relout ?iriout . values ?relout { ff:has-article ff:has-dataset ff:has-software ff:has-method ff:has-dmp ff:has-presentation ff:has-blog-post ff:has-media-coverage ff:has-social-post ff:has-podcast ff:has-discussion } } optional { graph ?aout { ?iriout rdfs:label ?laout } } optional { graph ?piout { ?iriout foaf:name ?lfout } } optional { graph ?piout { ?iriout rdfs:label ?lqout } } bind(coalesce(?laout, ?lfout, ?lqout, replace(str(?iriout), "^.*[/#]", "")) as ?labelout) bind(strafter(str(?relout), "https://w3id.org/fair/ff/terms/has-") as ?raw) bind(replace(?raw, "-", " ") as ?typeout) bind(if(?raw = "article", "📄", if(?raw = "software", "💻", if(?raw = "dataset", "💾", if(?raw = "presentation", "🎤", if(?raw = "blog-post", "📝", if(?raw = "podcast", "🎧", if(?raw = "media-coverage", "📰", if(?raw = "social-post", "💬", if(?raw = "discussion", "💬", if(?raw = "method", "🔧", if(?raw = "dmp", "📋", "🔗"))))))))))) as ?iconout) filter(contains(?memberPubkeys, ?pkout)) optional { graph npa:graph { ?onpout np:hasAssertion ?oaout ; np:hasPublicationInfo ?opiout ; npa:hasValidSignatureForPublicKeyHash ?opkout . filter not exists { ?oixout npx:invalidates ?onpout ; npa:hasValidSignatureForPublicKeyHash ?opkout . } filter not exists { ?osxout npx:supersedes ?onpout . } } graph ?oaout { ?_project_multi_iri ?orelout ?oout . values ?orelout { ff:has-article ff:has-dataset ff:has-software ff:has-method ff:has-dmp ff:has-presentation ff:has-blog-post ff:has-media-coverage ff:has-social-post ff:has-podcast ff:has-discussion } } filter(str(?oout) < str(?iriout) && contains(?memberPubkeys, ?opkout)) } } group by ?iriout } bind((?iyout - floor(?iyout / 1) * 1) * 214 as ?bxout) bind(floor(?iyout / 1) * 36 as ?byout) bind(if(strlen(?lblout) > 27, concat(substr(?lblout, 1, 26), "…"), ?lblout) as ?tout) bind(replace(replace(replace(?tout, "&", "&"), "<", "<"), ">", ">") as ?escout) bind(replace(replace(replace(?lblout, "&", "&"), "<", "<"), ">", ">") as ?fullout) bind(concat('', ' ', ?fullout, ' ', ' ', ' ', ?icoout, ' ', ?escout, ' ', ' ', ?typout, ' ', '') as ?boxout) } } { select (group_concat(distinct ?boxppl; separator="") as ?boxesppl) (count(*) as ?nppl) where { { select ?irippl (min(?labelppl) as ?lblppl) (min(?iconppl) as ?icoppl) (group_concat(distinct ?typeppl; separator=" / ") as ?typppl) (count(distinct ?oppl) as ?iyppl) where { values ?_project_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . } values ?_project_multi_iri {} graph ?stateG { ?_project_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; 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 . } } } graph npa:graph { ?npppl np:hasAssertion ?appl ; np:hasPublicationInfo ?pippl ; npa:hasValidSignatureForPublicKeyHash ?pkppl . filter not exists { ?ixppl npx:invalidates ?npppl ; npa:hasValidSignatureForPublicKeyHash ?pkppl . } filter not exists { ?sxppl npx:supersedes ?npppl . } } graph ?appl { ?_project_multi_iri ?relppl ?irippl . values ?relppl { ff:has-principal-investigator ff:has-participant ff:has-data-steward gen:hasProjectLead } } optional { graph ?appl { ?irippl rdfs:label ?lappl } } optional { graph ?pippl { ?irippl foaf:name ?lfppl } } optional { graph ?pippl { ?irippl rdfs:label ?lqppl } } bind(coalesce(?lappl, ?lfppl, ?lqppl, replace(str(?irippl), "^.*[/#]", "")) as ?labelppl) bind(if(?relppl = ff:has-principal-investigator, "PI", if(?relppl = gen:hasProjectLead, "project lead", if(?relppl = ff:has-data-steward, "data steward", "participant"))) as ?typeppl) bind("👤" as ?iconppl) filter(contains(?memberPubkeys, ?pkppl)) optional { graph npa:graph { ?onpppl np:hasAssertion ?oappl ; np:hasPublicationInfo ?opippl ; npa:hasValidSignatureForPublicKeyHash ?opkppl . filter not exists { ?oixppl npx:invalidates ?onpppl ; npa:hasValidSignatureForPublicKeyHash ?opkppl . } filter not exists { ?osxppl npx:supersedes ?onpppl . } } graph ?oappl { ?_project_multi_iri ?orelppl ?oppl . values ?orelppl { ff:has-principal-investigator ff:has-participant ff:has-data-steward gen:hasProjectLead } } filter(str(?oppl) < str(?irippl) && contains(?memberPubkeys, ?opkppl)) } } group by ?irippl } bind((?iyppl - floor(?iyppl / 3) * 3) * 230 as ?bxppl) bind(floor(?iyppl / 3) * 36 as ?byppl) bind(if(strlen(?lblppl) > 30, concat(substr(?lblppl, 1, 29), "…"), ?lblppl) as ?tppl) bind(replace(replace(replace(?tppl, "&", "&"), "<", "<"), ">", ">") as ?escppl) bind(replace(replace(replace(?lblppl, "&", "&"), "<", "<"), ">", ">") as ?fullppl) bind(concat('', ' ', ?fullppl, ' ', ' ', ' ', ?icoppl, ' ', ?escppl, ' ', ' ', ?typppl, ' ', '') as ?boxppl) } } { select (group_concat(distinct ?boxinst; separator="") as ?boxesinst) (count(*) as ?ninst) where { { select ?iriinst (min(?labelinst) as ?lblinst) (min(?iconinst) as ?icoinst) (group_concat(distinct ?typeinst; separator=" / ") as ?typinst) (count(distinct ?oinst) as ?iyinst) where { values ?_project_multi_iri {} service <https://w3id.org/np/l/nanopub-query-1.1/repo/spaces> { select (group_concat(?mpk; separator=" ") as ?memberPubkeys) where { graph npa:graph { <http://purl.org/nanopub/admin/thisRepo> npa:hasCurrentSpaceState ?stateG . } values ?_project_multi_iri {} graph ?stateG { ?_project_multi_iri npa:isMaintainedBy? ?space . ?ri a gen:RoleInstantiation ; npa:forSpace ?space ; 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 . } } } graph npa:graph { ?npinst np:hasAssertion ?ainst ; np:hasPublicationInfo ?piinst ; npa:hasValidSignatureForPublicKeyHash ?pkinst . filter not exists { ?ixinst npx:invalidates ?npinst ; npa:hasValidSignatureForPublicKeyHash ?pkinst . } filter not exists { ?sxinst npx:supersedes ?npinst . } } graph ?ainst { ?_project_multi_iri ?relinst ?iriinst . values ?relinst { ff:has-lead-institution ff:has-partner-institution ff:has-funder } } optional { graph ?ainst { ?iriinst rdfs:label ?lainst } } optional { graph ?piinst { ?iriinst foaf:name ?lfinst } } optional { graph ?piinst { ?iriinst rdfs:label ?lqinst } } bind(coalesce(?lainst, ?lfinst, ?lqinst, replace(str(?iriinst), "^.*[/#]", "")) as ?labelinst) bind(if(?relinst = ff:has-lead-institution, "lead institution", if(?relinst = ff:has-partner-institution, "partner", "funder")) as ?typeinst) bind("🏛" as ?iconinst) filter(contains(?memberPubkeys, ?pkinst)) optional { graph npa:graph { ?onpinst np:hasAssertion ?oainst ; np:hasPublicationInfo ?opiinst ; npa:hasValidSignatureForPublicKeyHash ?opkinst . filter not exists { ?oixinst npx:invalidates ?onpinst ; npa:hasValidSignatureForPublicKeyHash ?opkinst . } filter not exists { ?osxinst npx:supersedes ?onpinst . } } graph ?oainst { ?_project_multi_iri ?orelinst ?oinst . values ?orelinst { ff:has-lead-institution ff:has-partner-institution ff:has-funder } } filter(str(?oinst) < str(?iriinst) && contains(?memberPubkeys, ?opkinst)) } } group by ?iriinst } bind((?iyinst - floor(?iyinst / 3) * 3) * 230 as ?bxinst) bind(floor(?iyinst / 3) * 36 as ?byinst) bind(if(strlen(?lblinst) > 30, concat(substr(?lblinst, 1, 29), "…"), ?lblinst) as ?tinst) bind(replace(replace(replace(?tinst, "&", "&"), "<", "<"), ">", ">") as ?escinst) bind(replace(replace(replace(?lblinst, "&", "&"), "<", "<"), ">", ">") as ?fullinst) bind(concat('', ' ', ?fullinst, ' ', ' ', ' ', ?icoinst, ' ', ?escinst, ' ', ' ', ?typinst, ' ', '') as ?boxinst) } } }