Skip to content

Instantly share code, notes, and snippets.

@rdmpage
rdmpage / plant_genera.tre
Created November 29, 2023 10:58
Newick tree from Dimitrov, D., Xu, X., Su, X. et al. Diversification of flowering plants in space and time. Nat Commun 14, 7609 (2023). https://doi.org/10.1038/s41467-023-43396-8
((((((Sciadopitys[1]:188.308735,((Cephalotaxus[2]:142.304539,((Torreya[3]:89.769358,Amentotaxus[4]:89.769358)[14341]:46.785101,(Austrotaxus[5]:111.848542,(Pseudotaxus[6]:83.600633,Taxus[7]:83.600633)[14343]:28.247909)[14342]:24.705917)[14340]:5.75008)[14339]:12.291716,(((Fokienia[8]:15.209049,Cunninghamia[9]:15.209049)[14346]:61.849953,Xanthocyparis[10]:77.059002)[14345]:27.702685,(Taiwania[11]:98.552378,(Athrotaxis[12]:90.599681,((Sequoia[13]:47.99678,(Metasequoia[14]:43.626921,Sequoiadendron[15]:43.626921)[14351]:4.369859)[14350]:38.033481,((Cryptomeria[16]:45.856476,(Glyptostrobus[17]:25.785835,Taxodium[18]:25.785835)[14354]:20.070641)[14353]:28.4228,((Papuacedrus[19]:34.840632,((Pilgerodendron[20]:18.669556,Libocedrus[21]:18.669556)[14358]:12.248165,(Austrocedrus[22]:30.061951,((Neocallitropsis[23]:5.794331,(Callitris[24]:5.095635,Actinostrobus[25]:5.095635)[14362]:0.698696)[14361]:16.394056,(Widdringtonia[26]:16.065476,(Fitzroya[27]:8.833227,Diselma[28]:8.833227)[14364]:7.232249)[14363]:6.122911)[14360]:
@rdmpage
rdmpage / legume.tre
Created August 3, 2023 15:13
Newick tree for legumes
('Cercis_canadensis':66.745756598131,((('Medicago_truncatula':37.847072955593,'Glycine_max':37.847072955593):6.0857450219624,('Arachis_ipaensis':34.409341181462,'Nissolia_schottii':34.409341181462):9.5234767960946):22.063391261664,(('Arcoa_gonavensis':51.905808169212,('Tetrapterocarpon_geayi':35.916971163638,('Acrocarpus_fraxinifolius':23.591060643269,'Ceratonia_siliqua':23.591060643269):12.325910520364):15.988837005574):8.5519236454225,(('Umtiza_listeriana':35.729113542994,('Gymnocladus_dioica':20.886946672116,'Gleditsia_chinensis':20.886946672116):14.842166870878):23.144256779574,(((('Batesia_floribunda':39.988047737806,('Recordoxylon_speciosum':23.558014064512,'Melanoxylon_brauna':23.558014064512):16.430034673294):2.6012244899893,('Chamaecrista_adiantifolia':30.217103715139,('Chamaecrista_viscosa':27.090495896652,('Chamaecrista_ramosa':12.853561727372,'Chamaecrista_lineata':12.853561727372):14.23693416928):3.1266078184925)'Chamaecrista':12.372168512653):4.6805972617711,('Cassia_cowanii':37.71443824944,(('S
@rdmpage
rdmpage / animals.csv
Last active May 28, 2021 11:45
Summary tree example
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 March 11, 2021 13:02
ZooBank LSID XML for a taxon name
<?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 July 9, 2020 14:27 — forked from zuphilip/zotero-wikidata-lookup.js
Zotero Script for Wikidata Lookup
// 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 October 3, 2018 12:28
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."

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 March 9, 2022 17:54
Comparison of eBird checklists for 2017 and 2018
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html>
<head>
<style>
html, body{
width:100%;
height:100%;
font-size:14px;
@rdmpage
rdmpage / cltools.sh
Created November 10, 2017 16:15 — forked from justinbellamy/cltools.sh
Install Autoconf and Automake on OS X El Capitan
#!/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 April 18, 2017 19:29 — forked from jprante/jsonld.sh
JSON-LD in Elasticsearch
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/",
== 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