VIVO Documentation
Page History
...
Code Block | ||
---|---|---|
| ||
{ "head": { "vars": [ "s" , "p" , "o" ] } , "results": { "bindings": [ { "s": { "type": "uri" , "value": "http://openvivo.org/a/doi10.4225/03/58ca600d726bd-authorship1" } } , { "s": { "type": "uri" , "value": "http://openvivo.org/a/doi10.4225/03/58ca600d726bd-authorship2" } } , { "s": { "type": "uri" , "value": "http://openvivo.org/a/doi10.6084/m9.figshare.2002020-authorship1" } } , { "s": { "type": "uri" , "value": "http://openvivo.org/a/doi10.6084/m9.figshare.2002200-authorship1" } } , { "s": { "type": "uri" , "value": "http://openvivo.org/a/doi10.6084/m9.figshare.2002200-authorship2" } } , |
Using SPARQL for reporting
SPRQL can be used to extract data from VIVO for reporting. Using the TSV (tab separated values) output format, the results of a SPARQL query can be downloaded from VIVO and uploaded to a spreadsheet, reporting or presentation tool.
The query below makes a contact list for all people in particular academic unit.
Code Block |
---|
#
# Find all the people with a position in the CTSI or any CTSI sub-unit,
# and list them alphabetically with phone, email, gatorlink, ufid, eracommons if any
#
SELECT ?person (MIN(DISTINCT ?xname) AS ?name)
(MIN(DISTINCT ?xphone) AS ?phone)
(MIN(DISTINCT ?xemail) AS ?email)
(MIN(DISTINCT ?xgatorlink) AS ?gatorlink)
(MIN(DISTINCT ?xufid) AS ?ufid)
(MIN(DISTINCT ?xeracommons) AS ?eracommons)
WHERE {
{?pos vivo:relates <http://vivo.ufl.edu/individual/n8763427> . ?pos a vivo:Position .}
UNION
{<http://vivo.ufl.edu/individual/n8763427> obo:BFO_0000051 ?sub .
?pos vivo:relates ?sub . ?pos a vivo:Position .}
?pos vivo:dateTimeInterval ?dt .
OPTIONAL {?dt vivo:end ?end . }
FILTER (!BOUND(?end)) # current positions do not have end dates
?pos vivo:relates ?person . ?person a foaf:Person .
?person rdfs:label ?xname .
?person a ufVivo:UFCurrentEntity .
?person obo:ARG_2000028 ?vcard .
OPTIONAL { ?vcard vcard:hasEmail ?email_thing . ?email_thing vcard:email ?xemail .}
OPTIONAL { ?vcard vcard:hasTelephone ?tel_thing . ?tel_thing vcard:telephone ?xphone .}
OPTIONAL { ?person ufVivo:gatorlink ?xgatorlink .}
OPTIONAL { ?person ufVivo:ufid ?xufid .}
OPTIONAL { ?person vivo:eRACommonsId ?xeracommons .}
}
GROUP BY ?person
ORDER BY ?name |
Using SPARQL to manage data
ASK Queries
...
Overview
Content Tools