Skip to content

Instantly share code, notes, and snippets.

@rdmpage rdmpage/
Last active Oct 3, 2018

What would you like to do?
OpenBioDiv query to get specimens from MNRJ

OpenBioDiv query to get specimens from MNRJ

Query by Viktor Senderov:

"In order to illustrate the capabilities of OpenBiodiv and draw attention to the impact of the tragically lost collection of the Museu Nacional de Rio de Janeiro (MNRJ), I can ask our system to give me the number of times a specimen from that collection was used in a taxonomic article, and in which ones."

See query at

PREFIX rdf: <>
PREFIX openbiodiv: <>
PREFIX pkm: <>
PREFIX rdfs: <>
PREFIX po: <>
PREFIX fabio: <>
PREFIX dcelements: <>
PREFIX dwc: <>
PREFIX prism: <>
PREFIX dwciri: <>
SELECT ?institution_name (COUNT( DISTINCT ?icu) AS ?times_mentioned) (COUNT(DISTINCT ?title) AS ?articles) (GROUP_CONCAT(DISTINCT ?title; SEPARATOR=", ") AS ?doi_of_articles) (GROUP_CONCAT(DISTINCT ?name; SEPARATOR=", ") AS ?names_mentioned) (COUNT (DISTINCT ?name) AS ?number_of_taxa)
?s rdf:type openbiodiv:ScientificName ;
rdfs:label ?name .
?tnu pkm:mentions ?s .
BIND("Museu Nacional de Rio de Janeiro (MNRJ)" as ?institution_name)
?icu rdf:type openbiodiv:InstitutionalCodeUsage ;
dwc:institutional_code "MNRJ" .
?container po:contains ?icu, ?tnu ;
rdf:type fabio:JournalArticle ;
prism:doi ?title .
} GROUP BY ?institution_name
ORDER BY DESC (?times_mentioned)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.