Skip to content

Instantly share code, notes, and snippets.

View CliffordAnderson's full-sized avatar

Clifford Anderson CliffordAnderson

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@CliffordAnderson
CliffordAnderson / americannabokov.asc
Last active August 29, 2015 14:06 — forked from stardustnrust/americannabokov
Suellen's "Nabokov in America" Graph Gist

Nabokov in America

"Genius is non-conformity."

  • Vladimir Nabokov

Vladimir Nabokov 001

Modeling the Graph

datamodel
@CliffordAnderson
CliffordAnderson / lifeyousave.asc
Last active August 29, 2015 14:07 — forked from stardustnrust/lifeyousave
A Neo4J Graph Gist of Flannery O'Connor's "The Life You Save May Be Your Own"

The Life You Save May Be Your Own

OUR DATASET

CREATE

//People
(shiflet:Person {name:'Tom T. Shiflet'}),
@CliffordAnderson
CliffordAnderson / roosevelt.asciidoc
Last active August 29, 2015 14:08 — forked from suellenstringer-hye/roosevelt
A learning exercise for Neo4j

Roosevelt Family Geneaology

Purpose of Graph

This very simple graph was used to help introduce students to graphing concepts. We started the class with a powerpoint presentation covering the nature of networks and graphs and basic coding for Cypher so that they would be prepared to work on a [Neo4j GraphGist](http://gist.neo4j.org/) on their own by the end of the hour class. Since everyone intuitively understands that family trees are derived from a set of relationships, the class was assigned to fork the graph below.

@CliffordAnderson
CliffordAnderson / keys.md
Last active August 29, 2015 14:14 — forked from langsdlc/keys
Mapbox keys for Berlin Maps

1908

vulibrarygis.l367nf49

1920

vulibrarygis.l366jopj

1936

@CliffordAnderson
CliffordAnderson / morphbank-new-serialization.xqy
Last active December 1, 2015 15:51 — forked from baskaufs/morphbank-results.xq
generating a file containing Bioimages and Morphbank identifiers
xquery version "3.0";
(: let $localFilesFolderUnix := "c:/test" :)
let $localFilesFolderPC := "c:\test"
let $uri := "http://services.morphbank.net/mbsvc3/request?method=changes&objecttype=Image&keywords=&geolocated=true&firstResult=0&user=&group=Bioimages&change=&lastDateChanged=&numChangeDays=30&id=&taxonName=&format=svc"
let $responseDoc := fn:doc($uri)
let $ids :=
for $id in $responseDoc//object/sourceId
return concat($id/external/text(),"|","http://www.morphbank.net/?id=",$id/morphbank/text(),"&imgType=jpeg")
return file:write(concat($localFilesFolderPC,"\morphbank-ids.csv"), $ids, map { "item-separator": "
"})
{
"type": "Feature",
"properties": {
"title": "Poststadion Football Complex",
"marker-size": "medium",
"marker-color": "#e5c228",
"marker-symbol": "star-stroked",
"images": [
[
"<img src='images/poststadion.jpg' />",
let $uri := fn:encode-for-uri( "http://bioimages.vanderbilt.edu/vanderbilt/7-314#2002-06-14")
let $json := fetch:text("http://api.gbif.org/v1/occurrence/search?occurrenceID=" || $uri)
let $json := fn:parse-json($json)
let $latitude := $json?results?1?decimalLatitude
let $longitude := $json?results?1?decimalLongitude
let $identifier := $json?results?1?identifier
return map {
"type": "Feature",
"geometry": map {
"type": "Point",
@CliffordAnderson
CliffordAnderson / gbif-api.txt
Created February 12, 2016 21:27 — forked from baskaufs/gbif-api.txt
Some test API calls to get JSON with geocoordinates from the Global Biodiversity Information Facility (GBIF)
See http://www.gbif.org/developer/summary for background.
Find the single occurrence with identifier http://bioimages.vanderbilt.edu/vanderbilt/7-314#2002-06-14
http://api.gbif.org/v1/occurrence/search?occurrenceID=http%3A%2F%2Fbioimages.vanderbilt.edu%2Fvanderbilt%2F7-314%232002-06-14
Note: the occurrenceID is URLencoded.
Find occurrences
- with scientificName=Quercus%20macrocarpa (bur oak, note: space between genus and species is URLencoded as "%20")
- with decimalLatitude between 35.81 and 36.45
- with decimalLongitude between -87.21 and -86.27