Skip to content

Instantly share code, notes, and snippets.

Roderic Page rdmpage

Block or report user

Report or block rdmpage

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@rdmpage
rdmpage / geojson-conversion.sh
Created Jan 11, 2016 — forked from benbalter/geojson-conversion.sh
Bulk convert shapefiles to geojson using ogr2ogr
View geojson-conversion.sh
# Bulk convert shapefiles to geojson using ogr2ogr
# For more information, see http://ben.balter.com/2013/06/26/how-to-convert-shapefiles-to-geojson-for-use-on-github/
# Note: Assumes you're in a folder with one or more zip files containing shape files
# and Outputs as geojson with the crs:84 SRS (for use on GitHub or elsewhere)
#geojson conversion
function shp2geojson() {
ogr2ogr -f GeoJSON -t_srs crs:84 "$1.geojson" "$1.shp"
}
@rdmpage
rdmpage / collection.json
Created Dec 10, 2015
EOL Collections Write API
View collection.json
{"collection":{"name":"Mesoplodon","description":"Mesoplodon species","collection_items":[{"collected_item_type":"TaxonConcept","collected_item_id":328563}]}}
@rdmpage
rdmpage / jbig2enc-master.txt
Created Oct 21, 2015
Compiling leptonica-1.68 and jbig2enc
View jbig2enc-master.txt
Need to supply paths to configure
./configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib
@rdmpage
rdmpage / curl.txt
Created Oct 5, 2015
Get URLs/PDFs over slow connections (e.g., China)
View curl.txt
curl -L -C - '<url>'
@rdmpage
rdmpage / Merge PDFs.txt
Created Sep 8, 2015
Merge PDFs in a directory into one PDF using ghostscript, without rotating pages
View Merge PDFs.txt
gs -q -dNOPAUSE -dBATCH -dAutoRotatePages=/None -sDEVICE=pdfwrite -sOutputFile=merged.pdf *.pdf
View _q5fYmzIRsaO1zdwL9Ja5A.json
{
"updated": "2015-08-28T23:58:18.165753+00:00",
"target": [
{
"source": "http://www.gbif.org/occurrence/912442645",
"selector": [
{
"conformsTo": "https://tools.ietf.org/html/rfc3236",
"type": "FragmentSelector",
"value": "occurrence"
View Taxa with same basionym
== Taxonomy tester - taxa with same basionym
This test asks whether there are multiple taxa with the same basionym. Logically this should not occur.
This example uses the legume genrra Poissonia and Coursetia.
//hide
//setup
//output
View Anachronistic species and genus names
== Taxonomy tester - anachronistic species and genus names
This test compares the dates of species names and the genus name. If a name is a new combination then the author name is enclosed in parentheses. If a species is placed in a genus that was published after the species was described, then logically the name is a new combination. However in some cases GBIF has species names which violate this rule.
This example uses the butterfly genus Heliopyrgus
//hide
//setup
//output
[source,cypher]
View Subspecies
== Taxonomy tester - species and subspecies with same name
This test compares the epithets of species and subspecies in the same genus. If a subspecies with a given epithet exists in a genus, there should not be another species (other than the species to which subspecies belongs if it is the nominate subspecies).
This example uses the butterfly genus Heliopyrgus
//hide
//setup
//output
[source,cypher]
View Generic names don't match
== Taxonomy tester - genus names should match species name
This test compares the generic name of a species with that of the genus it is placed in. These should be the same, but often aren't, signalling a problem, such as a homonym, synonym, or spelling mistake.
This example uses the butterfly genus Forsterinaria Gray, 1973, see http://bionames.org/search/Forsterinaria, which is a replacement name for the genus Haywardina Forster, 1964, see http://biostor.org/reference/77525. GBIF has Forsterinaria http://bionames.org/taxa/gbif/3257628 but the species names are labelled with Haywardina (which it also has in its classification, http://www.gbif.org/species/1894033 ).
//hide
//setup
//output
[source,cypher]
You can’t perform that action at this time.