Skip to content

Instantly share code, notes, and snippets.

View CliffordAnderson's full-sized avatar

Clifford Anderson CliffordAnderson

View GitHub Profile
@CliffordAnderson
CliffordAnderson / New.csv
Created April 7, 2020 20:46 — forked from davidamichelson/New
Data To Concatenate
Headword Syriaca_URI Map_1 Map_2 Map_3 Map_4 Map_5 Map_6 Map_7 Map_8 Map_9 Map_10 Map_11 Map_12 Map_13 Map_14
Abila syriaca.org/place/4355 1 4
Abivard syriaca.org/place/4222 9
Abr Shahr syriaca.org/place/4220 9 10
Acre|Akko syriaca.org/place/14 1 2 5

Artistic Influence

Introduction

This graph studies the relations of infuence between artists. The data comes from this query of Wikidata:

xquery version "3.1";
declare function local:seriesTitle($Network as xs:string?) as xs:string
{
switch ($Network)
case "ABC" return "ABC World News Tonight"
case "CBS" return "CBS Evening News"
case "NBC" return "NBC Nightly News"
default return "unknown network"
};
@CliffordAnderson
CliffordAnderson / JesseWills.xml
Last active March 9, 2018 19:33 — forked from zachary-johnson/JesseWills FA extracted portion
Data from Jesse Wills finding aid that needs to be extracted into individual components
<xml>
<unitdate>1952</unitdate>
<unittitle>26 August to Merrill Moore; 26 August to Coley Harwell; F. 1-1.</unittitle>
<unitdate>1954</unitdate>
<unittitle>8 November to George Mayfield; F. 1-1.</unittitle>
<unitdate>1956</unitdate>
<unittitle>15 June to &#34;Red&#34; (Robert Fenn Warren); F. 1-1. 31 July to William F. Orr; F.
6-14. 5 September to William 0. Batts; F. 1-1.</unittitle>
<unitdate>1958</unitdate>
<unittitle>30 April to Allen Tate; 9 June to Allen Tate; 9 June to . &#34;Bill&#34; (William
@CliffordAnderson
CliffordAnderson / unitdates.xqy
Created October 13, 2017 22:00 — forked from zachary-johnson/xquery attempt so far
Xquery for Unit Dates
(: This is as far as we got with the xquery command, simply trying to return the data contained in <unitdate> in a single doc for now.:)
xquery version "3.0";
declare namespace ead = "urn:isbn:1-931666-22-9";
let $doc := fn:doc("https://raw.githubusercontent.com/HeardLibrary/finding-aids/master/ASpace/Finalized%20EADs/8.30.17%20batch/HendrixNancy_MSS_206.xml")
for $unitdate in $doc//ead:dsc//ead:unitdate
let $gYear := fn:replace($unitdate, ".*(\d{4}).*", "$1")
return
@CliffordAnderson
CliffordAnderson / mss.102_ead.xml
Created July 17, 2017 14:47 — forked from zachary-johnson/mss.102_ead.xml
EAD template using MSS.102
<?xml version="1.0" encoding="utf-8"?>
<ead xmlns="urn:isbn:1-931666-22-9" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:isbn:1-931666-22-9 http://www.loc.gov/ead/ead.xsd">
<eadheader countryencoding="iso3166-1" dateencoding="iso8601" findaidstatus="completed" langencoding="iso639-2b" repositoryencoding="iso15511">
<eadid countrycode="US"></eadid>
<filedesc>
<titlestmt>
<!-- The filing title is the one listed on the Manuscripts register, typically last name, first name. Note the 'faculty' designation. -->
<titleproper type="filing">Davie2, Donald Papers - Faculty</titleproper>
<!-- This is the proper finding aid title found at the beginning at the finding aid. Note that the filing title is different than the titleproper field. -->
<titleproper>Finding Aid for the Donald Davie2 Papers</titleproper>
@CliffordAnderson
CliffordAnderson / clean-csv.xqy
Last active July 18, 2016 21:29 — forked from langsdlc/Test_Network.csv
Test Network
xquery version "3.1";
declare function local:convert-records($url as xs:string) as element(record)*
{
let $rows := fetch:text($url)
let $records := csv:parse($rows, map { 'header': true() })
for $record in $records/csv/record
return $record
};
@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
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",
{
"type": "Feature",
"properties": {
"title": "Poststadion Football Complex",
"marker-size": "medium",
"marker-color": "#e5c228",
"marker-symbol": "star-stroked",
"images": [
[
"<img src='images/poststadion.jpg' />",