Skip to content

Instantly share code, notes, and snippets.


Roderic Page rdmpage

View GitHub Profile
rdmpage / zotero-wikidata-lookup.js
Last active Jul 9, 2020 — forked from zuphilip/zotero-wikidata-lookup.js
Zotero Script for Wikidata Lookup
View zotero-wikidata-lookup.js
// Zotero script look up selected items in Wikidata and
// check whether the DOI can be found there. If results
// are found then the QIDs are saved in the corresponding
// items in the extra field. Some warnings are given for the
// other cases; thus watch the Zotero error console as well
// during execution of the script. [CC0]
var items = Zotero.getActiveZoteroPane().getSelectedItems();
var map = [];
rdmpage / Design document
Created Sep 24, 2012
Full text search in Cloudant
View Design document
"_id": "_design/lookup",
"_rev": "2-2763d098bce604230bfc247ca06cba05",
"language": "javascript",
"indexes": {
"all": {
"index": "function(doc) {\n if (doc.title)\n {\n index(\"title\", doc.title, {\"store\": \"yes\"});\n }\n }"
rdmpage /
Last active Oct 3, 2018
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

rdmpage / clements2017-2018.html
Last active Sep 19, 2018
Comparison of eBird checklists for 2017 and 2018
View clements2017-2018.html
html, body{
#wrapper {
rdmpage / primers.txt
Last active May 17, 2018
COI DNA barcode primer locations
View primers.txt
Reference COI is NC_003128 Buteo buteo COI
TZBRD035-15.COI-5P [648bp] ctgatctttggtgnatgagcaggcatagccggcacagcacttagcctactaatccgcgcagaactaggacagccaggaacactattgggagacgaccaaatctacaatgtaatcgtaacagcccacgctttcgtcataatcttcttcatagtcatacctattatgatcggaggcttcggaaactgactggttccactcataattggcgccccagacatagcattcccccgcataaataatatgagcttctgactcctcccaccttcttttctcctcctactagcctcctctacagtagaagccggggctggcactggatgaactgtttatccacccctagccggtaatcttgcccacgcgggcgcatcagtagacctggctattttttcccttcacttggcaggcgtgtcgtccatcttaggagctattaactttatcaccacaattattaacataaagccccctgcactatcacaatatcaaacacccctcttcgtatgatccgtcctcattactgctatcctcttactactatccctgccagtcctagccgccgggattacaatactcctcaccgatcgcaacctcaacactacattctttgaccctgcaggaggaggagacccaatcctgtatcaacacctattc
TZBRD019-15.COI-5P tcttcggcgcctgagctggtatagtcggcaccgccctcagcttactcatccgtgcagaactcggccaacccggcacactcctaggtgacgaccaaatttataacgtaatcgttaccgcacatgccttcgtaataatcttcttcatagttataccaatcatgatcggaggattcggaaactgacttgttccactcataattggcgctc
rdmpage / gbif.asc
Last active Mar 31, 2018
GenBank and GBIF
View gbif.asc

Cluster multiple occurrence records in GBIF

In this example we have the same sequence GQ247641 in two sequence datasets ("European Molecular Biology Laboratory Australian Mirror" and "Geographically tagged INSDC sequences"), and also the voucher specimen ("AM W.35546.001" or "AMS:W.35546") also occurs in GBIF (provided by "Australian Museum provider for OZCAM"). Linking the two sequence occurrences is trivial, we just link by the accession "GQ247641". Linking the sequence to the museum specimen requires matching the slightly different strings "AM W.35546.001" and "AMS:W.35546".

The graph links three records in GBIf that all refer to the same thing.

rdmpage /
Created Nov 10, 2017 — forked from justinbellamy/
Install Autoconf and Automake on OS X El Capitan
# Install autoconf, automake and libtool smoothly on Mac OS X.
# Newer versions of these libraries are available and may work better on OS X
# This script is originally from
export build=~/devtools # or wherever you'd like to build
rdmpage /
Created Apr 18, 2017 — forked from jprante/
JSON-LD in Elasticsearch
curl -XDELETE 'localhost:9200/jsonld'
curl -XPOST 'localhost:9200/jsonld'
curl -XPUT 'localhost:9200/jsonld/doc/1' -d '
"dc": "",
rdmpage / index.html
Created Mar 7, 2014
GBIF data overlayed on Google Maps
View index.html
<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>GBIF and Google Maps</title>
<style type="text/css">
body {
margin: 0;
View Multiple identifiers
== Handling multiple identifiers
Many objects of interest will have multiple identifiers, and each identifier may have different, complementary data associated with it.
One approach is to treat each identifier as a node, and link it to node for the corresponding object (essentially the object is treated as a bnode). We therefore refer to an object as "the object identifier by <identifier>". If we have correctly associated multiple identifiers with the same object, then we can link the two objects together.
When we have a link to create to another object, we use MERGE (id)-[]-(object) to ensure that id-object exists, then we link to it. In the example below we have a work with DOI 10.3897/phytokeys.44.7993, which cites PMID 21653447. First we create the work with DOI 10.3897/phytokeys.44.7993.