Skip to content

Instantly share code, notes, and snippets.

Avatar

Roderic Page rdmpage

View GitHub Profile
@rdmpage
rdmpage / animals.csv
Last active May 28, 2021
Summary tree example
View animals.csv
node parent label weight
1 0 Animalia 0
2 1 Acanthocephala 1330
3 1 Annelida 15676
4 1 Arthropoda 1114267
5 1 Brachiopoda 396
6 1 Bryozoa 20559
7 1 Chaetognatha 132
8 1 Chordata 0
9 1 Cnidaria 14223
@rdmpage
rdmpage / zoobank.xml
Last active Mar 11, 2021
ZooBank LSID XML for a taxon name
View zoobank.xml
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:tto="http://rs.tdwg.org/ontology/voc/Specimen#"
xmlns:tc="http://rs.tdwg.org/ontology/voc/TaxonConcept#"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:tn="http://rs.tdwg.org/ontology/voc/TaxonName#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:tpub="http://rs.tdwg.org/ontology/voc/PublicationCitation#"
@rdmpage
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
rdmpage / README.md
Last active Oct 3, 2018
OpenBioDiv query to get specimens from MNRJ
View README.md

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."

http://big4-project.eu/news/11665_blog-post-openbiodiv-the-semantic-web-comes-to-biodiversity-informatics/

See query at https://goo.gl/4ovg2o

@rdmpage
rdmpage / clements2017-2018.html
Last active Sep 19, 2018
Comparison of eBird checklists for 2017 and 2018
View clements2017-2018.html
<html>
<head>
<style>
html, body{
width:100%;
height:100%;
font-size:14px;
}
#wrapper {
padding:1%;
@rdmpage
rdmpage / cltools.sh
Created Nov 10, 2017 — forked from justinbellamy/cltools.sh
Install Autoconf and Automake on OS X El Capitan
View cltools.sh
#!/bin/sh
##
# 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 http://jsdelfino.blogspot.com.au/2012/08/autoconf-and-automake-on-mac-os-x.html
#
export build=~/devtools # or wherever you'd like to build
@rdmpage
rdmpage / jsonld.sh
Created Apr 18, 2017 — forked from jprante/jsonld.sh
JSON-LD in Elasticsearch
View jsonld.sh
curl -XDELETE 'localhost:9200/jsonld'
curl -XPOST 'localhost:9200/jsonld'
curl -XPUT 'localhost:9200/jsonld/doc/1' -d '
{
"@context":
{
"dc": "http://purl.org/dc/elements/1.1/",
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.
//hide
//setup
@rdmpage
rdmpage / query.txt
Created May 19, 2016
Querying Wikipedia for links to BioStor
View query.txt
The Mediawiki API can be used to find qhat wikipedia pages link to BioStor, e.g.:
https://en.wikipedia.org/w/api.php?action=query&list=exturlusage&euquery=biostor.org&eulimit=20
See https://www.mediawiki.org/wiki/API:Lists/All#Exturlusage for details.
View Cricula.nexus
#NEXUS
Begin trees; [Treefile saved Thu Aug 20 21:42:14 2015]
[!
>Data file = /Users/rpage/Sites/geojson-phylogeny-demo/bold-api/service/tmp/SAUPA642-10/SAUPA642-10.nex
>Neighbor-joining search settings:
> Ties (if encountered) will be broken systematically
> Distance measure = uncorrected ("p")
> (Tree is unrooted)
]